Correctly link to JSON Merge Patch in API docu instead of JSON Patch

This commit is contained in:
Jan Böhmer 2023-10-15 12:38:32 +02:00
parent 7a2928e202
commit 47fc7db953
2 changed files with 3 additions and 2 deletions

View file

@ -46,7 +46,8 @@ For most entities, there are endpoints like this:
* **POST**: `/api/categories/` - Create a new category
* **GET**: `/api/categories/{id}` - Get a specific category by its ID
* **DELETE**: `/api/categories/{id}` - Delete a specific category by its ID
* **UPDATE**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the request are updated, all other fields are left unchanged. Be aware that you have to set the [JSON Patch](https://en.wikipedia.org/wiki/JSON_Patch) content type header (`Content-Type: application/merge-patch+json`) for this to work.
* **UPDATE**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the request are updated, all other fields are left unchanged.
Be aware that you have to set the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) content type header (`Content-Type: application/merge-patch+json`) for this to work.
A full (interactive) list of endpoints can be displayed when visiting the `/api/` path in your browser, when you are logged in with a user, which is allowed to access the API.
There is also a link to this page, on the user settings page in the API token section.

View file

@ -84,7 +84,7 @@ class StructuralEntityChoiceLoader extends AbstractChoiceLoader
if (!$this->options['allow_add']) {
//If we have a form, add an error to it, to improve the user experience
//If we have a form, add an error to it, to improve the user experience
if ($this->form !== null) {
$this->form->addError(
new FormError($this->translator->trans('entity.select.creating_new_entities_not_allowed')