mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-20 11:56:25 +03:00
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
13 lines
400 B
YAML
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 }
|