Skip to content

[Angular-typescript] Regression/bug: Parameters with an _ ignore naming convention  #7262

@HermenOtter

Description

@HermenOtter
Description

Parameters with an _ ignore naming convention since a few days. This bug occurred a few months ago as well and has been fixed at the time.

Swagger-codegen version

master(54ce4ca and 8ae1184) are not working as expected.

Swagger declaration file content or url
/sadr/v1/soorten_adres/{code_soort_adres}:
    parameters:
    - name: "code_soort_adres"
      in: "path"
      required: true
      type: "string"
Command line used for generation

java -jar swagger-codegen-cli.jar generate -i https://api.swaggerhub.com/apis/Centric/Belastingen_Subjecten/0.2.4 -l typescript-angular -c=./SCGConf.md

SCGConf.md
{"modelPropertyNaming": "original"}

Code generation
Generates code_soort_adres as parameter for the method, but when used in that same method it is called as codeSoortAdres which obviously doesn't work.

public getSoortenAdresByCode(code_soort_adres: string,
return this.httpClient.get<any>(${this.basePath}/.../${encodeURIComponent(String(codeSoortAdres))}

Related issues/PRs

7201, regression

Suggest a fix/enhancement

I believe it is has something to do with issue 7201.

@wing328 @JFCote @kenisteward

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions