#131 API Documentation with OpenAPI, Swagger, RSWAG. Generate manifest with 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
0
Destacado en listas
![#126 API from Zero. Bearer authentication](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTg5NCwicHVyIjoiYmxvYl9pZCJ9fQ==--d9ab90e263de74a6c1a4d424201854f86d43ebf7/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#127 cURL for CRUD API requests](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTkwMywicHVyIjoiYmxvYl9pZCJ9fQ==--1bea179c61fcb2208e2ea8df4531d4f170cea74c/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#128 Faraday CRUD API requests. Communicate between two Rails apps!](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc2MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4c84f0fbff8ecdac0f4a27620d6743053262adec/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
- Bearer token authentication
- create API endpoints
- Swagger
- OpenAPI
- rswag
- Usage tracking
- Rate limiting
& more!