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
ApiUtil class does not support UTF-8 response by default.
openapi-generator version
3.3.0
OpenAPI declaration file content or url
Command line used for generation
openapi-generator generate -i {filename} -g spring
Steps to reproduce
write a spec including utf-8 chars in the response example
generate spiring code using the command openapi-generator generate -i {filename} -g spring
Run the spinrg application and test the API generated by the openapi-generator
by requesting through swagger-ui web page.
The response will be 500 error, and you will get the Caused by: java.io.CharConversionException: Not an ISO 8859-1 character: [거]
( "거" is the utf-8 character(Korean) that caused this problem )
Related issues/PRs
Suggest a fix/enhancement
The generated code in the ApiUtil.java should be modified as follows:
Before:
Description
ApiUtil class does not support UTF-8 response by default.
openapi-generator version
3.3.0
OpenAPI declaration file content or url
Command line used for generation
openapi-generator generate -i {filename} -g spring
Steps to reproduce
write a spec including utf-8 chars in the response example
generate spiring code using the command
openapi-generator generate -i {filename} -g spring
Run the spinrg application and test the API generated by the openapi-generator
by requesting through swagger-ui web page.
The response will be 500 error, and you will get the Caused by: java.io.CharConversionException: Not an ISO 8859-1 character: [거]
( "거" is the utf-8 character(Korean) that caused this problem )
Related issues/PRs
Suggest a fix/enhancement
The generated code in the ApiUtil.java should be modified as follows:
Before:
After:
The text was updated successfully, but these errors were encountered: