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

  Рет қаралды 11,276

Mario Carrion

Mario Carrion

Күн бұрын

Пікірлер: 23
@MarioCarrion
@MarioCarrion 2 жыл бұрын
*Blog* mariocarrion.com/ *Software Architecture and System Design in Go* kzbin.info/aero/PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B- *All playlists* kzbin.infoplaylists *Keep it up!*
@otaviocelestinodossantos1651
@otaviocelestinodossantos1651 2 жыл бұрын
Thanks for the video Mario! You can do a video showing more about Golang 1.18.1 beta, that is implementing generics! It will be very cool, i appreciate your work. Thank you!
@MarioCarrion
@MarioCarrion 2 жыл бұрын
Hey Otavio, yes, I plan to cover Generics and Fuzzing soon.
@stepanserebryakov1298
@stepanserebryakov1298 Жыл бұрын
Thank you! This is exactly what I need!!
@MarioCarrion
@MarioCarrion Жыл бұрын
You're welcome, I'm glad you found the video useful. Take care.
@LucidGR
@LucidGR 2 жыл бұрын
You saved the day once again! Thanks!
@rohmatmret8265
@rohmatmret8265 2 жыл бұрын
nice , but please make a video about vim your setup 😬, im very interested
@MarioCarrion
@MarioCarrion 2 жыл бұрын
I have a video: kzbin.info/www/bejne/Z3qsnqN_Zs6Epdk the configuration is linked in the description. Cheers!
@nikhilsharma3035
@nikhilsharma3035 3 ай бұрын
do you have any video or page link where authorization is added for go-swagger? if yes please share
@MarioCarrion
@MarioCarrion 3 ай бұрын
Use "swagger:meta" together with "SecurityDefinitions" and "Security", something like: // Schemes: https // BasePath: /v1 // Contact: email@.com // Consumes: // - application/json // Produces: // - application/json // SecurityDefinitions: // jwt_authorization: // type: apiKey // name: Authorization // description: JSON Web Token using Bearer schema. // in: header // Security: // - jwt_authorization: // Version: 0.0.1 // // swagger:meta Read the Swagger 2.0 spec and search for "SecurityDefinitions" to see other authorization types.
@AlexisRodriguez-rk1ts
@AlexisRodriguez-rk1ts 2 жыл бұрын
Hey Mario! Thanks for the video! I wanted to know if you will ever do a video showing how to accept payments on a website using Go. Like, for example, how to implement PayPal in a web app. Thank you!
@MarioCarrion
@MarioCarrion 2 жыл бұрын
Hello Alexis. Thanks for watching! I never thought about it, but thanks for the suggestion, I'll look into it. Take care.
@nirajgupta458
@nirajgupta458 2 жыл бұрын
Thanks for the video. Please extend this tutorial to show how to serve swagger-UI using go swagger.
@MarioCarrion
@MarioCarrion 2 жыл бұрын
Thanks Niraj, I have that covered in other video, kzbin.info/www/bejne/fqjXgHSZZbJjbtE See this commit for reference: github.com/MarioCarrion/todo-api-microservice-example/commit/074bbb9f4d0f79e5bced943c10c56013705969a9#diff-a34ecc368554b6e533d814f4a666896e22f6b1364a1be1549daec0fb3e479651
@golangthebest7746
@golangthebest7746 2 жыл бұрын
hello, how do I generate a swagger link/url/endpoint when I start my server? I mean you are using the editor by copying and pasting the spec file, buy I would like to generate a link on start so you can click and open swagger easily
@MarioCarrion
@MarioCarrion 2 жыл бұрын
Do you mean the swagger-ui or the swagger.json?
@golangthebest7746
@golangthebest7746 2 жыл бұрын
@@MarioCarrion the swagger-ui, I would like to see a video about it
@MarioCarrion
@MarioCarrion 2 жыл бұрын
@@golangthebest7746 this sort of covers what you're asking kzbin.info/www/bejne/fqjXgHSZZbJjbtE In practice, look at this: github.com/MarioCarrion/todo-api-microservice-example/blob/097af88070ae60dc7eb86f4e4425175c45b9663e/cmd/rest-server/main.go#L234-L235 I bundle the server binary with a version of swagger-ui.
@golangthebest7746
@golangthebest7746 2 жыл бұрын
@@MarioCarrion ty very much
@ecam90
@ecam90 2 жыл бұрын
Hey Mario - just curious as to why you would choose OpenAPI 2 instead of OpenAPI 3?? Are there any specific benefits of using 2.0 over 3?
@MarioCarrion
@MarioCarrion 2 жыл бұрын
Hello! I chose OpenAPI 2 in this episode because that's the only version go-swagger supports; which is the only tool (to my knowledge / that works) available for generating a spec for OpenAPI 2 using annotations; if you see my most recent video (Design First: kzbin.info/www/bejne/e6OkamWbmbKnl5o) I'm using OpenAPI 3 (although goa, the tool I'm using; still supports OpenAPI 2). IMO, if there's a chance to use OpenAPI 3.0 with the tools we have available, I think we should use that version instead.
@ecam90
@ecam90 2 жыл бұрын
@@MarioCarrion Understood - that makes a lot of sense. Thanks!
@luisrivera1958
@luisrivera1958 2 жыл бұрын
Muchas gracias por el excelente video Me doy cuenta que sabes de lo que hablas porque tienes nVIM de IDE 😁👌
Using Design First to build Web APIs using OpenAPI 3 in Golang
23:44
Second Webinar on the architecture of the AI Act
1:32:45
DigitalEU
Рет қаралды 1,5 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 44 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 22 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 623 М.
Transactions in context values in Golang, is it OK? r/golang
15:57
Mario Carrion
Рет қаралды 3,3 М.
Software Architecture in Golang: Orchestrator Pattern
13:07
Mario Carrion
Рет қаралды 6 М.
THIS is the BEST Way to Write HTTP Services in Golang
13:53
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 170 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 685 М.
Software Architecture in Golang: Externalized Configuration Pattern
11:35
gRPC vs GraphQL vs REST? What's the best API Technology for Golang?
12:51
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 44 МЛН