3

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?

cezar
  • 11,616
  • 6
  • 48
  • 84
Karol Gącik
  • 31
  • 1
  • 3

1 Answers1

2

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.

cezar
  • 11,616
  • 6
  • 48
  • 84
Krleza
  • 87
  • 12