File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
src/main/java/com/example/ai_tutor/global/config Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .example .ai_tutor .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 .info .Info ;
6+ import io .swagger .v3 .oas .models .security .SecurityRequirement ;
7+ import io .swagger .v3 .oas .models .security .SecurityScheme ;
8+ import org .springframework .context .annotation .Bean ;
9+ import org .springframework .context .annotation .Configuration ;
10+
11+ @ Configuration
12+ public class SwaggerConfig {
13+
14+ @ Bean
15+ public OpenAPI openAPI () {
16+ return new OpenAPI ()
17+ .components (new Components ()
18+ .addSecuritySchemes ("BearerAuth" ,
19+ new SecurityScheme ()
20+ .type (SecurityScheme .Type .HTTP )
21+ .scheme ("bearer" )
22+ .bearerFormat ("JWT" )
23+ ))
24+ .addSecurityItem (new SecurityRequirement ().addList ("BearerAuth" ))
25+ .info (new Info ()
26+ .title ("AI Tutor API" )
27+ .version ("v1.0.0" )
28+ .description ("AI Tutor 백엔드 API 문서입니다." )
29+ );
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments