Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ api_platform:

# Enable the Nelmio Api doc integration.
enable_nelmio_api_doc: false

# Map exceptions to HTTP status codes
exception_to_status:
Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # with a status code
ApiPlatform\Core\Exception\InvalidArgumentException: 'HTTP_BAD_REQUEST' # or with a constant defined in the 'Symfony\Component\HttpFoundation\Response' class

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a misfeature. Sorry that I didn't catch this.

Symfony 3.2 will support using PHP constants in YAML: http://symfony.com/blog/new-in-symfony-3-2-php-constants-in-yaml-files

We should remove this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I mean we should remove it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I hesitated to keep this feature because of that. But no comments during the PR, so...


collection:

# The default order of results.
Expand Down