Skip to content

[Java] Bug generating Java model with '_class' property #4236

@menchauser

Description

@menchauser
Description

This issue is similar to #2841. swagger-codegen may produce invalid code for model like

  test:
    type: object
    properties:
      '_class':
        type: string

Result code contains inelligible overload for method Object.getClass():

    public String getClass() {
        return _class;
    }
Swagger-codegen version

Latest (2.2.2-SNAPSHOT)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions