Swagger-php 请求注释 Headers

Swagger-php Annotations for Request Headers

我正在使用 Slim 框架在 php 中创建 Restful api。使用 Swagger-php 注释记录 api 的上午。 如何注释 api 的请求 Headers?

检查这个问题

https://github.com/zircote/swagger-php/issues/182

试试:

@SWG\Parameter(paramType="header", ...)

这一定已经改变了,因为现在对我有用:

@SWG\Parameter(
  type="string",                                                                                                                                                                              
  name="Authorization",
  in="header",
  required=true)

以防其他人偶然发现这里。