본문 바로가기

Swagger

Swagger

왜 스웨거를 사용해야하는가? 

 

  • How to model RESTful API?  => Swagger Editor
  • How to document RESTful API? => Swagger UI
  • How to keep code and docs in sync? => Swagger Codegen
  • How to make API adoption easy? => Swagger Codegen 

 

OpenAPI Specification

 

 

  • OpenAPI 3.0 : API의 버전정보 
  • info : General API information. description, contact, url 등등 
  • servers : Provides server connectivity information. 서버에 대한 정보
  • security : Declares security mechanisms that can be used across the API. 
  • paths : Declares available API endpoints and operations.
  • tags : List out tags used by API operations. 관련 있는 테그로 API들을 묶음.
  • externalDocs : Provides links to additional external documentation 
  • components : Reusable schemas for various elements (requests, resposes, etc...)

추후 수정 ..