Neoteroi / BlackSheep

Fast ASGI web framework for Python
https://www.neoteroi.dev/blacksheep/
MIT License
1.8k stars 75 forks source link

Exclude Acccept, Content-type and Authorization header from OpenAPI docs #504

Open ticapix opened 6 days ago

ticapix commented 6 days ago

Hello,

Based on the OpenAPI specs, some headers are not supposed to be listed directly as parameters https://swagger.io/docs/specification/describing-parameters/#header-parameters

From the doc here https://www.neoteroi.dev/blacksheep/binders/#built-in-binders, the Accept header will generate the following openapi.json content which is invalid according to the OpenAPI specs.

The warning message comes from the swagger tool.

image

The proposal is to exclude the content-type, accept, authorization header from the parameters configuration.

Best regards, Pierre