Fix: allow colons in TS interface property names#1152
Merged
wing328 merged 9 commits intoOpenAPITools:masterfrom Oct 3, 2018
Merged
Fix: allow colons in TS interface property names#1152wing328 merged 9 commits intoOpenAPITools:masterfrom
wing328 merged 9 commits intoOpenAPITools:masterfrom
Conversation
macjohnny
approved these changes
Oct 1, 2018
| return name; | ||
| } | ||
|
|
||
| private boolean hasIllegalCharacters(String name) { |
Member
There was a problem hiding this comment.
a description in which context the characters are "illegal" would be nice
Member
macjohnny
reviewed
Oct 1, 2018
|
|
||
| private boolean hasIllegalCharacters(String name) { | ||
| /** | ||
| * Checks whether illegal characters are present in the given param |
Member
There was a problem hiding this comment.
what is an illegal character and why?
macjohnny
approved these changes
Oct 1, 2018
Contributor
Author
|
@macjohnny this PR is now complete |
macjohnny
approved these changes
Oct 2, 2018
wing328
reviewed
Oct 2, 2018
| return name; | ||
| } | ||
|
|
||
| @Override() |
Member
There was a problem hiding this comment.
@smasala what about updating toParamName with the code logic in toVarName (line 167 to 186) and then toVarName will call toParamName instead before the additional propertyHasBreakingCharacters check?
Contributor
Author
There was a problem hiding this comment.
@wing328 and then leaving the toPropertyName completely out?
wing328
approved these changes
Oct 2, 2018
Contributor
Author
|
Thanks @wing328 and @macjohnny |
A-Joshi
pushed a commit
to ihsmarkitoss/openapi-generator
that referenced
this pull request
Feb 27, 2019
* Allow colons in interface property names: OpenAPITools#1080 * replace tabs with spaces * add docs * add example in doc * update docs * update docs * remove language specific docs in DefaultCodegen * Delete addPet-BodyParams.csv * remove toPropertyName and update toVarName instead for TS
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developed with @Xyaren
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master(3.3.x),4.0.x. Default:master.@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09)
Description of the PR
Fix latest version by adding single quotes to properties with colons.
Example:
Original issue: #1080