Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 498 Bytes

240201.md

File metadata and controls

13 lines (11 loc) · 498 Bytes

Swagger 어노테이션 사용 시 Enum Array 파라미터를 콤마로 구분하여 받는 방법

@Parameter(
    description = "Enum Array",
    array = @ArraySchema(
        schema = @Schema(
            implementation = EnumType.class)),
    style = ParameterStyle.SIMPLE
)

ParameterStyle.SIMPLE을 사용하면 콤마로 구분된다. 디폴트값을 사용하면 enum={enum1}&enum={enum2} 와 같이 앰퍼샌드로 구분된 여러 개의 파라미터를 전달받는다.