Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ application-test.properties
application-s3.properties
test_img_dir

/src/main/resources/
**/src/main/resources/secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.moim.config.swagger;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
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;

@Configuration
public class SwaggerConfig {
@Bean
public OpenAPI customOpenAPI() {
SecurityScheme bearerAuthScheme = new SecurityScheme()
.type(SecurityScheme.Type.HTTP)
.scheme("bearer")
.bearerFormat("JWT")
.in(SecurityScheme.In.HEADER)
.name("Authorization");

SecurityRequirement securityRequirement = new SecurityRequirement()
.addList("BearerAuth");

return new OpenAPI()
.info(new Info() // API 문서의 기본 정보
.title("MatchDay API")
.description("MatchDay 백엔드 API 문서")
.version("v1.0.0"))
.components(new Components()
.addSecuritySchemes("BearerAuth", bearerAuthScheme))
.addSecurityItem(securityRequirement);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public BaseResponse<MatchRecordOutput> matchRecordSave(@PathVariable Long matchI
}

//매치 메인 페이지(대시보드)
@GetMapping("match/main/{clubId}")
@GetMapping("/match/main/{clubId}")
public BaseResponse<MatchMainOutput> findMatchMain(@PathVariable Long clubId, @AuthenticationPrincipal UserDetailsImpl userDetailsImpl) {
return BaseResponse.onSuccess(matchService.matchMainFind(clubId), ResponseCode.OK);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
spring.profiles.include=local, s3
spring.profiles.include=test, s3