-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore : 스웨거 설정 추가 * chore : 모든 API 에 스웨거 설정 추가 * fix : 만료된 예매대기 처리 스케줄러 테스트 시간 재설정
- Loading branch information
1 parent
79a1773
commit 4a5eee9
Showing
13 changed files
with
110 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
api/src/main/java/dev/hooon/common/config/SwaggerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package dev.hooon.common.config; | ||
|
||
import static org.springframework.http.HttpHeaders.*; | ||
|
||
import java.util.List; | ||
|
||
import org.springdoc.core.models.GroupedOpenApi; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import io.swagger.v3.oas.annotations.OpenAPIDefinition; | ||
import io.swagger.v3.oas.annotations.info.Info; | ||
import io.swagger.v3.oas.models.Components; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.security.SecurityRequirement; | ||
import io.swagger.v3.oas.models.security.SecurityScheme; | ||
|
||
@OpenAPIDefinition( | ||
info = @Info( | ||
title = "hooon interpark API", | ||
description = "hooon interpark API 명세", | ||
version = "v1")) | ||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public OpenAPI openAPI(){ | ||
SecurityScheme securityScheme = new SecurityScheme() | ||
.type(SecurityScheme.Type.HTTP) | ||
.in(SecurityScheme.In.HEADER).name(AUTHORIZATION); | ||
SecurityRequirement securityRequirement = new SecurityRequirement().addList(AUTHORIZATION); | ||
|
||
return new OpenAPI() | ||
.components(new Components().addSecuritySchemes(AUTHORIZATION, securityScheme)) | ||
.security(List.of(securityRequirement)); | ||
} | ||
|
||
@Bean | ||
public GroupedOpenApi chatOpenApi() { | ||
String[] paths = {"/api/**"}; | ||
|
||
return GroupedOpenApi.builder() | ||
.group("API v1") | ||
.pathsToMatch(paths) | ||
.build(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...on/common/exception/config/WebConfig.java → ...va/dev/hooon/common/config/WebConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package dev.hooon.common.exception.config; | ||
package dev.hooon.common.config; | ||
|
||
import java.util.List; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters