【发布时间】:2017-07-10 18:58:17
【问题描述】:
我正在尝试使用 swagger zircote 创建 swagger ui json。 对于我的应用程序,我使用 JWT,并且我的 json 中需要以下招摇代码:
"securityDefinitions": {
"Bearer": {
"in": "header",
"type": "accessToken",
"name": "Authorization"
}
},
但我不知道如何使用 swaggers zircote 创建该代码。我试过以下代码:
* @SWG\Swagger(
* schemes={"https"},
* @SWG\SecurityDefinitions(
* bearer={
* type="apiKey",
* name="Authorization",
* in="header"
* }
* ),
但这会导致以下错误:
注解“@Swagger\Annotations\SecurityDefinitions”在 第 2 行的 .\index.php 不存在,或无法自动加载。
有人可以帮助我吗,我找不到任何关于此的好的文档,也许是具体的,但我希望有人可以帮助我。
谢谢!
这个也在github上发布...https://github.com/zircote/swagger-php/issues/366
【问题讨论】:
标签: php doctrine swagger jwt bearer-token