OpenAPI: OperationId not set when EndpointName attribute is not available #59053
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
feature-openapi
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
Status: Resolved
Is there an existing issue for this?
Describe the bug
When generating an
openapi.json
usingMicrosoft.AspNetCore.OpenApi
andMicrosoft.Extensions.ApiDescription.Server
the OperationId will not be set automically when theEndpointName
attribute is not present.openapi.json
is based on controllers in AspNetCore.Expected Behavior
Expected that OperationId is set following bullet points below. OperationId would be generating following third bullet point.
#54598
o The HTTP method associated with the operation stringified (GET, POST, etc.)
o If route segments exist on the application, the route segment values concatenated by _.
o If the route segments contain parameters, use the parameter name sans any constraints.
Steps To Reproduce
Reproduce using following repository:
https://github.com/hoekstrit/microsoft.openapi.operationid
After building the project/solution it will result in following openapi.json
Exceptions (if any)
No response
.NET Version
9.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered: