-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter Illegal Header Fields #615
Comments
it doesn't seem to be enforced for even minimal apis. just tried the following: app.MapGet("/test", ([FromHeader] string accept) => Results.Ok(accept)); nswag generated a header parameter without any complains. i pasted the generated swagger.json into https://editor.swagger.io/ so i'm not sure if FE needs to worry about it if nobody else pays any attention to it... swagger ui seems to just ignore any values entered in to these input boxes anyway. |
Well I was going to create an Issues there too, just started here, because you generally try to make things better than the others :-) Some people/projects are pretty picky, when it comes to the formal correctness of specs. So I currently had to remove the headers in question from the typed Request object and access them by Edit: |
yeah i'll guess we should do it. |
@drothmaler This has been implemented in |
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
andAuthorization
) are described using other OpenApi fields.The FastEndpoints Swagger generation should respect/filter that, when processing properties marked with
FromHeader
.The text was updated successfully, but these errors were encountered: