Skip to content

Commit

Permalink
Merge pull request #92 from KNU-HAEDAL-Website/chore-exclusion-swagge…
Browse files Browse the repository at this point in the history
…r-issue-91

Chore: 운영 환경 스웨거 제외
  • Loading branch information
tfer2442 authored Sep 8, 2024
2 parents 7d9f699 + 98e5d22 commit e2977bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/haedal/haedalweb/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springdoc.core.customizers.OperationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpHeaders;
import org.springframework.validation.FieldError;
import org.springframework.web.method.HandlerMethod;
Expand All @@ -42,6 +43,7 @@
version = "1.0")

)
@Profile(value = "!prod")
@Configuration
public class SwaggerConfig {
private static final String BEARER_TOKEN_PREFIX = "Bearer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public ResponseEntity<SuccessResponse> resisterUser(@RequestBody @Valid JoinDTO
return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS);
}

@Operation(summary = "관리자 회원가입 (개발용)")
@ApiSuccessCodeExample(SuccessCode.JOIN_SUCCESS)
@ApiErrorCodeExamples({ErrorCode.DUPLICATED_USER_ID, ErrorCode.DUPLICATED_STUDENT_NUMBER, ErrorCode.INVALID_PARAMETER})
@PostMapping("/admin")
public ResponseEntity<SuccessResponse> resisterAdmin(@RequestBody @Valid JoinDTO joinDTO) {
joinService.createAdminAccount(joinDTO);

return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS);
}
// @Operation(summary = "관리자 회원가입 (개발용)")
// @ApiSuccessCodeExample(SuccessCode.JOIN_SUCCESS)
// @ApiErrorCodeExamples({ErrorCode.DUPLICATED_USER_ID, ErrorCode.DUPLICATED_STUDENT_NUMBER, ErrorCode.INVALID_PARAMETER})
// @PostMapping("/admin")
// public ResponseEntity<SuccessResponse> resisterAdmin(@RequestBody @Valid JoinDTO joinDTO) {
// joinService.createAdminAccount(joinDTO);
//
// return ResponseUtil.buildSuccessResponseEntity(SuccessCode.JOIN_SUCCESS);
// }

@Operation(summary = "ID 중복확인")
@Parameter(name = "userId", description = "중복 확인할 ID")
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
spring.profiles.include=db, jwt, aws
spring.profiles.active=prod

0 comments on commit e2977bd

Please sign in to comment.