Skip to content

[BUG][Kotlin] Kotlin client variable name #3992

Closed
@andrewemery

Description

@andrewemery
Description

Kotlin client generates invalid variable names for reserved words.

openapi-generator version

Working in: 4.1.2
Broken in: 4.1.3-SNAPSHOT

OpenAPI declaration file content or url
responses:
  '200':
    schema:
      properties:
        data: # kotlin reserved word
          type: string

Expected:

val `data`: String

Actual:

val ``data`` String
Command line used for generation
openapi-generator generate -g kotlin
Related issues/PRs

#3899

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