Rails 7

Sdílet
Vložit
  • čas přidán 12. 06. 2024
  • 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

Komentáře • 15

  • @IvDBS
    @IvDBS Před 9 měsíci +2

    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  Před 9 měsíci +1

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

  • @ledockol
    @ledockol Před rokem +3

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

  • @dastanabeuov4394
    @dastanabeuov4394 Před rokem +3

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

    • @SupeRails
      @SupeRails  Před rokem +1

      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 Před rokem +2

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

  • @Ushjsuuhensb
    @Ushjsuuhensb Před rokem +1

    Hey, why do you prefer Firefox over Chrome?

    • @SupeRails
      @SupeRails  Před rokem +3

      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 Před rokem

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

    • @SupeRails
      @SupeRails  Před rokem

      ​@@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 Před rokem +1

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

    • @Ushjsuuhensb
      @Ushjsuuhensb Před rokem +2

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

  • @glauberbannwart7165
    @glauberbannwart7165 Před 7 měsíci +1

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

    • @SupeRails
      @SupeRails  Před 7 měsíci

      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!