Skip to content

[TypeScript][FIX] Missing typescript reserved word#10587

Merged
macjohnny merged 1 commit intoOpenAPITools:masterfrom
AlexMog:fix_typescript_missing_reserved_word
Oct 19, 2021
Merged

[TypeScript][FIX] Missing typescript reserved word#10587
macjohnny merged 1 commit intoOpenAPITools:masterfrom
AlexMog:fix_typescript_missing_reserved_word

Conversation

@AlexMog
Copy link
Copy Markdown
Contributor

@AlexMog AlexMog commented Oct 13, 2021

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Fixes: #10584

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from is not a reserved TS keyword. It's just a variable that is already defined in the context of a particular template. They all are listed in the same set - just bucketed separately for readablity (see "local variable names" bucket on lines 112-113 above).

Furthermore, I believe this from is only used in a generic typescript client (TypeScriptClientCodegen), which doesn't extend this AbstractTypeScriptClientCodegen. I looks like you need to apply this change to TypeScriptClientCodegen and revert it here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed :) thanks for your input !

@AlexMog AlexMog force-pushed the fix_typescript_missing_reserved_word branch from fb6b08d to ea6f557 Compare October 19, 2021 16:51
Copy link
Copy Markdown
Contributor

@amakhrov amakhrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amakhrov
Copy link
Copy Markdown
Contributor

@macjohnny @TiFu

Copy link
Copy Markdown
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@macjohnny macjohnny merged commit c165629 into OpenAPITools:master Oct 19, 2021
@macjohnny macjohnny added this to the 5.3.0 milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] OpenAPI Param names can conflict with Typescript types

3 participants