go-swagger toolkit

Swagger 2.0 describes your API's for you, so you don't have to

swagger:meta

spec

The swagger:meta annotation flags a file as source for metadata about the API. This is typically a doc.go file with your package documentation. You can specify a Consumes and Produces key which has a new content type on each line Schemes is a tag that is required and allows for a comma separated string composed of: http, https, ws or wss Host and BasePath can be specified but those values will be defaults, they should get substituted when serving the swagger spec.

14 Nov 2015

swagger:allOf

spec

Marks an embedded type as a member for allOf swagger:allOf Example: // An AllOfModel is composed out of embedded structs but it should build // an allOf property type AllOfModel struct { // swagger:allOf SimpleOne // swagger:allOf mods.Notable Something // not annotated with anything, so should be included CreatedAt strfmt.DateTime `json:"createdAt"` }

14 Nov 2015

swagger:strfmt

spec

A swagger:strfmt annotation names a type as a string formatter. The name is mandatory and that is what will be used as format name for this particular string format. String formats should only be used for very well known formats. swagger:strfmt [name]

14 Nov 2015