swagger-api / swagger.io-docs

The content of swagger.io
https://swagger.io/docs/
1.56k stars 397 forks source link

Add example for getting map of all header values as parameter #338

Open ustundag opened 1 year ago

ustundag commented 1 year ago

Hi, I have spent so much time browsing the internet to find a way how to get all headers as a map via Swagger Openapi. Unfortunately, I found nothing so far.

I tried one of our endpoint definitions where we get a map as a request parameter. I have just changed the name value with the headers keyword, and it worked!

Thus, I wanted the documentation to be updated with this additional example, to prevent people from wasting so much time like me.

ustundag commented 1 year ago

By the way, I couldn't find where to update documentation 3.0. It would be better to add this into 3.0 docs as well.