简体   繁体   English

如何在Swagger中启用授权。?

[英]How to enable authorize in Swagger.?

In my project, the api_platform.yaml file is created in the routes folder, not in the packages folder.在我的项目中,api_platform.yaml 文件是在 routes 文件夹中创建的,而不是在 packages 文件夹中。 I can't make changes to api_platform.yaml.我无法更改 api_platform.yaml。

  1. I moved api_platform.yaml file from routes folder to packages folder swagger didn't work.我将 api_platform.yaml 文件从 routes 文件夹移动到 packages 文件夹 swagger 没有用。
  2. I tried localizing the api_platform.yaml file and it didn't work.我尝试本地化 api_platform.yaml 文件,但没有成功。

Try reinstalling API Platform from scratch :尝试 从头开始重新安装 API 平台:

symfony new my-new-app
cd my-new-app
composer require api

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM