File tree Expand file tree Collapse file tree
src/main/java/com/ureca/unity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .auth .dto .MeResponse ;
44import com .ureca .unity .domain .auth .service .AuthSessionService ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import jakarta .servlet .http .HttpServletRequest ;
67import lombok .RequiredArgsConstructor ;
78import org .springframework .web .bind .annotation .GetMapping ;
89import org .springframework .web .bind .annotation .RequestMapping ;
910import org .springframework .web .bind .annotation .RestController ;
1011
12+ @ Tag (
13+ name = "1. Auth" ,
14+ description = "회원가입 및 로그인 관련 API"
15+ )
1116@ RestController
1217@ RequestMapping ("/api/auth" )
1318@ RequiredArgsConstructor
Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .auth .service .LogoutService ;
44import com .ureca .unity .global .util .CookieUtils ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import jakarta .servlet .http .HttpServletResponse ;
67import lombok .RequiredArgsConstructor ;
78import org .springframework .beans .factory .annotation .Value ;
89import org .springframework .http .HttpStatus ;
910import org .springframework .web .bind .annotation .*;
1011
12+ @ Tag (
13+ name = "1. Auth" ,
14+ description = "회원가입 및 로그인 관련 API"
15+ )
1116@ RestController
1217@ RequestMapping ("/api/auth" )
1318@ RequiredArgsConstructor
Original file line number Diff line number Diff line change 66import com .ureca .unity .domain .auth .dto .OAuthLoginResult ;
77import com .ureca .unity .domain .auth .service .OAuthService ;
88import com .ureca .unity .global .util .CookieUtils ;
9+ import io .swagger .v3 .oas .annotations .tags .Tag ;
910import jakarta .servlet .http .Cookie ;
1011import jakarta .servlet .http .HttpServletResponse ;
1112import jakarta .validation .constraints .NotBlank ;
1415import org .springframework .validation .annotation .Validated ;
1516import org .springframework .web .bind .annotation .*;
1617
18+ @ Tag (
19+ name = "1. Auth" ,
20+ description = "회원가입 및 로그인 관련 API"
21+ )
1722@ RestController
1823@ RequestMapping ("/api/auth" )
1924@ RequiredArgsConstructor
Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .auth .dto .TokenResponse ;
44import com .ureca .unity .domain .auth .service .RefreshTokenService ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import jakarta .servlet .http .HttpServletRequest ;
67import jakarta .servlet .http .HttpServletResponse ;
78import lombok .RequiredArgsConstructor ;
89import org .springframework .web .bind .annotation .*;
910
11+ @ Tag (
12+ name = "1. Auth" ,
13+ description = "회원가입 및 로그인 관련 API"
14+ )
1015@ RestController
1116@ RequestMapping ("/api/auth" )
1217@ RequiredArgsConstructor
Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .example .dto .response .ExampleResponse ;
44import com .ureca .unity .domain .example .service .ExampleService ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import lombok .RequiredArgsConstructor ;
67import org .springframework .web .bind .annotation .GetMapping ;
78import org .springframework .web .bind .annotation .RestController ;
89
910import java .util .List ;
1011
12+ @ Tag (name = "2. Exam" )
1113@ RestController
1214@ RequiredArgsConstructor
1315public class ExampleController {
Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .stt .model .SttJob ;
44import com .ureca .unity .domain .stt .service .SttService ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import lombok .RequiredArgsConstructor ;
67import org .springframework .web .bind .annotation .*;
78
9+ @ Tag (
10+ name = "3. STT" ,
11+ description = "음성 인식(STT) API"
12+ )
813@ RestController
914@ RequiredArgsConstructor
1015@ RequestMapping ("/counselings" )
Original file line number Diff line number Diff line change 33import com .ureca .unity .domain .summary .dto .request .SummaryRequest ;
44import com .ureca .unity .domain .summary .dto .response .SummaryResponse ;
55import com .ureca .unity .domain .summary .service .SummaryService ;
6+ import io .swagger .v3 .oas .annotations .tags .Tag ;
67import jakarta .validation .Valid ;
78import lombok .RequiredArgsConstructor ;
89import org .springframework .web .bind .annotation .*;
910
11+ @ Tag (
12+ name = "4. Summary" ,
13+ description = "요약 관련 API"
14+ )
15+
1016@ RestController
1117@ RequiredArgsConstructor
1218@ RequestMapping ("/api/summaries" )
Original file line number Diff line number Diff line change 22
33import com .ureca .unity .domain .user .service .UserService ;
44import com .ureca .unity .global .util .CookieUtils ;
5+ import io .swagger .v3 .oas .annotations .tags .Tag ;
56import jakarta .servlet .http .HttpServletResponse ;
67import lombok .RequiredArgsConstructor ;
78import org .springframework .beans .factory .annotation .Value ;
89import org .springframework .http .HttpStatus ;
910import org .springframework .security .core .Authentication ;
1011import org .springframework .web .bind .annotation .*;
1112
13+ @ Tag (
14+ name = "1. Auth" ,
15+ description = "회원가입 및 로그인 관련 API"
16+ )
1217@ RestController
1318@ RequestMapping ("/api/users" )
1419@ RequiredArgsConstructor
Original file line number Diff line number Diff line change 1+ package com .ureca .unity .global .config ;
2+
3+ import io .swagger .v3 .oas .models .OpenAPI ;
4+ import io .swagger .v3 .oas .models .Components ;
5+ import io .swagger .v3 .oas .models .security .SecurityScheme ;
6+ import io .swagger .v3 .oas .models .security .SecurityRequirement ;
7+ import org .springframework .context .annotation .Bean ;
8+ import org .springframework .context .annotation .Configuration ;
9+
10+ import java .util .List ;
11+
12+ @ Configuration
13+ public class SwaggerConfig {
14+
15+ @ Bean
16+ public OpenAPI openAPI () {
17+ return new OpenAPI ()
18+ .tags (List .of (
19+ new io .swagger .v3 .oas .models .tags .Tag ().name ("1. Auth" ),
20+ new io .swagger .v3 .oas .models .tags .Tag ().name ("2. Exam" ),
21+ new io .swagger .v3 .oas .models .tags .Tag ().name ("3. STT" ),
22+ new io .swagger .v3 .oas .models .tags .Tag ().name ("4. Summary" )
23+ ))
24+ .components (new Components ()
25+ .addSecuritySchemes ("bearerAuth" ,
26+ new SecurityScheme ()
27+ .type (SecurityScheme .Type .HTTP )
28+ .scheme ("bearer" )
29+ .bearerFormat ("JWT" )
30+ )
31+ )
32+ .addSecurityItem (
33+ new SecurityRequirement ().addList ("bearerAuth" )
34+ );
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments