• swagger-ui는 client를 구현하는 개발자에게 제공되면 매우 유용하다. postman에 APIs를 사전에 저장하고 불러올수있지만 문서화가 되진 않는다.
  • swagger-ui-github에서 다운이 가능하다.
  • swagger UI 버전에따라 OpenAPI Spec compatibility가 정해진다 3.18.3을 살펴보면 OpenAPI 3.0이 가능하다.
  • swagger-ui는 3가지를 제공하는데
    • swagger-ui
    • swagger-ui-dist
    • swagger-ui-react
  • 이중에 강력하게 swagger-ui를 추천한다고 한다. swagger-ui-dist는 single-page application을 개발할때 상당히 크기 때문에
  • swagger-uiswagger-editor를 설치하고 generateServer를 해서 코드를 생성했다면 추가로 설치할 필요가 없다.
    • swagger-editor로 생성된 코드의 프로젝트는 다음 github을 확인
  • http://localhost:8080/docs/
  • 위 코드 clone하고 실행하면 http://localhost:8080/docs/ 에 접속하면

+ Recent posts