Golang Microservices: REST APIs - OpenAPI / Swagger

preview_player
Показать описание
Let me share with you another tip when building microservices in Go! Implementing REST APIs, first HTTP Handlers, then using custom types, next OpenAPI 3, Swagger tools and finally versioning!

00:00 Start
00:25 Implement OpenAPI (fka Swagger)
00:52 Why is OpenAPI / Swagger even needed?
03:07 What is OpenAPI? What is Swagger?
04:55 How to put it all together using Go?
07:12 Demo time!
07:25 Swagger UI Integration
08:55 Generating OpenAPI JSON/YAML
15:14 Recap
16:50 Parting words

---

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!

Keep it up. Don't give up!

#golang #microservices #programming

--- Our affiliate links below

--- Our Vlog Channel

Рекомендации по теме
Комментарии
Автор

Damn dude you're the only one who really seems to be talking about this on youtube at least. Thanks for the article. Helps out a ton even though this is way more of a manual pain than it should be haha

jaimebondoza
Автор

I like how you encourage to keep it up :) Yeah its a lot to take in. I like the quality of your tests.

robertjmccabe
Автор

Hi. Great content! Very helpful.

I'm curious about your Nvim setup. Do you have any posts/videos about your setup and how you use it for web dev in general and golang in particular.

I'm interested in migrating from vscode to nvim and feeling a bit jealous of how you navigate so effortlessly around :)

NAVEENMV
Автор

Do you know how to add api key in your code. that is so confusing. Could you help me.

xuebindong
Автор

Love your channel. Thank you for your work

jamesh
Автор

the embed part is not working for me.. I get nothing when hit the URI.. any help? I don't think that part was clear enough

pcplBDFS
Автор

Very nice tutorial on swagger for golang, nowhere on youtube anybody can find a better explanation than this. Thank you for the great content :)

I have a question that, how can I embed static content in golang 1.13 or lower to 1.16?

DeeptimanPattnaik
Автор

I feel you didn't explain the process to your 'students' well. A step by step installing of the packages and documenting of your endpoints could have helped better than this overview explanation.

alfredbrown
Автор

Interesting, thanks for the video, regards and Blessings in Jesus from Lima Peru.

manuelretamozo
Автор

Thanks for the amazing tutorial, it helps me to understand implementing open API.

I am just curious, why are you retyping Task type in http package? why not use internal.Task like in postgres package or generate type use codegen-oapi?

codecoffee
Автор

Sorry but when I try function NewOpenAPI3() openapi3.Swagger it said Unresolved type "openapi3.Swagger", is that swagger not support now? thank you

vuhoanghiep
Автор

This's really the most awful code i have ever seen to right in Golang. I would like to choose nodejs over Golang in this case.

voiceofthetrue