Skip to content

Minimal does not set response type nullability #58681

Open
@mikekistler

Description

@mikekistler

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

If a minimal API app returns null / sets the response body to null, the response body sent on the wire is "null", but the generated OpenAPI does not indicate that the response body is nullable.

Expected Behavior

The response body type should specify nullable: true if the response could be "null".

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0.100-rc.1.24452.12

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbugThis issue describes a behavior which is not expected - a bug.feature-openapi

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions