Fix: allow colons in TS interface property names#1152
Fix: allow colons in TS interface property names#1152wing328 merged 9 commits intoOpenAPITools:masterfrom
Conversation
| return name; | ||
| } | ||
|
|
||
| private boolean hasIllegalCharacters(String name) { |
There was a problem hiding this comment.
a description in which context the characters are "illegal" would be nice
|
@smasala you need to replace the tab with spaces in https://github.com/OpenAPITools/openapi-generator/pull/1152/files#diff-328108658e03bbcf6cc8b931ffa7a63eR201 |
|
|
||
| private boolean hasIllegalCharacters(String name) { | ||
| /** | ||
| * Checks whether illegal characters are present in the given param |
There was a problem hiding this comment.
what is an illegal character and why?
|
@macjohnny this PR is now complete |
| return name; | ||
| } | ||
|
|
||
| @Override() |
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?
There was a problem hiding this comment.
@wing328 and then leaving the toPropertyName completely out?
|
Thanks @wing328 and @macjohnny |
* 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
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