Skip to content

Fix OpenAPI OperationId and add Summary/Description support#2445

Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom
codeswithfists:investigate/http-operationid-openapi
Apr 8, 2026
Merged

Fix OpenAPI OperationId and add Summary/Description support#2445
jeremydmiller merged 1 commit intoJasperFx:mainfrom
codeswithfists:investigate/http-operationid-openapi

Conversation

@codeswithfists
Copy link
Copy Markdown
Contributor

Problem

When setting OperationId on a Wolverine HTTP route attribute (e.g. [WolverineDelete("/{id}", OperationId = "DeleteStaffMember")]), the value is ignored in the generated OpenAPI document. Instead, the operationId, summary, and description fields all default to a generated filename like DELETE_id.

This happens because HttpChain implements IEndpointNameMetadata, IEndpointSummaryMetadata, and IEndpointDescriptionMetadata, but is never added to the endpoint's metadata collection — so the .NET OpenAPI document generator never sees these values.

Changes

  • Add EndpointNameMetadata(OperationId) to endpoint metadata in BuildEndpoint() so the OpenAPI generator picks up the user-provided OperationId
  • Add Summary and Description properties to WolverineHttpMethodAttribute to allow setting these in OpenAPI documentation
  • Fix IEndpointNameMetadata.EndpointName and IEndpointSummaryMetadata.Summary implementations on HttpChain to use user-provided values instead of ToString()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit af41540 into JasperFx:main Apr 8, 2026
16 of 19 checks passed
@jeremydmiller
Copy link
Copy Markdown
Member

Got it, but it took some follow up work., Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants