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
  • #664
Closed
Open
Issue created Jul 27, 2018 by Administrator@rootContributor

[typescript] allow $ in var name

Created by: jmini

Description

In the OpenAPI Specification there is no limitation on the name of the properties in an object schema. Some clean-up logic is made to prevent illegal member name.

The problem is that lorem, $_lorem are all mapped to a member field called lorem

CC: @kayhuba

openapi-generator version

3.1.2

OpenAPI declaration file content or url
openapi: 3.0.1
info:
  title: A dummy title
  version: 1.0.0

paths:
  /my/endpoint:
    get:
      summary: Returns an object 
      operationId: getMyObject
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Dummy" 
components:
  schemas:
    Dummy:
      type: object
      properties:
        'lorem':
          type: string
        ‘$_lorem':
          type: string
Command line used for generation

CLI to use the typescript-node generator.

Steps to reproduce
Related issues/PRs

This was fixed by @jmini for the java client and server with commit e7410d4c

Suggest a fix/enhancement

Support $ in variable name for typescript.

Assignee
Assign to
Time tracking