Ask a Question

Reusing the Header Parameter

Frequent Visitor

Reusing the Header Parameter

I need to add the Authorization parameter to every endpoint in my document. To avoid repetition, I did create a `parameter` section in the `components` as the following and linked it at the required place:

  name: authorization
  in: header
  description: ''
  required: true
   type: string
   example: '<your_api_key_token>'


But then I get a message that reads "Header parameters named Authorization are ignored..." Is there any way to solve this. Please bear in mind that the limitation I have is I need to add the Authorization  information in every endpoint and I have some 100 endpoints. 



Have you tried securing your endpoints using one of the security requirement objects? 


It seems that the issue is the fact that the header parameter is named authorization. Could you try naming the parameter something else?

SmartBear Alumni (Retired)

@nrrayengar The "Authorization" header must be defined as a security scheme rather than a parameter. In your example, you need to define it as an API key. Check out the examples in:


Helen Kosova
SmartBear Documentation Team Lead
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Showing results for 
Search instead for 
Did you mean: