This project demonstrates how to handle each HTTP Verb using go
It includes examples of:
- GET / POST / PUT / PATCH / DELETE / HEAD verb handling
- Query parameters
- URL parameters
- JSON Marshal / Unmarshal processing
- Error handling
- File retrieval
- ETag generation
- Swagger usage
- ... anything else i can think of and have time to include
dir=$(mktemp -d)
git clone https://github.com/go-swagger/go-swagger "$dir"
cd "$dir"
go install ./cmd/swagger
OpenAPI project for golang
OpenAPI Initiative golang toolkit
The runtime component for use in codegeneration or as untyped usage.
go get github.com/go-openapi/runtime/middleware
Gorilla is a web toolkit for the Go programming language that provides useful, composable packages for writing HTTP-based applications.
go get -u github.com/gorilla/mux
swagger generate spec -o ./swagger.yaml --scan-models
If you find this project useful, you may want to Buy me a Coffee! ☕ Thanks 👍