Add: 나머지 swagger token scheme 추가
This commit is contained in:
parent
da118db233
commit
a863e9e734
@ -23,5 +23,23 @@ public class SwaggerConfig {
|
|||||||
.description("하이오더 분석 서비스 API 문서")
|
.description("하이오더 분석 서비스 API 문서")
|
||||||
.version("1.0.0"));
|
.version("1.0.0"));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* JWT Bearer 토큰을 위한 Security Scheme 생성
|
||||||
|
*/
|
||||||
|
private SecurityScheme createAPIKeyScheme() {
|
||||||
|
return new SecurityScheme()
|
||||||
|
.type(SecurityScheme.Type.HTTP)
|
||||||
|
.scheme("bearer")
|
||||||
|
.bearerFormat("JWT")
|
||||||
|
.in(SecurityScheme.In.HEADER)
|
||||||
|
.name("Authorization")
|
||||||
|
.description("""
|
||||||
|
JWT 토큰을 입력하세요
|
||||||
|
|
||||||
|
사용법:
|
||||||
|
1. 로그인 API로 토큰 발급
|
||||||
|
2. Bearer 접두사 없이 토큰만 입력
|
||||||
|
3. 예: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOi...
|
||||||
|
""");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.ktds.hi.recommend.infra.config;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
import io.swagger.v3.oas.models.info.Info;
|
||||||
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -23,4 +24,24 @@ public class SwaggerConfig {
|
|||||||
.description("사용자 취향 기반 매장 추천 및 취향 분석 관련 기능을 제공하는 API")
|
.description("사용자 취향 기반 매장 추천 및 취향 분석 관련 기능을 제공하는 API")
|
||||||
.version("1.0.0"));
|
.version("1.0.0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JWT Bearer 토큰을 위한 Security Scheme 생성
|
||||||
|
*/
|
||||||
|
private SecurityScheme createAPIKeyScheme() {
|
||||||
|
return new SecurityScheme()
|
||||||
|
.type(SecurityScheme.Type.HTTP)
|
||||||
|
.scheme("bearer")
|
||||||
|
.bearerFormat("JWT")
|
||||||
|
.in(SecurityScheme.In.HEADER)
|
||||||
|
.name("Authorization")
|
||||||
|
.description("""
|
||||||
|
JWT 토큰을 입력하세요
|
||||||
|
|
||||||
|
사용법:
|
||||||
|
1. 로그인 API로 토큰 발급
|
||||||
|
2. Bearer 접두사 없이 토큰만 입력
|
||||||
|
3. 예: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOi...
|
||||||
|
""");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.ktds.hi.review.infra.config;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
import io.swagger.v3.oas.models.info.Info;
|
||||||
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -22,5 +23,25 @@ public class SwaggerConfig {
|
|||||||
.description("리뷰 작성, 조회, 삭제, 반응, 댓글 등 리뷰 관련 기능을 제공하는 API")
|
.description("리뷰 작성, 조회, 삭제, 반응, 댓글 등 리뷰 관련 기능을 제공하는 API")
|
||||||
.version("1.0.0"));
|
.version("1.0.0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JWT Bearer 토큰을 위한 Security Scheme 생성
|
||||||
|
*/
|
||||||
|
private SecurityScheme createAPIKeyScheme() {
|
||||||
|
return new SecurityScheme()
|
||||||
|
.type(SecurityScheme.Type.HTTP)
|
||||||
|
.scheme("bearer")
|
||||||
|
.bearerFormat("JWT")
|
||||||
|
.in(SecurityScheme.In.HEADER)
|
||||||
|
.name("Authorization")
|
||||||
|
.description("""
|
||||||
|
JWT 토큰을 입력하세요
|
||||||
|
|
||||||
|
사용법:
|
||||||
|
1. 로그인 API로 토큰 발급
|
||||||
|
2. Bearer 접두사 없이 토큰만 입력
|
||||||
|
3. 예: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOi...
|
||||||
|
""");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user