@@ -400,6 +400,25 @@ service CatalogService {}
400400
401401Be aware that using an absolute path will disallow serving the service at multiple protocols.
402402
403+ ### PATCH vs. PUT vs. Replace
404+
405+ The HTTP method ` PATCH ` is meant for partial modification of an _ existing resource_ .
406+ ` PUT ` , on the other hand, is meant for ensuring a resource exists
407+ , that is, if it doesn't yet exists, it gets created.
408+ If it does exist, it gets updated to reflect the request's content.
409+
410+ This content, however, may be incomplete.
411+ By default, the values for not listed keys are not touched.
412+ The rationale being that default values are known and clients have the option to send full representations, if necessary.
413+
414+ The following table shows the Node.js runtime's configuration options and their respective default value:
415+
416+ | Flag | Behavior | Default |
417+ | ----------------------------------------------| ------------------------------------------| ---------|
418+ | <Config keyOnly >cds.runtime.patch_as_upsert </Config > | Create resource if it does not yet exist | false |
419+ | <Config keyOnly >cds.runtime.put_as_upsert</Config > | Create resource if it does not yet exist | true |
420+ | <Config keyOnly >cds.runtime.put_as_replace</Config > | Payload is enriched with default values | false |
421+
403422### Custom Protocol Adapter
404423
405424Similar to the configuration of the GraphQL Adapter, you can plug in your own protocol.
0 commit comments