Skip to content

[BUG] int values for enums #268

@MichDV

Description

@MichDV

I'm working with an API that returns integer values for enums instead of their String names. So instead of:

enum UserRole { @JsonValue('swaggerGeneratedUnknown') swaggerGeneratedUnknown, @JsonValue('Guest') guest, @JsonValue('User') user, @JsonValue('Admin') admin }

I would need this to be generated:

enum UserRole { @JsonValue(-1) swaggerGeneratedUnknown, @JsonValue(0) guest, @JsonValue(1) user, @JsonValue(2) admin }

Is this possible with this package?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions