Skip to content

Commit

Permalink
#11 Adding swagger URL value
Browse files Browse the repository at this point in the history
  • Loading branch information
josdem committed Aug 23, 2023
1 parent 859a8b9 commit ee8fcc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/com/josdem/catcher/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.servers.Server;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

Expand All @@ -12,8 +13,11 @@
@RequiredArgsConstructor
public class SwaggerConfig {

@Value("${swagger.server}")
private String swaggerServer;

@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI().servers(Arrays.asList(new Server().url("https://catcher.josdem.io")));
return new OpenAPI().servers(Arrays.asList(new Server().url(swaggerServer)));
}
}
5 changes: 4 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
interceptor.enabled: false
swagger:
server: "https://catcher.josdem.io"
interceptor:
enabled: false

0 comments on commit ee8fcc1

Please sign in to comment.