사용자 도구

사이트 도구


springframework:springfox

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
springframework:springfox [2018/07/30 15:40]
kwon37xi
springframework:springfox [2019/06/04 17:48]
kwon37xi
줄 49: 줄 49:
     }     }
 } }
 +</code>
 +
 +===== 숫자값 parsing 에러 =====
 +  * 파라미터 타입이 primitive 숫자(int, long 등)인데, example을 지정하지 않으면 empty string이 example로 들어오게 되고, 그로인해 Swagger UI 출력시 숫자값 파싱 오류가 발생한다. 이때 example을 적합한 숫자로 넣어주면 된다.
 +  * 원칙적으로 Boxed Type에 대해서는 발생하지 않을거 같고 일부 괜찮은데 일부는 또 파싱 오류가 발생하기도 한다.(example값에 empty string을 넣어서)
 +
 +<code java>
 +@ApiParam(value = "userId", defaultValue="1", example = "1") int userId;
 </code> </code>
  
줄 54: 줄 62:
   * [[http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api|Setting Up Swagger 2 with a Spring REST API ]] [[http://springboot.tistory.com/24|Spring REST API에 Swagger 2 설정하기]]   * [[http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api|Setting Up Swagger 2 with a Spring REST API ]] [[http://springboot.tistory.com/24|Spring REST API에 Swagger 2 설정하기]]
   * [[https://dzone.com/articles/spring-rest-docs-versus-springfox-swagger-for-api|Spring REST Docs Versus SpringFox Swagger for API Documentation - DZone Java]]   * [[https://dzone.com/articles/spring-rest-docs-versus-springfox-swagger-for-api|Spring REST Docs Versus SpringFox Swagger for API Documentation - DZone Java]]
 +  * [[https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api|Setting Up Swagger 2 with a Spring REST API | Baeldung]]
springframework/springfox.txt · 마지막으로 수정됨: 2020/08/26 10:32 저자 kwon37xi