I’m using spring boot 3 with the dependency for using swagger. However, when using special characters such as : and @, it is transformed into ansi code in requests.
The swagger Config:
package com.david.poiservice.config;
import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Contact; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;
@Configuration public class SwaggerConfig {
@Bean
public OpenAPI myOpenAPI() {
License mitLicense = new License().name("MIT License").url("https://choosealicense.com/licenses/mit/");
Info info = new Info()
.title("Poi Management API")
.version("1.0")
.contact(contact)
.description("This API exposes endpoints to manage.")
.license(mitLicense);
return new OpenAPI().info(info);
}
}
The dependency:
`org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0`