swagger-api / swagger-api/swagger-codegen

swagger-codegen online generator replacing hyphen with underscore for typescript-node

Open
#10,422 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

swagger-codegen online generator replacing hyphen with underscore for typescript-node

Swagger-codegen version

2.4.15

Swagger declaration file content or url
"customer-email-addressLst": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/customer-email-address"
          }
        }
Command line used for generation

https://generator.swagger.io/ with language as typescript-node

Steps to reproduce

Generate code with this payload
{ "spec": {}, "options": { "allowUnicodeIdentifiers": "true" "modelPropertyNaming": "original", "supportsES6": "true" } }

Related issues/PRs

NA

Suggest a fix/enhancement

Manually replaced underscores to hyphen in generated code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through https://generator.swagger.io/ with language set to typescript-node, Swagger-codegen 2.4.15, and the provided model property containing hyphens. Inspect the generated TypeScript for customer-email-addressLst and customer-email-address, then determine whether the naming options are honored. Done means hyphenated names are preserved as expected without manual replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.