Skip to content

No mapper is generated for stanadlone enum files that aren't part of any class #784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
agilob opened this issue Jan 3, 2021 · 1 comment

Comments

@agilob
Copy link

agilob commented Jan 3, 2021

No mapper is generated for an enum when the enum isn't used in any class and has its own file, but has fields annotated with @JsonValue. Since @JsonSerializable is allowed only on classes, not enums, there's no way to deserialize such enums.

Enum also has part x.g.dart, but it's never generated.

@kevmoo
Copy link
Collaborator

kevmoo commented Jul 28, 2021

Duplicate of #778

@kevmoo kevmoo marked this as a duplicate of #778 Jul 28, 2021
@kevmoo kevmoo closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants