How about a header parameter?
Use @SWG\Parameter(paramType="header", ...)
Thanks. Anyway there is an interesting issue. It does not able to send the head if it is "Accept", but "accept" works.
Strange, maybe the"Accept" is reserved for @SWGConumes and @SWGProduces
@SWG\Resource(
... ,
produces="['application/json','application/xml']"
)
Nevermind.
Anyway, the docs should contain the header and the form type too in the Parameter sections. Now it looks like this: paramType body|query|path
swagger-php 2.x @SWG\Parameter(in="header") which is beter documented.
How can I define header in Definition? I want to pass headers in all APIs and want a common Definition which can be called from Definition directly
For whom is new here, it changed. Use it with in="header"
* @SWG\Parameter(
* name="x-id",
* in="header",
* description="ID",
* required=true,
* type="string",
* ),
How can I define header in Definition? I want to pass headers in all APIs and want a common Definition which can be called from Definition directly
have u solve this problem?
Most helpful comment
How can I define header in Definition? I want to pass headers in all APIs and want a common Definition which can be called from Definition directly