Documentation ¶
Index ¶
- type AllOfModel
- type ComplexerOne
- type FormattedModel
- type Interfaced
- type MapTastic
- type NoModel
- type OtherTypes
- type OverridingOne
- type Pointdexter
- type PrimateModel
- type SimpleComplexModel
- type SimpleOne
- type SliceAndDice
- type SomeIntType
- type SomeIntsType
- type SomePettedType
- type SomePettedsType
- type SomeStringType
- type SomeStringsType
- type SomeTimeType
- type SomeTimedType
- type SomeTimedsType
- type SomeTimesType
- type Something
- type SomethingType
- type SomethingsType
- type StoreOrder
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllOfModel ¶
type AllOfModel struct { // swagger:allOf SimpleOne // swagger:allOf mods.Notable Something // not annotated with anything, so should be included CreatedAt strfmt.DateTime `json:"createdAt"` }
An AllOfModel is composed out of embedded structs but it should build an allOf property
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
type FormattedModel ¶
type FormattedModel struct { A strfmt.Base64 `json:"a"` B strfmt.CreditCard `json:"b"` C strfmt.Date `json:"c"` D strfmt.DateTime `json:"d"` E strfmt.Duration `json:"e"` F strfmt.Email `json:"f"` G strfmt.HexColor `json:"g"` H strfmt.Hostname `json:"h"` I strfmt.IPv4 `json:"i"` J strfmt.IPv6 `json:"j"` K strfmt.ISBN `json:"k"` L strfmt.ISBN10 `json:"l"` M strfmt.ISBN13 `json:"m"` N strfmt.RGBColor `json:"n"` O strfmt.SSN `json:"o"` P strfmt.URI `json:"p"` Q strfmt.UUID `json:"q"` R strfmt.UUID3 `json:"r"` S strfmt.UUID4 `json:"s"` T strfmt.UUID5 `json:"t"` }
A FormattedModel is a struct with only strfmt types
It only has values 1 level deep and is used for testing the conversion
type Interfaced ¶
type Interfaced struct {
CustomData interface{} `json:"custom_data"`
}
An Interfaced struct contains objects with interface definitions
type MapTastic ¶
type MapTastic struct { IDs map[string]int64 `json:"ids"` Names map[string]string `json:"names"` UUIDs map[string]strfmt.UUID `json:"uuids"` Tops map[string]Something `json:"tops"` NotSels map[string]mods.NotSelected `json:"notSels"` Embs map[string]struct { CID map[string]int64 `json:"cid"` Baz map[string]string `json:"baz"` } `json:"embs"` PtrIDs map[string]*int64 `json:"ptrIds"` PtrNames map[string]*string `json:"ptrNames"` PtrUUIDs map[string]*strfmt.UUID `json:"ptrUuids"` PtrTops map[string]*Something `json:"ptrTops"` PtrNotSels map[string]*mods.NotSelected `json:"ptrNotSels"` PtrEmbs map[string]*struct { PtrCID map[string]*int64 `json:"ptrCid"` PtrBaz map[string]*string `json:"ptrBaz"` } `json:"ptrEmbs"` }
A MapTastic struct contains only maps
the values of the maps are structs, primitives or string formats there is also a pointer version of each property
type NoModel ¶
type NoModel 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 int64 `json:"id"` Ignored string `json:"-"` IgnoredOther string `json:"-,omitempty"` // The Score of this model // // required: true // minimum: 3 // maximum: 45 // multiple of: 3 Score int32 `json:"score"` // Name of this no model instance // // min length: 4 // max length: 50 // pattern: [A-Za-z0-9-.]* // required: true Name string `json:"name"` // Created holds the time when this entry was created // // required: false // read only: true 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+ 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+ BarSlice [][][]string `json:"bar_slice"` // the items for this order 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"` AlsoIgnored string `json:"-"` } `json:"items"` }
NoModel is a struct without an annotation. NoModel exists in a package but is not annotated with the swagger model annotations so it should now show up in a test.
type OtherTypes ¶
type OtherTypes struct { Named SomeStringType `json:"named"` Numbered SomeIntType `json:"numbered"` Dated SomeTimeType `json:"dated"` Timed SomeTimedType `json:"timed"` Petted SomePettedType `json:"petted"` Somethinged SomethingType `json:"somethinged"` ManyNamed SomeStringsType `json:"manyNamed"` ManyNumbered SomeIntsType `json:"manyNumbered"` ManyDated SomeTimesType `json:"manyDated"` ManyTimed SomeTimedsType `json:"manyTimed"` ManyPetted SomePettedsType `json:"manyPetted"` ManySomethinged SomethingsType `json:"manySomethinged"` Nameds []SomeStringType `json:"nameds"` Numbereds []SomeIntType `json:"numbereds"` Dateds []SomeTimeType `json:"dateds"` Timeds []SomeTimedType `json:"timeds"` Petteds []SomePettedType `json:"petteds"` Somethingeds []SomethingType `json:"somethingeds"` ModsNamed mods.SomeStringType `json:"modsNamed"` ModsNumbered mods.SomeIntType `json:"modsNumbered"` ModsDated mods.SomeTimeType `json:"modsDated"` ModsTimed mods.SomeTimedType `json:"modsTimed"` ModsPetted mods.SomePettedType `json:"modsPetted"` ModsNameds []mods.SomeStringType `json:"modsNameds"` ModsNumbereds []mods.SomeIntType `json:"modsNumbereds"` ModsDateds []mods.SomeTimeType `json:"modsDateds"` ModsTimeds []mods.SomeTimedType `json:"modsTimeds"` ModsPetteds []mods.SomePettedType `json:"modsPetteds"` ManyModsNamed mods.SomeStringsType `json:"manyModsNamed"` ManyModsNumbered mods.SomeIntsType `json:"manyModsNumbered"` ManyModsDated mods.SomeTimesType `json:"manyModsDated"` ManyModsTimed mods.SomeTimedsType `json:"manyModsTimed"` ManyModsPetted mods.SomePettedsType `json:"manyModsPetted"` }
A OtherTypes struct contains type aliases
type OverridingOne ¶
An OverridingOne is composed of a SimpleOne and overrides a field
type Pointdexter ¶
type Pointdexter struct { ID *int64 `json:"id"` Name *string `json:"name"` T *strfmt.UUID5 `json:"t"` Top *Something `json:"top"` NotSel *mods.NotSelected `json:"notSel"` Emb *struct { CID *int64 `json:"cid"` Baz *string `json:"baz"` } `json:"emb"` }
Pointdexter is a struct with only pointers
type PrimateModel ¶
type PrimateModel struct { A bool `json:"a"` B rune `json:"b"` C string `json:"c"` D int `json:"d"` E int8 `json:"e"` F int16 `json:"f"` G int32 `json:"g"` H int64 `json:"h"` I uint `json:"i"` J uint8 `json:"j"` K uint16 `json:"k"` L uint32 `json:"l"` M uint64 `json:"m"` N float32 `json:"n"` O float64 `json:"o"` }
A PrimateModel is a struct with nothing but primitives.
It only has values 1 level deep and each of those is of a very simple builtin type.
type SimpleComplexModel ¶
type SimpleComplexModel struct { Top Something `json:"top"` NotSel mods.NotSelected `json:"notSel"` Emb struct { CID int64 `json:"cid"` Baz string `json:"baz"` } `json:"emb"` }
A SimpleComplexModel is a struct with only other struct types
It doesn't have slices or arrays etc but only complex types so also no primitives or string formatters
type SliceAndDice ¶
type SliceAndDice struct { IDs []int64 `json:"ids"` Names []string `json:"names"` UUIDs []strfmt.UUID `json:"uuids"` Tops []Something `json:"tops"` NotSels []mods.NotSelected `json:"notSels"` Embs []struct { CID []int64 `json:"cid"` Baz []string `json:"baz"` } `json:"embs"` PtrIDs []*int64 `json:"ptrIds"` PtrNames []*string `json:"ptrNames"` PtrUUIDs []*strfmt.UUID `json:"ptrUuids"` PtrTops []*Something `json:"ptrTops"` PtrNotSels []*mods.NotSelected `json:"ptrNotSels"` PtrEmbs []*struct { PtrCID []*int64 `json:"ptrCid"` PtrBaz []*string `json:"ptrBaz"` } `json:"ptrEmbs"` }
A SliceAndDice struct contains only slices
the elements of the slices are structs, primitives or string formats there is also a pointer version of each property
type SomePettedsType ¶
SomePettedsType is a type that refines mods.Pet
type SomeStringsType ¶
type SomeStringsType []string
SomeStringsType is a type that refines []string
type SomeTimeType ¶
SomeTimeType is a type that refines time.Time swagger:strfmt date-time
type SomeTimedType ¶
SomeTimedType is a type that refines strfmt.DateTime
type SomeTimedsType ¶
SomeTimedsType is a type that refines strfmt.DateTime
type SomeTimesType ¶
SomeTimesType is a type that refines time.Time swagger:strfmt date-time
type SomethingType ¶
type SomethingType Something
SomethingType is a type that refines a type contained in the same package
type SomethingsType ¶
type SomethingsType []Something
SomethingsType is a type that refines a type contained in the same package
type StoreOrder ¶
type StoreOrder struct { // the id for this order // // required: true // min: 1 ID int64 `json:"id"` // the name for this user // // required: true // min length: 3 UserID int64 `json:"userId"` // the items for this order Items []struct { ID int32 `json:"id"` Pet mods.Pet `json:"pet"` Quantity int16 `json:"quantity"` } `json:"items"` }
StoreOrder represents an order in this application.
An order can either be created, processed or completed.
swagger:model order
type User ¶
type User struct { // the id for this user // // required: true // min: 1 ID int64 `json:"id"` // the name for this user // required: true // min length: 3 Name string `json:"name"` // the email address for this user // // required: true // unique: true Email strfmt.Email `json:"login"` // the friends for this user Friends []User `json:"friends"` }
User represents the user for this application
A user is the security principal for this aplication. It's also used as one of main axis for reporting.
A user can have friends with whom they can share what they like.
swagger:model