Skip to content

Conversation

@alexndlm
Copy link
Contributor

Q A
Branch? main
Tickets
License MIT
Doc PR

@alexndlm alexndlm force-pushed the feature/add-error-classes-options-to-openapi-config branch from 7bb1c0e to f48feb3 Compare May 13, 2025 11:22
@alexndlm alexndlm force-pushed the feature/add-error-classes-options-to-openapi-config branch from 4730096 to 2793631 Compare May 13, 2025 11:26
->end()
->booleanNode('overrideResponses')->defaultTrue()->info('Whether API Platform adds automatic responses to the OpenAPI documentation.')
->booleanNode('overrideResponses')->defaultTrue()->info('Whether API Platform adds automatic responses to the OpenAPI documentation.')->end()
->scalarNode('error_resource_class')->defaultNull()->info('The class used to represent errors in the OpenAPI documentation.')->end()
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it be camel cased to match other configuration names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Symfony use snake case for configs. In the current section, we have both swagger_ui_extra_configuration and overrideResponses.

It will be nice to use snake case for new options and rename options with camel case in 5.0.

Copy link
Member

Choose a reason for hiding this comment

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

actually its overrideResponses that's wrong :D

@alexndlm alexndlm requested a review from soyuka May 14, 2025 07:35
@soyuka soyuka merged commit 1862d03 into api-platform:main May 14, 2025
95 of 97 checks passed
@soyuka
Copy link
Member

soyuka commented May 14, 2025

thanks!

Also note that there's the defaults.errors settings that should/may work to configure operation's default error resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants