Rails 7 #131 API Documentation with OpenAPI, Swagger, RSWAG. Generate manifest with ChatGPT?!

11/05/2023 (11 months ago)
swagger openapi api development rswag api documentation chatgpt

Public API without GOOD Documentation is useless!

Good API documentation is crucial for helping others adopt and use your public API.

OpenAPI (previously Swagger) offers a standard for API documentation. OpenAPI documenation is basically a structured .yml manifest file. Swagger UI is a tool that reads your .yml file and displays it in a fancy UI.

Episode source code: https://github.com/corsego/131-api-documenation/commit/29d7c64b926d66acc08681ed0b83b354659fc7f2
Based on this blogpost: https://blog.corsego.com/learn-openapi-swagger-rswag

0:00 Overview of what we did before
0:00 Why write API documentation?
1:26 What is OpenAPI
3:50 gem RSWAG to display Swagger UI
7:20 customize Swagger branding
9:33 Generate OpenAPI manifest with ChatGPT
11:01 How to use Swagger UI to test API endpoints
16:03 Summary

Sign in to join the conversation