Skip to content

Commit

Permalink
swagger dependecy를 제거하고 open api로 변경한다
Browse files Browse the repository at this point in the history
  • Loading branch information
anjeongkyun committed Nov 12, 2023
1 parent dc4f718 commit 86ea65b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 53 deletions.
3 changes: 1 addition & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ project(":api") {
implementation("io.jsonwebtoken:jjwt-jackson:0.11.5")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")

implementation("io.springfox:springfox-swagger-ui:3.0.0")
implementation("io.springfox:springfox-boot-starter:3.0.0")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")

implementation("org.jetbrains.kotlin:kotlin-reflect")

Expand Down
19 changes: 19 additions & 0 deletions api/src/main/kotlin/org/tagwonder/configs/OpenApiConfig.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.tagwonder.configs

import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Info
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration


@Configuration
open class OpenApiConfig {
@Bean
open fun openAPI(): OpenAPI {
val info: Info = Info()
.version("v1.0.0")
.title("Tag Wonder Api Document")
return OpenAPI()
.info(info)
}
}
43 changes: 0 additions & 43 deletions api/src/main/kotlin/org/tagwonder/configs/SwaggerConfig.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.tagwonder.controllers

import io.swagger.annotations.ApiImplicitParam
import io.swagger.annotations.ApiOperation
import io.swagger.v3.oas.annotations.Operation
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
Expand All @@ -14,9 +13,7 @@ import org.tagwonder.usecases.commands.SignInOAuthCommandExecutor
class MemberController(
private val signInOAuthCommandExecutor: SignInOAuthCommandExecutor
) {

@ApiOperation(value = "카카오 로그인", notes = "로그인 요청 후 있으면 로그인, 없으면 회원가입합니다.")
@ApiImplicitParam(name = "command", value = "카카오 인가(authorization) 코드")
@Operation(summary = "카카오 로그인", description = "로그인 요청 후 있으면 로그인, 없으면 회원가입합니다.")
@PostMapping("/sign-in/kakao")
fun signInKakao(
@RequestBody command: SignInKakaoOauth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.tagwonder.controllers

import io.swagger.annotations.ApiOperation
import io.swagger.v3.oas.annotations.Operation
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.*
import org.tagwonder.commands.CreateTagsApiCommand
Expand All @@ -20,7 +20,7 @@ class TagController(
private val authTokenGenerator: AuthTokenGenerator
) {

@ApiOperation(value = "태그 복수 생성")
@Operation(summary = "태그 복수 생성")
@PostMapping("/tags")
fun createTags(
@RequestHeader(value = "Authorization", required = true) authToken: String,
Expand All @@ -38,7 +38,7 @@ class TagController(
}
}

@ApiOperation(value = "태그 전체 조회")
@Operation(summary = "태그 전체 조회")
@GetMapping("/tags")
fun getTags(
@RequestHeader(value = "Authorization", required = true) authToken: String
Expand Down

0 comments on commit 86ea65b

Please sign in to comment.