2

By default, ApiDoc lists out all operations for each API endpoint, like this:

Expanded list

In the Swagger demo, however, operations are hidden by default until the user chooses to show them.

Hidden list

Is there a configuration option for ApiDoc that will hide operations by default? I haven't found anything like this in the documentation.

Lukas Hajdu
  • 806
  • 7
  • 18

2 Answers2

1

Documentation section can be hidden by default with parameter default_sections_opened:

nelmio_api_doc.default_sections_opened: false

Default value for this parameter is true. See configuration reference.

Lukas Hajdu
  • 806
  • 7
  • 18
0

You must change your config.yml file like this (default_sections_opened to false):

nelmio_api_doc:
   name: 'API documentation'
   exclude_sections:     []
   **default_sections_opened:  false**
  motd:
    template:             'NelmioApiDocBundle::Components/motd.html.twig'
  request_listener:
    enabled:              true
    parameter:            _doc
  sandbox:
    enabled:              false