Skip to content

[java] enum for int array initialized with strings #49

@etherealjoy

Description

@etherealjoy
Description

The generated code for the enums of int types, in an array of said enums is initialized with a string.
Compilation fails

  public enum TypeEnum {
    _0("0"),
    
    _1("1"),
    
    _2("2"),
    
    _3("3")
openapi-generator version

master

OpenAPI declaration file content or url
  TypeIds:
    type: object
    properties:
      type:
        type: array
        items:
          type: integer
          format: int32
          enum:
          - 0
          - 1
          - 2
          - 3
Command line used for generation

java -jar ./openapi-generator-cli.jar generate -i ./Api.yaml -o ./genjava -l java

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions