FINERACT-1480: Fix Swagger UI broken by incremental build
This commit is contained in:
committed by
Petri Tuomola
parent
ab6323e474
commit
4d879eddc4
@@ -247,6 +247,8 @@ bootRun {
|
||||
dependencies {
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.3'
|
||||
}
|
||||
|
||||
classpath += files("build/generated/swagger-ui")
|
||||
}
|
||||
|
||||
springBoot {
|
||||
@@ -266,6 +268,14 @@ bootJar {
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
from('build/generated/swagger-ui') {
|
||||
include '*'
|
||||
}
|
||||
}
|
||||
|
||||
jar.dependsOn resolve
|
||||
|
||||
jib {
|
||||
from {
|
||||
image = 'azul/zulu-openjdk-alpine:17'
|
||||
|
||||
+2
-1
@@ -46,7 +46,8 @@ public class WebFrontEndConfiguration implements WebMvcConfigurer {
|
||||
LOG.info("Found Swagger UI at {}", fullPathToSwaggerUiJs);
|
||||
String fullPathToSwaggerUi = fullPathToSwaggerUiJs.substring(0, fullPathToSwaggerUiJs.lastIndexOf("/") + 1);
|
||||
|
||||
final String[] swaggerResourceLocations = { "classpath:/static/swagger-ui/", "classpath:" + fullPathToSwaggerUi };
|
||||
final String[] swaggerResourceLocations = { "classpath:/static/swagger-ui/", "classpath:fineract.yaml",
|
||||
"classpath:" + fullPathToSwaggerUi };
|
||||
|
||||
registry.addResourceHandler("/swagger-ui/**").addResourceLocations(swaggerResourceLocations);
|
||||
}
|
||||
|
||||
@@ -43,10 +43,6 @@ war {
|
||||
}
|
||||
enabled = true
|
||||
classifier = ''
|
||||
|
||||
from('$rootDir/fineract-provider/build/generated/swagger-ui') {
|
||||
into 'BOOT-INF/classes/static/swagger-ui'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ public class SwaggeruiTest {
|
||||
public void testSwaggeruiAccess() {
|
||||
Utils.performServerGet(requestSpec, responseSpec, "/fineract-provider/swagger-ui", null);
|
||||
Utils.performServerGet(requestSpec, responseSpec, "/fineract-provider/swagger-ui/index.html", null);
|
||||
Utils.performServerGet(requestSpec, responseSpec, "/fineract-provider/swagger-ui/fineract.yaml", null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user