Reputation: 854
My documentation is generated using swagger UI. But I have a problem with the language. How do I set the language encoding?
v3/api-docs
Upvotes: 2
Views: 8696
Reputation: 150
I found two answers for this question, Hope that they will help you. One is for application yaml:
server:
servlet:
encoding:
force-response: true
charset: UTF-8
https://github.com/springfox/springfox/issues/3544
And the other is this Setting charset for Open Api 3.0 / Swagger v3
@Bean
public ResourceBundleMessageSource translator() {
ResourceBundleMessageSource source = new ResourceBundleMessageSource();
source.setBasenames("swagger-message");
source.setUseCodeAsDefaultMessage(true);
source.setDefaultEncoding("utf-8");
return source;
}
Setting charset for Open Api 3.0 / Swagger v3
Upvotes: 2