Skip to content

fix: nullpointer#5337

Merged
lahma merged 1 commit intoRicoSuter:masterfrom
MeikelLP:master
Feb 4, 2026
Merged

fix: nullpointer#5337
lahma merged 1 commit intoRicoSuter:masterfrom
MeikelLP:master

Conversation

@MeikelLP
Copy link
Contributor

@MeikelLP MeikelLP commented Feb 4, 2026

I'm trying to add endpoint definitions manually via IApiDescriptionProvider but as soon as I add ApiDescription.SupportedResponseTypes the swagger generator crashes due to a simple nullpointer.

The compiler and IDE even warns about this issue but it is ignored and this exception is expected to happen when MethodInfo ist null

Workaround

// add some MethodInfo to EndpointMetadata
ActionDescriptor = new ActionDescriptor
{
    EndpointMetadata = [MethodBase.GetCurrentMethod()!]
}

lahma-open

This comment was marked as outdated.

@lahma lahma merged commit 3d5b62b into RicoSuter:master Feb 4, 2026
3 checks passed
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.

3 participants