Skip to content
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

Class models instead of Dart enums #168

Open
poka-IT opened this issue Dec 5, 2024 · 0 comments
Open

Class models instead of Dart enums #168

poka-IT opened this issue Dec 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@poka-IT
Copy link

poka-IT commented Dec 5, 2024

Description of the bug

When generating Dart code from OpenAPI specifications, enum types are generated as class models instead of proper Dart enums. This makes the code less idiomatic and harder to use with Dart's pattern matching and switch expressions.

Steps to reproduce

  • Create an OpenAPI spec with an enum definition
  • Run the generator with Dart output
  • Check the generated files

Annotation used

I'm using CLI tool

Expected behavior

The generator should create proper Dart enums using the enum keyword for OpenAPI enum definitions.

Library version

6.0.0

Flutter version

3.24

Flutter channel

stable

@poka-IT poka-IT added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant