3
votes

I want to exclude section "default" from SwaggerUI - in there I keep routes that I do not want to expose. I know that in version 2.x of Nelmio Apidoc there was a parameter called exclude_sections in config.yml - how can I do that with 3.0 beta version?

1

1 Answers

2
votes

You can use the areas section in config.yml, setting the default area to whichever routes you want:

nelmio_api_doc:
    documentation:
        [...]
    areas:
        default:
            path_patterns: [ ^/user, ^/customer ]

This config will set under api/doc only the routes you put in the array.