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
Split at '/', escape the fragments only and concatenate it all back together. I am assuming that the escapeUnsafeCharacters methods are trying to somehow prevent block comments from appearing at the wrong place, which should not be a concern for the media types, so this should be safe. It would also allow to drop the custom handling of the "*/*" use case.
Activity
berlincho commentedon Nov 14, 2021
I will try to fix it!
berlincho commentedon Nov 24, 2021
The cause is
escapeUnsafeCharactersinescapeText. Different languages override the function.openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
Lines 925 to 945 in 2e47f3e
For example in Java,
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
Lines 1768 to 1771 in 2e47f3e
In Typescript,
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java
Lines 881 to 884 in 2e47f3e
berlincho commentedon Nov 24, 2021
@whydoievenneedthis Any ideas?
whydoievenneedthis commentedon Nov 24, 2021
Split at '/', escape the fragments only and concatenate it all back together. I am assuming that the escapeUnsafeCharacters methods are trying to somehow prevent block comments from appearing at the wrong place, which should not be a concern for the media types, so this should be safe. It would also allow to drop the custom handling of the "*/*" use case.