How to add examples/API key values in swagger document
I want to add the header key as X-API-KEY and I want to add the value of that header, so as of now in the document I have seen how to add the key of the header but I have no idea how to add the value of the header, can anyone give me the solution for this?
ApiKeyAuth: # arbitrary name for the security scheme
in: header # can be "header", "query" or "cookie"
name: X-API-KEY # name of the header, query parameter or cookie
Hi @chichepo ,
As you see in the above picture we are using `apikey`
There I am able to see the name:X-API-KEY as the key of the header, If I want to add the value of the header like value:abcdef12345 in swagger documentation, How can I add that?
Pardon me, I missed the fact that you were in securityScheme.
I am not sure you can.
You are going to expose a kind of "sensitive" data.
In another hand, you may try to define a "Template" for the field (i.e.: APIKEY) to document the expected field content.
Let us know if you find something