Documentation
¶
Index ¶
- func GetOpenAPISpecJSON() ([]byte, error)
- type Test
- func (t *Test) ApplyDefaults()
- func (t Test) AsTestAnyOf0() (TestAnyOf0, error)
- func (t Test) AsTestAnyOf1() (TestAnyOf1, error)
- func (t *Test) FromTestAnyOf0(v TestAnyOf0) error
- func (t *Test) FromTestAnyOf1(v TestAnyOf1) error
- func (t Test) MarshalJSON() ([]byte, error)
- func (t *Test) MergeTestAnyOf0(v TestAnyOf0) error
- func (t *Test) MergeTestAnyOf1(v TestAnyOf1) error
- func (t *Test) UnmarshalJSON(b []byte) error
- type TestAnyOf0
- type TestAnyOf1
- type TestAnyOf1FieldA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPISpecJSON ¶
GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.
Types ¶
type Test ¶
type Test struct {
// contains filtered or unexported fields
}
func (*Test) ApplyDefaults ¶
func (t *Test) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
func (Test) AsTestAnyOf0 ¶
func (t Test) AsTestAnyOf0() (TestAnyOf0, error)
AsTestAnyOf0 returns the union data inside the Test as a TestAnyOf0.
func (Test) AsTestAnyOf1 ¶
func (t Test) AsTestAnyOf1() (TestAnyOf1, error)
AsTestAnyOf1 returns the union data inside the Test as a TestAnyOf1.
func (*Test) FromTestAnyOf0 ¶
func (t *Test) FromTestAnyOf0(v TestAnyOf0) error
FromTestAnyOf0 overwrites any union data inside the Test as the provided TestAnyOf0.
func (*Test) FromTestAnyOf1 ¶
func (t *Test) FromTestAnyOf1(v TestAnyOf1) error
FromTestAnyOf1 overwrites any union data inside the Test as the provided TestAnyOf1.
func (Test) MarshalJSON ¶
func (*Test) MergeTestAnyOf0 ¶
func (t *Test) MergeTestAnyOf0(v TestAnyOf0) error
MergeTestAnyOf0 performs a merge with any union data inside the Test, using the provided TestAnyOf0.
func (*Test) MergeTestAnyOf1 ¶
func (t *Test) MergeTestAnyOf1(v TestAnyOf1) error
MergeTestAnyOf1 performs a merge with any union data inside the Test, using the provided TestAnyOf1.
func (*Test) UnmarshalJSON ¶
type TestAnyOf0 ¶
type TestAnyOf0 struct {
FieldA *string `form:"fieldA,omitempty" json:"fieldA,omitempty"`
}
#/components/schemas/test/anyOf/0
func (*TestAnyOf0) ApplyDefaults ¶
func (s *TestAnyOf0) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type TestAnyOf1 ¶
type TestAnyOf1 struct {
FieldA *string `form:"fieldA,omitempty" json:"fieldA,omitempty"`
}
#/components/schemas/test/anyOf/1
func (*TestAnyOf1) ApplyDefaults ¶
func (s *TestAnyOf1) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type TestAnyOf1FieldA ¶
type TestAnyOf1FieldA string
#/components/schemas/test/anyOf/1/properties/fieldA
const ( Foo TestAnyOf1FieldA = "foo" Bar TestAnyOf1FieldA = "bar" )