Skip to content

Fixes invalid Kotlin client variable names for reserved words #3993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

andrewemery
Copy link
Contributor

The Kotlin Multiplatform client introduced an bug that rendered variable names that were also Kotlin reserved words incorrectly. This change reverts the template to use the previous mechanism for rendering variable names.

#3992

The Kotlin Multiplatform client introduced an bug that rendered variable
names that were also Kotlin reserved words incorrectly. This change reverts
the template to use the previous mechanism for rendering variable names.

OpenAPITools#3992
@andrewemery
Copy link
Contributor Author

@wing328 Apologies. I introduced a breaking change to Kotlin clients with the addition of Kotlin Multiplatform.

The original branch (from Swagger Codegen) required a workaround to escape Kotlin identifiers. This workaround is no longer necessary (on OpenAPI) and breaks existing Kotlin clients that have identifers that are Kotlin reserved words.

This change removes the workaround in favour of the existing approach.

@wing328
Copy link
Member

wing328 commented Oct 1, 2019

Apologies. I introduced a breaking change to Kotlin clients with the addition of Kotlin Multiplatform.

That's ok. Thanks for letting us know and the quite fix.

@wing328 wing328 added this to the 4.1.3 milestone Oct 1, 2019
@wing328
Copy link
Member

wing328 commented Oct 1, 2019

The fix looks good.

@wing328 wing328 merged commit 44f482f into OpenAPITools:master Oct 1, 2019
Jesse0Michael pushed a commit to Jesse0Michael/openapi-generator that referenced this pull request Oct 3, 2019
…ITools#3993)

The Kotlin Multiplatform client introduced an bug that rendered variable
names that were also Kotlin reserved words incorrectly. This change reverts
the template to use the previous mechanism for rendering variable names.

OpenAPITools#3992
@wing328
Copy link
Member

wing328 commented Oct 4, 2019

@andrewemery thanks for the PR, which has been included in the v4.1.3 release: https://twitter.com/oas_generator/status/1180123829626003456

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.

2 participants