github.com/josephspurrier/go-swagger@v0.2.1-0.20221129144919-1f672a142a00/fixtures/goparsing/go118/nomodel.go (about) 1 //go:build go1.18 2 // +build go1.18 3 4 package go118 5 6 // An Interfaced struct contains objects with interface definitions 7 type Interfaced struct { 8 CustomData any `json:"custom_data"` 9 } 10 11 type MarshalTextMap map[string]any 12 13 func (cm MarshalTextMap) MarshalText() ([]byte, error) { 14 return []byte("hola desde CustomMap"), nil 15 } 16 17 // swagger:type object 18 type SomeObjectMap any 19 20 // swagger:model namedWithType 21 type NamedWithType struct { 22 SomeMap SomeObjectMap `json:"some_map"` 23 } 24 25 // SomeObject is a type that refines an untyped map 26 type SomeObject map[string]any 27 28 // swagger:parameters putNumPlate 29 type NumPlates struct { 30 // in: body 31 NumPlates any `json:"num_plates"` 32 } 33 34 // swagger:response 35 type NumPlatesResp struct { 36 // in: body 37 NumPlates any `json:"num_plates"` 38 } 39 40 // swagger:model transportErr 41 type transportErr struct { 42 // Message is a human-readable description of the error. 43 // Required: true 44 Message string `json:"message"` 45 // Data is additional data about the error. 46 Data any `json:"data,omitempty"` // <- for this use case. Unsupported type "invalid type" 47 }