본문 바로가기

JAVA/Error

[API] Swagger : Parser error missed comma between flow collection entries 원인 / 해결 방법

 

 

 

 

Errors
Hide
Parser error missed comma between flow collection entries

 

 

Swagger 버전도 맞고, 모든 Api 경로가 일치 하는데 해당 에러가 계속 발생했다.

comma 가 누락 됐다고 하는데 사용한 곳이 없다.

 

구글링 해보니 comma 뿐이 아니라 따옴표, 대괄호 등 어딘가에서 잘못 사용한 경우 해당 에러가 발생하는 것 같다.

내용은 comma 이지만 comma가 아닐 수도 있다는 것이다.

 

 

@Column(name = "sample")
@ApiModelProperty(notes = "예제", example = "[sample]'/test/api/sample/sampleId")
@ApiParam(value="예제")
private String sample;

 

나 같은 경우에는 @ApiModelProperty example 에서 ' [ ] ' 를 사용한게 문제가 되었다.

 

 

@ApiModelProperty(notes = "예제", example = "'[sample]'/test/api/sample/sampleId'")

 

작은 따옴표 ( ' ' )로 감싸주면 해결 된다.

 

 

 

 

 

해결 완료.