Fix inserting with defaults

This commit is contained in:
Steve Chavez
2023-06-27 15:37:22 -05:00
committed by steve-chavez
parent d59f841d15
commit 3a41d55be6
+19 -4
View File
@@ -853,13 +853,13 @@ Having:
A request:
.. code-block:: http
.. tabs::
.. code-tab:: http
POST /foo?columns=id,bar,baz HTTP/1.1
Content-Type: application/json
Prefer: return=representation
.. code-block:: json
Prefer: missing=default, return=representation
[
{ "bar": "val1"
@@ -869,6 +869,21 @@ A request:
}
]
.. code-tab:: bash Curl
curl "http://localhost:3000/foo?columns=id,bar,baz" \
-H "Content-Type: application/json" \
-H "Prefer: missing=default, return=representation" \
-d @- << EOF
[
{ "bar": "val1"
}
, { "bar": "val2"
, "baz": 15
}
]
EOF
Will result in:
.. code-block:: json