Cześć.
Tworzę dokumentację w Symfony 5 na bibliotece NelmioApiDocBundle. Problem w tym, że ciągle wywala mi taki błąd:
The controller for URI "/rest/doc" is not callable: Controller "nelmio_api_doc.controller.swagger" does neither exist as service nor as class.
Moja konfiguracja routes.yaml:
api_login_check:
path: /api/login_check
app.swagger_ui:
path: /rest/doc
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger }
app.swagger:
path: /rest/doc.json
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger }
oraz konfiguracja composer.json:
"require": {
"php": "^7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.2",
"lexik/jwt-authentication-bundle": "^2.6",
"nelmio/api-doc-bundle": "^3.6",
"sensio/framework-extra-bundle": "^5.5",
"symfony/asset": "5.0.*",
"symfony/console": "5.0.*",
"symfony/dotenv": "5.0.*",
"symfony/event-dispatcher": "5.0.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "5.0.*",
"symfony/http-kernel": "5.0.*",
"symfony/mercure-bundle": "^0.2.3",
"symfony/polyfill-uuid": "^1.15",
"symfony/serializer-pack": "^1.0",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/twig-bundle": "5.0.*",
"symfony/yaml": "5.0.*"
},
"require-dev": {
"behat/behat": "^3.6",
"behat/mink": "^1.8",
"coduo/php-matcher": "^4.0",
"dama/doctrine-test-bundle": "^6.3",
"doctrine/doctrine-fixtures-bundle": "^3.3",
"fzaninotto/faker": "^1.9",
"phpunit/phpunit": "^9.1",
"symfony/debug": "4",
"symfony/maker-bundle": "^1.14",
"symfony/phpunit-bridge": "^5.0"
},
Z góry dziękuje za podpowiedź i wskazówki.