Skip to content

Commit

Permalink
fix : swagger에 보안 요구사항 명시적 설정 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh1215 authored Nov 13, 2024
1 parent d10f514 commit cccfb8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/pictalk/global/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand All @@ -30,7 +31,8 @@ public OpenAPI openAPI() {
return new OpenAPI()
.components(new Components())
.info(customOpenAPI())
.addServersItem(server);
.addServersItem(server)
.addSecurityItem(new SecurityRequirement().addList("JWT"));
}

public Info customOpenAPI() {
Expand Down

0 comments on commit cccfb8d

Please sign in to comment.