New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x]: Hide the default section per area with new config parameter #1868
Conversation
…teDescriber to specific areas which allowes disabling rendering of default routes, Adjust tests accordingly
Thanks a lot for your proposal! However, I'm not sure this is the correct approach, this means we would no longer leverage php annotations, symfony routes, etc. when using this option and that would be quite confusing (as well as suboptimal) in my opinion. What do you think about the alternative I suggested in #1458 (comment), about filtering the routes passed to the RouteDescriber depending on the presence of some OA annotations? |
@GuilhemN my idea was to prevent generating those routes so it will be faster. But you are right, there can be side effects. |
…isabling route describer, Add test for new handling in FilteredRouteCollectionBuilder
@GuilhemN in case the notification slipped through: I changed it like discussed in the Bugticket :) let me know if somethings wrong. |
That's great, thank you @Havrin! |
Hi guys, why this feature is not present in the 4.x versions? https://github.com/nelmio/NelmioApiDocBundle/blob/v4.6.2/DependencyInjection/Configuration.php#L52 Even the FAQs about 4.x: Thanks! |
By adding a new config parameter it is possible to hide the "default" section in your config.
Approach is to not register the RouteDescriber as a tagged service per area.
Fixes: #1458