RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.62k stars 1.23k forks source link

Filter Illegal Header Fields #4792

Open drothmaler opened 4 months ago

drothmaler commented 4 months ago

According to the OpenApi Spcec there are certain header parameters, that are not allowed as part of the regular parameters specification in the Swagger Spec. These Headers (Accept, Content-Type and Authorization) are described using other OpenApi fields.

The NSwag Swagger generation should respect/filter that, when processing properties marked with FromHeader.