-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
There is a controller endpoint with request parameters. One of the request parameters is taken from the request header and is therefore decorated with the [FromHeader] attribute. The parameter is described in the controller method comments in a param element just like all the other request parameters. The setting GenerateDocumentationFile is on in the API project and the XML documentation is correctly generated to the build output folder and the documentation includes the header parameter description.
However, when generating the Open API JSON document at run-time, the header parameter description is missing from the output.
Expected Behavior
All the parameter descriptions are in the Open API documentation, including header parameters.
Steps To Reproduce
Create a new API project with Open API support.
Add a controller method with a header parameter.
Document the controller method in code comments.
Turn on documentation file generation for the project.
Start the API,
Execute Open API documentation generation.
Exceptions (if any)
No response
.NET Version
10.0
Anything else?
No response