Skip to content

[BUG][Dart] How to force generator to use String instead of EnumClass for enums #8536

@vasilich6107

Description

@vasilich6107

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I'm trying to use --type-mappings enum=String to force generator to use String instead of EnumClass for enums.
But there is no difference in output. May be I'm doing something wrong...

openapi-generator version

5.0.0

OpenAPI declaration file content or url

Gist with json schema
https://gist.github.com/vasilich6107/c511a8e185e4a8aac4d7112e8282fa9d

OpenAPI declaration file content or url
pubName: api
pubVersion: 1.0.0+1
pubDescription: "api"
Generation Details

java -jar openapi-generator-cli.jar generate -i api.json -g dart-dio -c config.yaml --enable-post-process-file --type-mappings enum=String

Steps to reproduce
  1. Run open api generation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions