Skip to content

Commit

Permalink
fix: swagger base url
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloKakazu committed Oct 1, 2024
1 parent 6e72da5 commit 3b406bb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package br.com.fiap.grupo30.fastfood.infrastructure.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.servers.Server;

@Configuration
public class SwaggerConfiguration implements WebMvcConfigurer {

@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.addServersItem(new Server().url("/test"));
}
}
3 changes: 1 addition & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ spring.profiles.active=dev
spring.jpa.open-in-view=false

# SWAGGER-UI CUSTOM PATH
springfox.documentation.swagger.v2.path=/test/swagger-resources
springfox.documentation.swagger-ui.base-url=/test/swagger-ui
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.swagger-ui.tagsSorter=alpha
springdoc.swagger-ui.operationsSorter=alpha

0 comments on commit 3b406bb

Please sign in to comment.