Skip to content

Class models instead of Dart enums #168

Open
@poka-IT

Description

@poka-IT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions