Generate REST API boilerplate code from Swagger 2.0 API spec for gin web framework. Thanks to the go-swagger project, it's awesome and has been heavily used as code base of swagger-gin.
Install the package
go get github.com/aiyi/swagger-gin
To generate source files (models, restapi and example operations)
Use default spec file "./swagger.json" and default target directory "./":
swagger-gin
Use specific api spec:
swagger-gin -spec=petstore.json
Use specific target folder:
swagger-gin -spec=petstore.json -target=petstore