Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #309
Closed
Open
Issue created Jun 13, 2018 by Administrator@rootContributor

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

Created by: 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

Assignee
Assign to
Time tracking