Skip to content

Commit

Permalink
FIX : Swagger Failed to fetch error
Browse files Browse the repository at this point in the history
  • Loading branch information
gaguriee committed Jul 28, 2024
1 parent e03fcea commit 69df2e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -32,7 +33,7 @@ public OpenAPI openAPI() {
.scheme(BEARER_TOKEN_PREFIX)
.bearerFormat(securityJwtName));

return new OpenAPI()
return new OpenAPI().addServersItem(new Server().url("/"))
.addSecurityItem(securityRequirement)
.components(components);
}
Expand Down

0 comments on commit 69df2e5

Please sign in to comment.