-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Operation parameter defaults for enums don't get passed through as raw values.
Therefore, when a reserved Kotlin keyword is set as the default value of that parameter, Mustache will html-escape the backticks, generating invalid code.
This is true for all clients.
openapi-generator version
master
OpenAPI declaration file content or url
...
"paths": {
"/documents": {
"get": {
"operationId": "document-download",
"parameters": [
{
"name": "disposition",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "inline",
"enum": [
"attachment",
"inline"
]
}
}
]
}
... generates
fun documentDownload(disposition: DispositionDocumentDownload? = DispositionDocumentDownload.`inline`) : java.io.File