Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPISpecJSON ¶
GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.
Types ¶
type MyTestRequest ¶
type MyTestRequest struct {
// A array of enum values
Field1 []TestField1Item `json:"field1,omitempty" form:"field1,omitempty"`
// A nested object with allocated name
Field2 *MyTestRequestNestedField `json:"field2,omitempty" form:"field2,omitempty"`
// A nested object without allocated name
Field3 *TestField3 `json:"field3,omitempty" form:"field3,omitempty"`
}
#/components/schemas/Test
func (*MyTestRequest) ApplyDefaults ¶
func (s *MyTestRequest) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type MyTestRequestNestedField ¶
type MyTestRequestNestedField struct {
Field1 bool `json:"field1" form:"field1"`
Field2 string `json:"field2" form:"field2"`
}
#/components/schemas/Test/properties/field2 A nested object with allocated name
func (*MyTestRequestNestedField) ApplyDefaults ¶
func (s *MyTestRequestNestedField) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type TestField1 ¶
type TestField1 = []TestField1Item
#/components/schemas/Test/properties/field1 A array of enum values
type TestField1Item ¶
type TestField1Item string
#/components/schemas/Test/properties/field1/items
const ( Option1 TestField1Item = "option1" Option2 TestField1Item = "option2" )
type TestField3 ¶
type TestField3 struct {
Field1 bool `json:"field1" form:"field1"`
Field2 string `json:"field2" form:"field2"`
}
#/components/schemas/Test/properties/field3 A nested object without allocated name
func (*TestField3) ApplyDefaults ¶
func (s *TestField3) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
Click to show internal directories.
Click to hide internal directories.