-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from taco-official/KL-63/swagger-연동
feat(KL-63): connect Swagger
- Loading branch information
Showing
7 changed files
with
75 additions
and
39 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
28 changes: 28 additions & 0 deletions
28
src/main/java/taco/klkl/global/config/swagger/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,28 @@ | ||
package taco.klkl.global.config.swagger; | ||
|
||
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 lombok.RequiredArgsConstructor; | ||
|
||
@OpenAPIDefinition( | ||
info = @Info(title = "끼룩끼룩 API 명세서", | ||
description = "TACO 끼룩끼룩 API 명세서", | ||
version = "v1")) | ||
@RequiredArgsConstructor | ||
@Configuration | ||
public class SwaggerConfig { | ||
@Bean | ||
public GroupedOpenApi KlklOpenApi() { | ||
// "/v1/**" 경로에 매칭되는 API를 그룹화하여 문서화한다. | ||
String[] paths = {"/v1/**"}; | ||
|
||
return GroupedOpenApi.builder() | ||
.group("끼룩끼룩 API v1") // 그룹 이름을 설정한다. | ||
.pathsToMatch(paths) // 그룹에 속하는 경로 패턴을 지정한다. | ||
.build(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
spring: | ||
# H2 Setting Info (H2 Console에 접속하기 위한 설정정보 입력) | ||
h2: | ||
console: | ||
enabled: true # H2 Console을 사용할지 여부 (H2 Console은 H2 Database를 UI로 제공해주는 기능) | ||
path: /h2-console # H2 Console의 Path | ||
# Database Setting Info (Database를 H2로 사용하기 위해 H2연결 정보 입력) | ||
datasource: | ||
driver-class-name: org.h2.Driver | ||
url: jdbc:h2:mem:klkldb | ||
username: sa | ||
password: | ||
jpa: | ||
database-platform: org.hibernate.dialect.H2Dialect | ||
hibernate: | ||
ddl-auto: create | ||
properties: | ||
hibernate: | ||
show-sql: true | ||
format-sql: true |
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,16 @@ | ||
spring: | ||
springdoc: | ||
swagger-ui: | ||
tags-sorter: alpha | ||
operations-sorter: method | ||
path: /swagger-ui/index.html | ||
disable-swagger-default-url: true | ||
display-query-params-without-oauth2: true | ||
doc-expansion: none | ||
urls-primary-name: KLKL API DOCS | ||
api-docs: | ||
path: /api-docs | ||
default-consumes-media-type: application/json;charset=UTF-8 | ||
default-produces-media-type: application/json;charset=UTF-8 | ||
paths-to-match: | ||
- /v1/** |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
spring: | ||
profiles: | ||
include: | ||
- h2 | ||
- swagger | ||
|
||
application: | ||
name: klkl |