Skip to content

Commit

Permalink
setup #38: open api title, description, version 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
OldRabbit736 committed Nov 7, 2023
1 parent e1d4c49 commit 4678e07
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.wanted.teamr.tastyfinder.api.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.properties.SpringDocConfigProperties;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -35,4 +38,19 @@ public String getApiDocPath() {
return springDocConfigProperties.getApiDocs().getPath() + "/**";
}

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

private Info apiInfo() {
return new Info()
.title("지리기반 맛집 추천 웹 서비스 API")
.description("본 서비스는 지리기반 맛집 추천 웹서비스입니다.</br>" +
"사용자는 사용자 위치 기반으로 맛집을 추천 받고 해당 맛집의 상세 정보를 확인할 수 있습니다.")
.version("1.0.0");
}

}

0 comments on commit 4678e07

Please sign in to comment.