Skip to content

[elm-client] Enums can have the same values (not allowed) #309

@andys8

Description

@andys8

Having a definition with multiple enums with the same value, will produce types with the exact same constructor in elm, which is not allowed.

    "metadata": {
      "type": "object",
      "properties": {
        "length": {
          "type": "string",
          "enum": ["short", "long"]
        },
        "size": {
          "type": "string",
          "enum": ["short", "medium"]
        }
      },
    }

Generated elm code:

type Length
    = Short
    | Long

type Size
    = Short
    | Medium

Should be:

type Length
    = LengthShort
    | LengthLong

type Size
    = SizeShort
    | SizeMedium

OpenAPI spec version: 0.4.0
Generator version 3.0.1

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