Skip to content

Commit

Permalink
fix: MemberId 애노테이션 무시 설정 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Jan 24, 2024
1 parent 4fcb1e9 commit a36ec82
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.nice.petudio.common.config.swagger;

import com.nice.petudio.common.auth.resolver.MemberId;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
Expand All @@ -8,6 +9,7 @@
import io.swagger.v3.oas.models.servers.Server;
import java.util.Arrays;
import java.util.List;
import org.springdoc.core.utils.SpringDocUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -43,6 +45,11 @@ public OpenAPI openAPI() {
.info(info);
}

// API 파라미터 중, MemberId 애노테이션 적용 파라미터는 무시
static {
SpringDocUtils.getConfig().addAnnotationsToIgnore(MemberId.class);
}

private Server createServer(String url, String description) {
Server server = new Server();
server.setUrl(url);
Expand Down

0 comments on commit a36ec82

Please sign in to comment.