Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Swagger 테스트 시 CORS 문제 해결 및 서버 설정 수정 (TICO-215) #39

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading