github.com/go-swagger/go-swagger@v0.31.0/fixtures/goparsing/go118/nomodel.go (about)

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