go-swagger-ui
CategoryThird-party APIs
SubcategoryThird-party APIs
Stars0
Go library containing precompiled [Swagger UI](https://swagger.io/tools/swagger-ui/) for serving swagger json
About go-swagger-ui
go-swagger-ui
This repo provides go handlers for serving swagger.json and the Swagger UI.
Commonly used with grpc-gateway compiled swagger.
Usage
import (
"github.com/esurdam/go-swagger-ui"
)
// Asset represents a AssetFn - compiled bindata swagger file
mux := swaggerui.NewServeMux(Asset, "swagger.json") // add swagger bindata asset
// /swagger.json serves json
// /swagger-ui serves the swagger-ui
With custom root:
import (
"github.com/esurdam/go-swagger-ui"
)
// Asset represents a AssetFn - compiled bindata swagger file
mux := swaggerui.NewServeMuxWithRoot(Asset, "swagger.json", "/v1/auth") // add swagger bindata asset
// v1/auth/swagger.json serves json
// v1/auth/swagger-ui serves the swagger-ui
Updating UI
swagger directory contains auto-generated output.
- Add updated assets to //third_party/swagger-ui
- Run
make buildwhich will compile swagger intoswagger/bindata.go
Frequently Asked Questions
What is go-swagger-ui?
go-swagger-ui is a Third-party APIs library for the Go programming language. Go library containing precompiled [Swagger UI](https://swagger.io/tools/swagger-ui/) for serving swagger json
How do I install go-swagger-ui?
Install go-swagger-ui with the Go module system using `go get esurdam/go-swagger-ui`. Check the repository for the current installation instructions.
What category does go-swagger-ui belong to?
go-swagger-ui is listed under Third-party APIs, specifically Third-party APIs.