4

I am creating a Restful api in php using Slim framework. To document the api's am using Swagger-php Annotations. How to annotate the Request Headers for a api ?

2 Answers2

10

This must have changed, because this works for me now:

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

Just in case someone else stumbles along here looking for this.

Hans
  • 3,403
  • 3
  • 28
  • 33
1

check this issue

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

try with:

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

Jose Rojas
  • 3,490
  • 3
  • 26
  • 40