Skip to content

isEnum returns false when enum is referenced #7763

@kolisko

Description

@kolisko
Description

When is defined enum as standalone type and is referenced from elsewhere, template var isEnum is set to false.

Swagger-codegen version
<dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-codegen-cli</artifactId>
            <version>2.3.1</version>
        </dependency>
Swagger declaration file content or url
definitions:
 UIDocumentsOverviewLock:
    type: object
    properties:
      action:
        $ref: '#/definitions/InvalidateDocsAction'
 InvalidateDocsAction:
    type: string
    enum:
      - FINAL
      - INDIVIDUALIZED
      - FC_NOT_INDIVIDUALIZED
      - FC_AND_INDIVIDUALIZED
Command line used for generation
Steps to reproduce

in mustasche template is isEnum false on property 'action' and should be true because InvalidateDocsAction is defined as enum.

Related issues/PRs
Suggest a fix/enhancement

Checking the referenced class type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions