Skip to content

enum get represented as int in openapi generation #65610

@nielsq

Description

@nielsq

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hey everyone,
enums will are represented as integer? Should there not being a enum also in the json for that?

I have a class, called Node with an enum called Rank
Image

Here is the generated json where it´s just an integer.
Image

I also saw this issue when people use swagger, but not a solution on how to fix it here.
Any solutions?

Thanks!

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.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