Files
symfony-flex-recipes-contrib/nelmio/api-doc-bundle/3.0/config/routes/nelmio_api_doc.yaml
T
Baptiste LafontaineandBaptiste Lafontaine 3f3f2c85c3 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
2018-04-17 08:27:37 +02:00

13 lines
400 B
YAML

# Expose your documentation as JSON swagger compliant
app.swagger:
path: /api/doc.json
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger }
## 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_ui }