diff --git a/backend/pom.xml b/backend/pom.xml index f162908bc..218e73248 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -161,7 +161,7 @@ - http://localhost:8080/v3/api-docs + http://localhost:8080/api/v3/api-docs openapi.json ${project.build.directory} diff --git a/backend/src/main/java/com/openisle/config/SecurityConfig.java b/backend/src/main/java/com/openisle/config/SecurityConfig.java index 72421850c..0f292634e 100644 --- a/backend/src/main/java/com/openisle/config/SecurityConfig.java +++ b/backend/src/main/java/com/openisle/config/SecurityConfig.java @@ -110,7 +110,7 @@ public class SecurityConfig { .authorizeHttpRequests(auth -> auth .requestMatchers(HttpMethod.OPTIONS, "/**").permitAll() .requestMatchers("/api/ws/**", "/api/sockjs/**").permitAll() - .requestMatchers("/v3/api-docs/**").permitAll() + .requestMatchers("/api/v3/api-docs/**").permitAll() .requestMatchers(HttpMethod.POST, "/api/auth/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/posts/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/comments/**").permitAll() @@ -182,7 +182,7 @@ public class SecurityConfig { } } else if (!uri.startsWith("/api/auth") && !publicGet && !uri.startsWith("/api/ws") && !uri.startsWith("/api/sockjs") - && !uri.startsWith("/v3/api-docs")) { + && !uri.startsWith("/api/v3/api-docs")) { response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); response.setContentType("application/json"); response.getWriter().write("{\"error\": \"Missing token\"}"); diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index b0f9a0a79..9c065cb28 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -99,7 +99,7 @@ rabbitmq.sharding.enabled=true # springdoc-openapi-starter-webmvc-api # see https://springdoc.org/#springdoc-openapi-core-properties -springdoc.api-docs.path=/v3/api-docs +springdoc.api-docs.path=/api/v3/api-docs springdoc.api-docs.enabled=true springdoc.info.title=OpenIsle springdoc.info.description=OpenIsle Open API Documentation