# README

How to use Swagger UI with go-restful

Get the Swagger UI sources

git clone https://github.com/wordnik/swagger-ui.git

The project contains a "dist" folder. Its contents has all the Swagger UI files you need.

The index.html has an url set to http://petstore.swagger.wordnik.com/api/api-docs. You need to change that for your WebService.

Now, you can install the Swagger WebService for serving the Swagger specification in JSON.

config := swagger.Config{
	WebServices:    restful.RegisteredWebServices(),
	WebServicesUrl: "http://localhost:8080",
	ApiPath:        "/apidocs.json",
	SwaggerPath:     "/apidocs/",
	SwaggerFilePath: "/Users/emicklei/Projects/swagger-ui/dist"}
swagger.InstallSwaggerService(config)		

Notes

  • Use RouteBuilder.Operation(..) to set the Nickname field of the API spec
  • The WebServices field of swagger.Config can be used to control which service you want to expose and document ; you can have multiple configs and therefore multiple endpoints.

# Functions

InstallSwaggerService add the WebService that provides the API documentation of all services conform the Swagger documentation specifcation.
RegisterSwaggerService add the WebService that provides the API documentation of all services conform the Swagger documentation specifcation.

# Variables

LogInfo is the function that is called when this package needs to log.

# Structs

No description provided by the author
https://github.com/wordnik/swagger-core/blob/scala_2.10-1.3-RC3/schemas/api-declaration-schema.json.
https://github.com/wordnik/swagger-core/wiki/authorizations.
No description provided by the author
https://github.com/wordnik/swagger-core/wiki/authorizations.
No description provided by the author
https://github.com/wordnik/swagger-core/wiki/authorizations.
No description provided by the author
https://github.com/wordnik/swagger-core/wiki/authorizations.
No description provided by the author
No description provided by the author
https://github.com/wordnik/swagger-core/wiki/authorizations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author