mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-14 16:46:30 +03:00
Make the nelmio/api-doc-bundle recipe works out of the box
After applying this recipe, the route "/api/doc" was loaded by default, but it requires two component (`asset` and `twig`) that are usually not require for API only project. The json route works of the box so it can be provided without additional action. I faced it and it felt strange, and it seems that others have too : https://github.com/nelmio/NelmioApiDocBundle/issues/1220
This commit is contained in:
committed by
Baptiste Lafontaine
parent
f73468fb15
commit
3f3f2c85c3
@@ -1,11 +1,12 @@
|
||||
# Requires the Asset component and the Twig bundle
|
||||
app.swagger_ui:
|
||||
path: /api/doc
|
||||
# Expose your documentation as JSON swagger compliant
|
||||
app.swagger:
|
||||
path: /api/doc.json
|
||||
methods: GET
|
||||
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }
|
||||
defaults: { _controller: nelmio_api_doc.controller.swagger }
|
||||
|
||||
# To expose your documentation as JSON
|
||||
#app.swagger:
|
||||
# path: /api/doc.json
|
||||
## Requires the Asset component and the Twig bundle
|
||||
## $ composer require composer require twig asset
|
||||
#app.swagger_ui:
|
||||
# path: /api/doc
|
||||
# methods: GET
|
||||
# defaults: { _controller: nelmio_api_doc.controller.swagger }
|
||||
# defaults: { _controller: nelmio_api_doc.controller.swagger_ui }
|
||||
|
||||
Reference in New Issue
Block a user