go-microservice
Demo API microservice is covered by OpenAPI/Swagger-generated documentation. Communicates with gRPC service.
📌 OpenAPI/Swagger-generated API Documentation based on Swagger UI is available by localhost:9090/swagger
📌 OpenAPI/Swagger-generated API Documentation based on Redoc is available by localhost:9090/redoc
⚠️ gRPC server must be running before.
⚠️ Install swagger locally before generate:
git clone https://github.com/go-swagger/go-swagger && cd go-swagger
git checkout v0.30.5
go install -ldflags "-X github.com/go-swagger/go-swagger/cmd/swagger/commands.Version=$(git describe --tags) -X github.com/go-swagger/go-swagger/cmd/swagger/commands.Commit=$(git rev-parse HEAD)" ./cmd/swagger
⚠️ Clear sdk directory before generate documentation.
🎥 Thanks Nic Jackson for sharing his knowledge.