diff --git a/build.gradle b/build.gradle index a4c7f98..a629b2c 100644 --- a/build.gradle +++ b/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'com.azure.spring:spring-cloud-azure-starter-active-directory' implementation 'com.azure.spring:spring-cloud-azure-starter-actuator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-api:2.7.0' implementation "org.springframework:spring-aspects" implementation 'javax.cache:cache-api:1.1.1' implementation 'org.modelmapper:modelmapper:3.2.4' @@ -89,6 +89,10 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' + compileOnly "org.jspecify:jspecify:1.0.0" + annotationProcessor "org.jspecify:jspecify:1.0.0" + + // Testing dependencies testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' @@ -161,7 +165,7 @@ openApiGenerate { generateBuilders : "true", useSpringBoot3 : "true", useSpringController : "true", - useSwaggerUI : "true", + useSwaggerUI : "false", hideGenerationTimestamp: "true" ] } diff --git a/src/main/java/org/opendevstack/component_catalog/config/SecurityConfiguration.java b/src/main/java/org/opendevstack/component_catalog/config/SecurityConfiguration.java index 9d8b6e5..35f9642 100644 --- a/src/main/java/org/opendevstack/component_catalog/config/SecurityConfiguration.java +++ b/src/main/java/org/opendevstack/component_catalog/config/SecurityConfiguration.java @@ -77,7 +77,7 @@ public SecurityFilterChain aadForEverythingElse(HttpSecurity http) throws Except PathPatternRequestMatcher.withDefaults().matcher("/v1/catalog-items/*/user-actions/**"), PathPatternRequestMatcher.withDefaults().matcher("/v1/user-actions/**"), PathPatternRequestMatcher.withDefaults().matcher("/v1/schema-validation/**"), - PathPatternRequestMatcher.withDefaults().matcher("/swagger-ui/**"), + PathPatternRequestMatcher.withDefaults().matcher("/api-docs/**"), PathPatternRequestMatcher.withDefaults().matcher("/v3/api-docs/**"), PathPatternRequestMatcher.withDefaults().matcher("/v1/user-actions/**"), PathPatternRequestMatcher.withDefaults().matcher("/actuator/health") diff --git a/src/main/resources/static/api-docs/index.html b/src/main/resources/static/api-docs/index.html new file mode 100644 index 0000000..d49f497 --- /dev/null +++ b/src/main/resources/static/api-docs/index.html @@ -0,0 +1,24 @@ + + + + + API Explorer + + + + + + + + + + + + + + +