You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Already on GitHub?
Sign in
to your account
[BUG][KOTLIN] Generated code contains "`" instead of backtick, when using parameters with reserved kotlin names (kotlin-spring)
#14026
[BUG][KOTLIN] Generated code contains "`" instead of backtick, when using parameters with reserved kotlin names (kotlin-spring)
#14026
martinvisser
opened this issue
Nov 15, 2022
· 0 comments
· Fixed by
#14027
Have you provided a full/minimal spec to reproduce the issue?
Have you validated the input using an OpenAPI validator (
example
)?
[Optional] Sponsorship to speed up the bug fix or feature request (
example
)
Description
Similar issue as
#11304
, but for generator
kotlin-spring
.
When generating kotlin code using 'kotlin-spring' generator, and one of the parameters is in reserved kotlin names, the generated code contains backtick "
" encoded as HTML entity:
in the ApiController class:
If {{paramName}} is changed to {{{paramName}}} in kotlin-spring/bodyParams.mustache, kotlin-spring/returnValue.mustache and in kotlin-spring/service.mustache the code generates successfully.
[kotlin] Add fix for wrongly encoded backticks for reserved words when generating kotlin-spring server code
#14027
[kotlin] Add fix for wrongly encoded backticks for reserved words when generating kotlin-spring server code
martinvisser/openapi-generator