Skip to content

Commit

Permalink
Merge pull request #31 from kakao-tech-campus-2nd-step3/feat/27/swagger
Browse files Browse the repository at this point in the history
feat: swagger config 작성 #27
  • Loading branch information
westzeroright authored Sep 29, 2024
2 parents 8f5e4a1 + 3645548 commit 96011e4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
spring_dependency_management_version = '1.1.6'
spotless_version = '6.25.0'
jjwt_version = '0.11.5'
swagger_version = '2.0.2'
}
}

Expand Down Expand Up @@ -39,8 +40,7 @@ dependencies {

/** Json Web Token */
implementation "io.jsonwebtoken:jjwt-api:${jjwt_version}"
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwt_version}"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwt_version}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${swagger_version}"

testImplementation 'org.springframework.boot:spring-boot-starter-test'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.ordertogether.team14_be.config;

import io.swagger.v3.oas.models.Components;
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
public class SwaggerConfig {

@Bean
public OpenAPI openAPI() {
return new OpenAPI().components(new Components()).info(apiInfo());
}

private Info apiInfo() {
return new Info().title("14조 API").description("전남대 14조 Swagger").version("2.0.0");
}
}

0 comments on commit 96011e4

Please sign in to comment.