Redoc 적용하기 - NodeJs
·
NodeJS
원래는 Swagger로 API들을 관리하고 있었는데, UI가 보기 불편하다는 생각을 종종하였다. 대체 할수있는 것들이 뭐가 있을까 고민하던 중 Redoc에 대해 알게 되었고 적용하였다.심지어 현재 openapi 3.0으로 작성된 yaml 파일이 있다면 코드 몇줄만 추가하면 별도로 다시 yaml 파일을 작성할 필요도 없다!📌 설치npm install redoc-express 📌 Redoc Express 적용import redoc from "redoc-express";app.get("/redoc", redoc({ title: "API Documentation", specUrl: "/swagger.yaml", expandResponses: "200,201",})); Server 부분 코드app.get..