Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComplexerOne ¶
type ComplexerOne struct { SimpleOne mods.NotSelected mods.Notable CreatedAt strfmt.DateTime `json:"createdAt"` }
A ComplexerOne is composed of a SimpleOne and some extra fields. swagger:response complexerOne
type ComplexerOneParams ¶
type ComplexerOneParams struct { SimpleOne mods.NotSelected mods.Notable CreatedAt strfmt.DateTime `json:"createdAt"` // in: formData Informity string `json:"informity"` }
A ComplexerOneParams is composed of a SimpleOne and some extra fields swagger:parameters yetAnotherOperation
type GenericError ¶
type GenericError struct { // The error message // in: body Body struct { Message string } }
A GenericError is an error that is used when no other error is appropriate swagger:response genericError
type ListPetParams ¶
type ListPetParams struct { // OutOfStock when set to true only the pets that are out of stock will be returned OutOfStock bool }
ListPetParams the params for the list pets query
type NoParams ¶
type NoParams struct { // ID of this no model instance. // ids in this application start at 11 and are smaller than 1000 // // required: true // minimum: > 10 // maximum: < 1000 // in: path ID int64 `json:"id"` // The Score of this model // // required: true // minimum: 3 // maximum: 45 // multiple of: 3 // in: query Score int32 `json:"score"` // Name of this no model instance // // min length: 4 // max length: 50 // pattern: [A-Za-z0-9-.]* // required: true // in: header Name string `json:"x-hdr-name"` // Created holds the time when this entry was created // // required: false // in: query Created strfmt.DateTime `json:"created"` // a FooSlice has foos which are strings // // min items: 3 // max items: 10 // unique: true // items.minLength: 3 // items.maxLength: 10 // items.pattern: \w+ // collection format: pipe // in: query FooSlice []string `json:"foo_slice"` // a BarSlice has bars which are strings // // min items: 3 // max items: 10 // unique: true // items.minItems: 4 // items.maxItems: 9 // items.items.minItems: 5 // items.items.maxItems: 8 // items.items.items.minLength: 3 // items.items.items.maxLength: 10 // items.items.items.pattern: \w+ // collection format: pipe // in: query BarSlice [][][]string `json:"bar_slice"` // the items for this order // // in: body Items []struct { // ID of this no model instance. // ids in this application start at 11 and are smaller than 1000 // // required: true // minimum: > 10 // maximum: < 1000 ID int32 `json:"id"` // The Pet to add to this NoModel items bucket. // Pets can appear more than once in the bucket // // required: true Pet *mods.Pet `json:"pet"` // The amount of pets to add to this bucket. // // required: true // minimum: 1 // maximum: 10 Quantity int16 `json:"quantity"` // Notes to add to this item. // This can be used to add special instructions. // // // required: false Notes string `json:"notes"` } `json:"items"` }
NoParams is a struct that exists in a package but is not annotated with the swagger params annotations so it should now show up in a test
swagger:parameters someOperation anotherOperation
type OrderBodyParams ¶
type OrderBodyParams struct { // The order to submit. // // in: body // required: true Order *models.StoreOrder `json:"order"` }
An OrderBodyParams model.
This is used for operations that want an Order as body of the request swagger:parameters updateOrder createOrder
type Resp ¶
type Resp struct {
// in: body
Body *user `json:"user"`
}
Resp a response for testing
swagger:response resp
type SomeResponse ¶
type SomeResponse struct { // ID of this some response instance. // ids in this application start at 11 and are smaller than 1000 // // minimum: > 10 // maximum: < 1000 ID int64 `json:"id"` // The Score of this model // // minimum: 3 // maximum: 45 // multiple of: 3 Score int32 `json:"score"` // Name of this some response instance // // min length: 4 // max length: 50 // pattern: [A-Za-z0-9-.]* Name string `json:"x-hdr-name"` // Created holds the time when this entry was created Created strfmt.DateTime `json:"created"` // a FooSlice has foos which are strings // // min items: 3 // max items: 10 // unique: true // items.minLength: 3 // items.maxLength: 10 // items.pattern: \w+ // collection format: pipe FooSlice []string `json:"foo_slice"` // a BarSlice has bars which are strings // // min items: 3 // max items: 10 // unique: true // items.minItems: 4 // items.maxItems: 9 // items.items.minItems: 5 // items.items.maxItems: 8 // items.items.items.minLength: 3 // items.items.items.maxLength: 10 // items.items.items.pattern: \w+ // collection format: pipe BarSlice [][][]string `json:"bar_slice"` // the items for this order // // in: body Items []struct { // ID of this some response instance. // ids in this application start at 11 and are smaller than 1000 // // required: true // minimum: > 10 // maximum: < 1000 ID int32 `json:"id"` // The Pet to add to this NoModel items bucket. // Pets can appear more than once in the bucket // // required: true Pet *mods.Pet `json:"pet"` // The amount of pets to add to this bucket. // // required: true // minimum: 1 // maximum: 10 Quantity int16 `json:"quantity"` // Notes to add to this item. // This can be used to add special instructions. // // required: false Notes string `json:"notes"` } `json:"items"` }
A SomeResponse is a dummy response object to test parsing.
The properties are the same as the other structs used to test parsing.
swagger:response someResponse
type ValidationError ¶
type ValidationError struct { // The error message // in: body Body struct { // The validation message Message string // An optional field name to which this validation applies FieldName string } }
A ValidationError is an error that is used when the required input fails validation. swagger:response validationError