diff --git a/docs/api/intro.md b/docs/api/intro.md index 8e60173a..13e50c02 100644 --- a/docs/api/intro.md +++ b/docs/api/intro.md @@ -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. diff --git a/src/Form/Type/Helper/StructuralEntityChoiceLoader.php b/src/Form/Type/Helper/StructuralEntityChoiceLoader.php index 241f57b3..79e4856c 100644 --- a/src/Form/Type/Helper/StructuralEntityChoiceLoader.php +++ b/src/Form/Type/Helper/StructuralEntityChoiceLoader.php @@ -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')