Rails 7

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: github.com/corsego/131-api-do...
Based on this blogpost: blog.corsego.com/learn-openap...
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

Пікірлер: 15

  • @ledockol
    @ledockol Жыл бұрын

    Корисно. Дякую!

  • @IvDBS
    @IvDBS9 ай бұрын

    Hi, Yaro! I usually don't write comments, but Lot of thanks for this video!!!! Right now we need to learn and apply swagger on internship. You save my IT career 🙂🙏

  • @SupeRails

    @SupeRails

    9 ай бұрын

    glad to hear that! good luck in your career! 🚀

  • @dastanabeuov4394
    @dastanabeuov4394 Жыл бұрын

    It would be great if you show how to generate documentation through a test run Rspec. Thnx like+

  • @SupeRails

    @SupeRails

    Жыл бұрын

    Hello Dastan! You are 100% right! Though ChatGPT is fun for generating the manifest, it definitely does not replace testing and test-generated accurate OpenAPI manifest. I will add "Rspec-RSWAG" to my superails TODO list!

  • @dastanabeuov4394

    @dastanabeuov4394

    Жыл бұрын

    @@SupeRails Thanks for your contributions to the Ruby/Rails developer community. I'll be looking forward to it.

  • @Ushjsuuhensb
    @Ushjsuuhensb Жыл бұрын

    Hey, why do you prefer Firefox over Chrome?

  • @SupeRails

    @SupeRails

    Жыл бұрын

    Before I was a heavy chrome and google user for years. Now, I believe in the mission behind firefox, duckduckgo, similar tools that do-not-track and do not belong to megacorporations. I want to believe in the free, distributed web that is not owned by 10 megacorporations...

  • @Ushjsuuhensb

    @Ushjsuuhensb

    Жыл бұрын

    @@SupeRails thank you! Do you use other services like Gmail, Drive, and similar?

  • @SupeRails

    @SupeRails

    Жыл бұрын

    ​@@Ushjsuuhensb I use both gmail & drive. As tools, they are very good, but I try to diversify tech dependency when I can. ... I really felt backstabed that the Google Photos that were advertised as "free forever" were turned into a shitty paid service, and I had to basically migrate 30 years of photos elsewhere

  • @Ushjsuuhensb

    @Ushjsuuhensb

    Жыл бұрын

    @@SupeRails understand... and agree. Thank you for sharing this and for the great content you make!

  • @Ushjsuuhensb

    @Ushjsuuhensb

    Жыл бұрын

    @@SupeRails Yaro, one more point. Maybe you'll find it interesting. Do you know about VSCodium?

  • @glauberbannwart7165
    @glauberbannwart71657 ай бұрын

    This video is a little bit confusing. I couldn't replicate using the same commands.

  • @SupeRails

    @SupeRails

    7 ай бұрын

    Hi! Indeed, using chatgpt to generate tests is not reliable, even for this simple example. I experimented with it just to speed things up. If it is of any help, you can try viewing the final result of the openapi generation here: github.com/corsego/131-api-documenation/commit/29d7c64b926d66acc08681ed0b83b354659fc7f2 I will do better next time!

Келесі