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.Dismiss alert
{{ message }}
Repository navigation
[BUG][JAVA] Java string quotes incorrectly escaped in value strings #22629
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
This:
paths:
/endpoint:
post:
tags:
- "My \"quoted\" api"
Generates:
...
tags = { "My "quoted" api" }
...
Other inputs with similar results:
My \"quoted\" api
'My "quoted" api'
'My \"quoted\" api'
Generated code:
@Tag(name="My "quoted" api")
@Operation(tags={ "My \"quoted\" api" })
Expected generated string: "My \"quoted\" api"
Description/comment strings are correctly escaped, and are not affected.
openapi-generator version
7.12.0, 7.13.0, 7.18.0 are affected.
7.12.0 works as expected does not include the example objects in the generated interface, and therefore did not cause issues.
Activity
fix(java-spring): escape tags and tagNames in API annotations
fix(java-spring): escape tags and tagNames in API annotations
fix(java-spring): use lambdaEscapeDoubleQuote in api.mustache (#24205)