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: A request:
.. code-block:: http .. tabs::
.. code-tab:: http
POST /foo?columns=id,bar,baz HTTP/1.1 POST /foo?columns=id,bar,baz HTTP/1.1
Content-Type: application/json Content-Type: application/json
Prefer: return=representation Prefer: missing=default, return=representation
.. code-block:: json
[ [
{ "bar": "val1" { "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: Will result in:
.. code-block:: json .. code-block:: json