Skip to content

Microsoft.AspNetCore.OpenApi 10.0.2: Missing Enum description #65067

@rdeveen

Description

@rdeveen

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After updating from Microsoft.AspNetCore.OpenApi 10.0.1 to 10.0.2 the OpenApi specification is missing the enum description.

[Description("My enum description")]
public enum MyEnum
{
    None,
    FirstOption,
    SecondOption
}

In v10.0.1

"MyEnum": {
  "enum": [
    "None",
    "FirstOption",
    "SecondOption"
  ],
  "description": "My enum description"
}

In v10.0.2

"MyEnum": {
  "enum": [
    "None",
    "FirstOption",
    "SecondOption"
  ]
}

Expected Behavior

"MyEnum": {
  "enum": [
    "None",
    "FirstOption",
    "SecondOption"
  ],
  "description": "My enum description"
}

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

10.0.100

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions