[BUG] Kotlin escaped reserved words have HTML entities not backticks
Created by: dalewking
Description
Note that this is difficult to express without markdown translating what I enter.
Kotlin supports escaping reserved words by surrounding it with backticks as in `data`
I have an API that has a parameter named data that is a reserved word in Kotlin and the generator is recognizing that it is reserved, but when the source file is written the backticks are being turned into HTML character entities.
So instead of seeing `data` in the code what I see is `data`
openapi-generator version
4.2.1
OpenAPI declaration file content or url
Here is the URL of the API I am trying to work with: https://api.youneedabudget.com/papi/spec-v1-swagger.json
Command line used for generation
Gradle.kts declaration I am using:
val swaggerInput = file("ynab-v1-swagger.json")
val swaggerOutputDir = file("build/swagger")
openApiGenerate {
inputSpec.set(swaggerInput.toString())
outputDir.set(swaggerOutputDir.toString())
generatorName.set("kotlin")
invokerPackage.set("mypackage.ynab.client")
modelPackage.set("mypackage.ynab.client.model")
apiPackage.set("mypackage.client.api")
configOptions.put("dateLibrary", "java8")
}
Steps to reproduce
Generate kotlin code of an API that uses a reserved word