FINERACT-835: Upgrade Swagger and automatically generate the JSON spec (#1069)

Co-authored-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
This commit is contained in:
Petri Tuomola
2020-06-20 13:21:46 +02:00
committed by GitHub
co-authored by Michael Vorburger ⛑️
parent e234980cd3
commit 7ec5229e23
18 changed files with 92 additions and 301 deletions
@@ -34,5 +34,11 @@ public class WebFrontEndConfiguration implements WebMvcConfigurer {
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**").addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS);
}
// TODO: The below path should be version agnostic
String[] SWAGGER_RESOURCE_LOCATIONS = { "classpath:/static/swagger-ui/",
"classpath:/META-INF/resources/webjars/swagger-ui-dist/3.26.0/" };
registry.addResourceHandler("/swagger-ui/**").addResourceLocations(SWAGGER_RESOURCE_LOCATIONS);
}
}