go-swagger toolkit

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

swagger:route

spec generate

A swagger:route annotation links a path to a method. This operation gets a unique id, which is used in various places as method name. One such usage is in method names for client generation for example. Because there are many routers available, this tool does not try to parse the paths you provided to your routing library of choice. So you have to specify your path pattern yourself in valid swagger syntax.

14 Nov 2015

swagger:model

spec generate

A swagger:model annotation optionally gets a model name as extra data on the line. when this appears anywhere in a comment for a struct, then that struct becomes a schema in the definitions object of swagger. The struct gets analyzed and all the collected models are added to the tree. The refs are tracked separately so that they can be renamed later on. swagger:model [?model name]

14 Nov 2015

swagger:strfmt

spec generate

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