restruct
rest
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
restruct
-
what's your recommended router? chi, mux, something else?
For me it's mux and my personal router restruct but since mux is not maintained anymore, maybe chi will be my goto for new projects that needs more stability in the api. Since restruct is a router based on structs, which I use for fast prototyping.
- Created a minimal JSON API 'framework'
-
Best golang framework for microservice
Not the best, but after using gorilla mux for routing for a while, I've decided to build my own https://github.com/altlimit/restruct
-
Looking for advice for Go Backend REST API for a Front End React/NodeJS
I've always just use gorilla mux and try to stay close to standard handlers as much as possible and code my request response process. As I've done this multiple times and actually been doing things over and over again I've developed my own router based on structs. Most of the time I develop something that's not going to be public api so I just want to easily build endpoints from struct method without defining new routes. I made https://github.com/altlimit/restruct for it. I also made it flexible so it can do a good amount of routing config. Then with same idea on authentication I made gauth. It's under the same org of that repository. Just to make my development for clients faster while sticking close to standards. I can't find myself using those frameworks that keeps introducing their own context somehow. I did use them before but somehow just doesn't feel right.
- Added strongly typed handlers in RESTruct
- Is it possible to write a well-typed controller/handler in Go?
-
RESTruct a rest/route framework based on struct methods.
github.com/altlimit/restruct
rest
- I write HTTP services in Go after 13 years (Mat Ryer, 2024)
-
Create Production-Ready SDKs with Goa
Swaggest Rest can generate OpenAPI definitions from Go code, but it's not as comprehensive as Goa and does not support gRPC.
-
[Request] Library Recommendation for Auto Swagger/OpenAPIv3 Documentation
This is what I use: https://github.com/swaggest/rest
-
FastAPI Replacement - especially with openapi
This has been the best implementation of the use case interactor I’ve seen and it outputs spec 3: https://github.com/swaggest/rest
-
What is the recommended/preferred web architecture for web applications / services written in Go?
Other times you might need a JSON REST API to generate OpenAPI docs code-first… for that I’m a fan of Swaggest REST. REST through clean arch.
- Gorilla toolkit maintainers are stepping down and have been looking for new maintainers. The project could otherwise be archived.
-
Go stack for REST APIs?
For full code-first OpenAPI v3 REST, I’ve been using https://github.com/swaggest/rest and I like it.
-
Best golang framework for microservice
For anything that needs OpenAPI docs, I’ve honestly found https://github.com/swaggest/rest pretty awesome. It’s basically just doc generation on top of Chi, but it does a lot of stuff right.
-
Do you use frameworks?
I used Echo for a lot of stuff (and it was easy to work with), but recently OpenAPI 3 has been a requirement, so I've switched to https://github.com/swaggest/rest
-
Do you use swagger to generate backends?
I've tried go-swagger comments to instrument existing code, but wasn't quite satisfied due to magical nature and error friendliness of those comments. So I decided to implement first-class OpenAPI generation on top of self-documenting action handlers: https://github.com/swaggest/rest/blob/master/_examples/basic/main.go. Schemas are generated from request and response structures using reflection and field tags.
What are some alternatives?
httprouter - A high performance HTTP request router that scales well
ogen - OpenAPI v3 code generator for go
waggy - The dead simple, easy-to-use library for writing HTTP handlers and routers in Go that can be used in standard HTTP server environments or in WAGI (Web Assembly Gateway Interface) environments
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
flamego - A fantastic modular Go web framework with a slim core but limitless extensibility
swag - Automatically generate RESTful API documentation with Swagger 2.0 for Go.
snug - Simple stdlib compatible router with shortcuts to dump json api things
opentracing-go - OpenTracing API for Go. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
Macaron - Package macaron is a high productive and modular web framework in Go.
Goyave - 🍐 Elegant Golang REST API Framework (v5 release candidate available)
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
GoSwagger - Swagger 2.0 implementation for go