duanlu0559 2018-03-14 11:09
浏览 66
已采纳

symfony APi到YAML格式的招摇


Does anyone know how to convert a API based on Symfony2 to Yaml format?
I would like to use it for Swagger.
Up until now I was using the bundle NelmioApiDocBundle

Thanks in advance

  • 写回答

1条回答 默认 最新

  • dongyu9263 2018-03-14 11:20
    关注

    if you using a Symfony 2.* and written all api's using Nelmio @ApiDoc then yes you should add this routing inside of routing.yml nelmio_api_swagger: resource: "@NelmioApiDocBundle/Resources/config/swagger_routing.yml" prefix: /api-docs

    and run php app/console api:swagger:dump

    and then access using /api-docs

    To better understanding click here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?