Skip to content

Commit

Permalink
Merge pull request #39 from Tico-Corp/fix-be/TICO-215-resolve-swagger…
Browse files Browse the repository at this point in the history
…-ui-error

[FIX] Swagger 테스트 시 CORS 문제 해결 및 서버 설정 수정 (TICO-215)
  • Loading branch information
bu119 authored Jul 12, 2024
2 parents 909397f + e7c58db commit f6be641
Showing 1 changed file with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,35 @@
import io.jsonwebtoken.lang.Arrays;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.servers.Server;
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;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static com.google.gson.internal.$Gson$Types.arrayOf;

@OpenAPIDefinition(
info = @Info(
title = "Pomoro-Do API 명세서", // 서비스 이름
description = "Pomoro-Do 서비스의 API 명세서입니다.", // 서비스 설명
version = "v1" // 서비스 버전
)
title = "Pomoro-Do! API 명세서", // 서비스 이름
description = "Pomoro-Do!는 Pomodoro 기법을 이용한 작업 시간 관리 서비스입니다. 이 API 명세서는 Pomoro-Do! 서비스의 다양한 기능을 설명합니다. <br>" // 서비스 설명
+ "API는 모두 HTTPS 프로토콜을 사용하며, 기본 URL은 https://pomorodo.shop/api 입니다.", // API 사용 설명
version = "v1", // 서비스 버전
contact = @Contact(
name = "TICO", // 연락처 이름
url = "https://pomorodo.shop/contact", // 연락처 URL
email = "[email protected]" // 연락처 이메일
)
),
servers = {
@Server(url = "/", description = "접속 서버 관계 없이 Swagger에서 테스트 가능"), // 전체 서버 설정
@Server(url = "https://pomorodo.shop", description = "<HTTPS 서버> HTTPS 서버에서 접속 시 Swagger에서 테스트 가능"), // HTTPS 서버
@Server(url = "http://pomorodo.shop:8080", description = "<HTTP 서버> HTTP 서버에서 접속 시 Swagger에서 테스트 가능") // HTTP 서버
}
)
//@SecurityScheme(
// name = "bearerAuth",
Expand Down

0 comments on commit f6be641

Please sign in to comment.