0

I want to build an UI documentation with swagger for my Restful API. this is the offitial documentation for that https://symfony.com/doc/master/bundles/NelmioApiDocBundle/index.html But i got this error Unrecognized option "areas" under "nelmio_api_doc"

#routing.yml

app.swagger_ui:
    path: vyndteam/api/doc/{areas}
    methods: GET
    defaults: { _controller: nelmio_api_doc.controller.swagger_ui }

#config.yml

nelmio_api_doc:
    areas:
        default:
            path_patterns: [^/api]
            host_patterns: [api\.]
        business:
            path_patterns: [^/business]
        admin:
            path_paterns: [^/admin]

Any suggestions?

2 Answers2

0

You must check the version of the installed bundle "nelmio_api_doc" the documentation is valid for version 3

Zied Ellouze
  • 41
  • 1
  • 10
0

Try changing this:

 path: vyndteam/api/doc/{area}
Mbotet
  • 170
  • 2
  • 17