Building APIs with Swagger
Last updated
Was this helpful?
Last updated
Was this helpful?
Swagger分三個部分,Swagger editor、Swagger UI、Swagger Codegen。Swagger editor去定義api specification,Swagger UI把Swagger editor定義的api變成網站,方便寫程式的人看,Swagger codegen是將這些api definition變成code,讓我們之後去implement business logic。
AWS API Gateway with HTTP, Lambda, DynamoDB, and iOS - Generate an SDK with Swagger
Swagger基本內容先看 [1],[1] 很詳細說明Swagger UI,但沒有code generation的內容。
如果想要將swagger UI deploy到spring boot看 [2]。
Swagger code generation請看 [3],但 [3] 講的東西其實很少。其實用Maven將generated file產出之後,之後去implement即可,也不太需要學什麼。
避免部署Swagger UI的方式就是copy你的yaml file,past到swagger editor即可。
REST
JSON
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schema