The problem
When we define in routing.yml
:
my_controllers:
resource: "@MyBundle/Controller/"
type: annotation
prefix: /
and:
my_api:
resource: 'MyBundle\Controller\ApiController'
type: rest
prefix: /api
name_prefix: my_api_
options:
expose: true
We get duplicated routes in NelmioApiDoc
:
The question
How we should do this so routes from ApiController
won't be duplicated?
- exclude
ApiController
from "wildcard" resource import? - import all other controllers individually?
- other solution?