Skip to content

Commit

Permalink
Add extra name_patterns example to areas docs
Browse files Browse the repository at this point in the history
Add an extra `name_patterns` example to areas docs
  • Loading branch information
alexandrunastase authored and GuilhemN committed May 9, 2021
1 parent 67d6266 commit 9b258b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/doc/areas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ You can define areas which will each generates a different documentation:
path_patterns: [ ^/internal ]
commercial:
path_patterns: [ ^/commercial ]
store:
# Includes routes with names containing 'store'
name_patterns: [ store ]
Your main documentation is under the ``default`` area. It's the one shown when accessing ``/api/doc``.

Expand All @@ -48,4 +51,4 @@ Then update your routing to be able to access your different documentations:
# methods: GET
# defaults: { _controller: nelmio_api_doc.controller.swagger }
That's all! You can now access ``/api/doc/internal`` and ``/api/doc/commercial``.
That's all! You can now access ``/api/doc/internal``, ``/api/doc/commercial`` and ``/api/doc/store``.

0 comments on commit 9b258b1

Please sign in to comment.