Using Code First to build Web APIs using Swagger 2.0 in Golang



Using Code First to build Web APIs using Swagger 2.0 in Golang

Using Code First to build Web APIs using Swagger 2.0 in Golang

Welcome to this System Design video in Golang, in this episode I cover “Building Web APIs using the Code First Approach and Swagger 2.0” which consist of coding the API directly and generating documentation afterwards with Swagger 2.0

Code First’s pros are: when there’s a need for fast time to market and developers know what to do exactly and quickly.

Code First’s cons include: there’s no documentation (outside of reading the source code) and guidelines are not unified.

== Recommended Reading
■ The Design of Web APIs: https://amzn.to/2PNtQvi (affiliate link)
■ Irresistible APIs: https://amzn.to/38n5ChW (affiliate link)

== Relevant links

■ Code Example: https://github.com/MarioCarrion/videos/tree/9e06171e68e115dc042f14824cf683a7593e2b47/2022/01/07
■ System Design in Go/Golang – Building Web APIs using Design/API First: https://youtu.be/ErA92edMta8
■ Golang Microservices: REST APIs – OpenAPI / Swagger: https://youtu.be/HwtOAc0M08o
■ Swagger / OpenAPI 2.0 Spec: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
■ A powerful HTTP router and URL matcher for building Go web servers: https://github.com/gorilla/mux
■ Swagger 2.0 implementation for go: https://github.com/go-swagger/go-swagger
■ go-swagger documentation: https://goswagger.io/

== All Go/Golang Playlists

■ Building Microservices in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fn8sAXIk0WyBfK_sT1pohu
■ Go/Golang Tools and Packages: https://www.youtube.com/playlist?list=PL7yAAGMOat_HEEOvH99agDs_5g51A0Ls3
■ Learning Concurrency Patterns in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fhj_px_DzNzTsXs-mRwv1t
■ Learning Go/Golang : https://www.youtube.com/playlist?list=PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy
■ Learning Relational Databases in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_EgwoQTvNUflrYL_4qzdB7f
■ Software Architecture in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-
■ Testing in Go/Golang: https://www.youtube.com/playlist?list=PL7yAAGMOat_HSeW4zF0uRL9EaHadE4ZZq

== Socials

■ https://twitter.com/MarioCarrion
■ https://www.instagram.com/mario.carrion
■ https://linkedin.com/in/MarioCarrion

00:00 Start
00:18 What is an API?
01:45 What is Code First Approach?
02:01 What is Swagger / OpenAPI 2.0?
03:01 Alternatives to Swagger
03:50 Demo
16:56 Cons and Pros of Code First Approach?
18:18 Conclusion

=== Who am I?

Hello👋🏼! I’m Mario, a Hands-on Software Architect and Lead Backend Engineer with more than 16 years of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.

Every week I will share with you different topics I’ve learned while working for small startups and large companies including the processes I’ve followed over the years for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture and Systems Design… and of course Go!

Keep it up. Don’t give up!

#golang #tutorial #systemdesign

=== Our Vlog Channel

https://www.youtube.com/c/RubyCarrion/videos

=== Affiliate links

■ Amazon Shop 🛒 https://www.amazon.com/shop/rubycarrion
■ Technical/Non-technical Books – Recommended by Mario Carrion 📚 https://www.amazon.com/shop/rubycarrion?listId=P8KAGIWTNH3X&ref=cm_sw_em_r_inf_list_own_rubycarrion_dp_dyqYP6yk67Hif

DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. I appreciate your support! 💖

Comments are closed.