Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
489985d
Handle null type
sebastien-rosset Apr 30, 2020
c16089e
Handle null type
sebastien-rosset Apr 30, 2020
26865b3
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
48c310e
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
fddb63b
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
cf4e9f8
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset Apr 30, 2020
3b59b47
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset May 1, 2020
b362f92
Handle null type. Add 'null' type in the OAS document for testing pur…
sebastien-rosset May 1, 2020
ae93643
improve documentation
sebastien-rosset May 1, 2020
f5acfba
Handle 'null' type
sebastien-rosset May 1, 2020
6ba1523
Handle 'null' type. Add unit tests
sebastien-rosset May 1, 2020
de13169
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 1, 2020
2a6a87a
Add NullType for go
sebastien-rosset May 2, 2020
86bc4c0
Add NullType for go
sebastien-rosset May 2, 2020
6b9c0ce
fix modeling of AnyType for go-experimental
sebastien-rosset May 2, 2020
b0d221e
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 2, 2020
a302894
execute scripts in bin directory
sebastien-rosset May 3, 2020
e449c82
resolve merge conflicts
sebastien-rosset May 3, 2020
043f247
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 4, 2020
1e14c94
Add review comments
sebastien-rosset May 4, 2020
747803e
Add 'null' type in oneOf
sebastien-rosset May 4, 2020
aa06a89
Improve OAS YAML file for golang openapi3 samples
sebastien-rosset May 4, 2020
543d406
'Any type' includes the null value, so 'isNullable' should be set to …
sebastien-rosset May 4, 2020
81093c7
'Any type' includes the null value, so 'isNullable' should be set to …
sebastien-rosset May 4, 2020
9a54ea1
Handle AnyType and NullType
sebastien-rosset May 5, 2020
dc7a7e0
handle anytype for go-experimental
sebastien-rosset May 5, 2020
ddc810c
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 5, 2020
03ec914
Log warning instead of error
sebastien-rosset May 5, 2020
bdf3653
anyOf/oneOf
sebastien-rosset May 5, 2020
9dbae45
Change x-golang-is-container extension to x-golang-has-wrapper
sebastien-rosset May 5, 2020
e1417ec
Add code comments
sebastien-rosset May 5, 2020
480ecbe
Handle Object and any type
sebastien-rosset May 5, 2020
a58f121
Handle Object and any type
sebastien-rosset May 5, 2020
01ff36e
Handle object and any type
sebastien-rosset May 5, 2020
ec97db3
add code comments
sebastien-rosset May 6, 2020
431356c
handle additional properties
sebastien-rosset May 6, 2020
93752ff
handle additional properties
sebastien-rosset May 6, 2020
261dbcd
handle additional properties
sebastien-rosset May 6, 2020
aa6b6df
handle anytype and objecttype for go-exerimental
sebastien-rosset May 6, 2020
90c0c9e
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
f56c812
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
b159356
Better names for the OAS document test properties
sebastien-rosset May 7, 2020
ef5149e
Move golang changes to a separate branch
sebastien-rosset May 7, 2020
84162be
Run samples scripts
sebastien-rosset May 7, 2020
ee786cb
Run samples scripts
sebastien-rosset May 7, 2020
058694b
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 7, 2020
82cb0e9
fix unit test issues
sebastien-rosset May 8, 2020
2c5c1cf
Handle none type
sebastien-rosset May 8, 2020
0694f83
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 8, 2020
b6afbc6
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 8, 2020
f275dc9
Fix index out of range exception
sebastien-rosset May 8, 2020
93cc8c8
fix formatting issues
sebastien-rosset May 8, 2020
6939648
fix formatting issues
sebastien-rosset May 8, 2020
8bdca05
fix formatting issues. Finally figured out how to check formatting in…
sebastien-rosset May 8, 2020
4c01344
fix formatting issues
sebastien-rosset May 8, 2020
537c28b
resolve merge conflicts
sebastien-rosset May 11, 2020
71d550c
resolve merge conflicts
sebastien-rosset May 11, 2020
11c52e4
resolve merge conflicts
sebastien-rosset May 12, 2020
eadca7a
Add reference to oneOf schema
sebastien-rosset May 12, 2020
603b6fb
Add model showing unit test failure with ref to oneOf schema
sebastien-rosset May 12, 2020
e16c24e
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 12, 2020
7b2ed9e
Updates get_discriminator_class to return visited_composed_classes
spacether May 12, 2020
9811b8c
Fixes broken test, adds is_valid_type
spacether May 12, 2020
8f1c202
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 12, 2020
5e48c72
run samples scripts
sebastien-rosset May 12, 2020
245c850
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 12, 2020
942edf0
move unit test to test_drawing.py file
sebastien-rosset May 12, 2020
f5050b0
Add more unit tests
sebastien-rosset May 12, 2020
251086b
invoke git pull from spacether fork
sebastien-rosset May 12, 2020
2feed29
invoke git pull from spacether fork
sebastien-rosset May 12, 2020
3a05ff6
invoke git pull from spacether fork
sebastien-rosset May 12, 2020
40ecbfb
Improve unit tests
sebastien-rosset May 12, 2020
d5bd3d3
Merge branch 'python-null-type' of github.com:CiscoM31/openapi-genera…
sebastien-rosset May 13, 2020
42f6781
Add is_nullable_type util function
sebastien-rosset May 13, 2020
c4bc09d
Add unit test for null value
sebastien-rosset May 13, 2020
094e00d
Add 'ShapeOrNull' type to handle the oneOf/anyOf scenario when the ch…
sebastien-rosset May 13, 2020
a0aa380
Support schema property which has to 'oneOf' schema and child schema…
sebastien-rosset May 13, 2020
7274ed5
Support schema property which has to 'oneOf' schema and child schema…
sebastien-rosset May 13, 2020
bb44600
Support schema property which has to 'oneOf' schema and child schema…
sebastien-rosset May 13, 2020
41e97e6
Mustache template should use invokerPackage tag to generate import
sebastien-rosset May 13, 2020
1760f6a
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
sebastien-rosset May 13, 2020
b26548e
handle null type in oneOf/anyOf
sebastien-rosset May 13, 2020
87ed97e
handle null type in oneOf/anyOf
sebastien-rosset May 13, 2020
7c4cd94
Add more unit test for nullable shape
sebastien-rosset May 13, 2020
3ae466e
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
sebastien-rosset May 13, 2020
6cfe426
resolve merge conflicts
sebastien-rosset May 13, 2020
274ab6c
resolve merge conflicts
sebastien-rosset May 13, 2020
6c55fd9
resolve merge conflicts
sebastien-rosset May 13, 2020
b628667
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
sebastien-rosset May 13, 2020
fddadc3
Merge branch 'master' of github.com:CiscoM31/openapi-generator into p…
sebastien-rosset May 13, 2020
8ec12af
handle null type in oneOf/anyOf
sebastien-rosset May 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
execute scripts in bin directory
  • Loading branch information
sebastien-rosset committed May 3, 2020
commit a302894c3cfa1ee7314876ebc5a8b021a64e21e8
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Name | Type | Description | Notes
**MapInteger** | Pointer to **map[string]int32** | | [optional]
**MapBoolean** | Pointer to **map[string]bool** | | [optional]
**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional]
**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional]
**MapArrayAnytype** | Pointer to [**map[string][]ObjectType**](array.md) | | [optional]
**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional]
**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**MapMapAnytype** | Pointer to [**map[string]map[string]ObjectType**](map.md) | | [optional]
**Anytype1** | Pointer to [**ObjectType**](.md) | | [optional]
**Anytype2** | Pointer to [**ObjectType**](.md) | | [optional]
**Anytype3** | Pointer to [**ObjectType**](.md) | | [optional]

## Methods

Expand Down Expand Up @@ -162,20 +162,20 @@ HasMapArrayInteger returns a boolean if a field has been set.

### GetMapArrayAnytype

`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{}`
`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]ObjectType`

GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise.

### GetMapArrayAnytypeOk

`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (*map[string][]map[string]interface{}, bool)`
`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (*map[string][]ObjectType, bool)`

GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMapArrayAnytype

`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})`
`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]ObjectType)`

SetMapArrayAnytype sets MapArrayAnytype field to given value.

Expand Down Expand Up @@ -212,20 +212,20 @@ HasMapMapString returns a boolean if a field has been set.

### GetMapMapAnytype

`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{}`
`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]ObjectType`

GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise.

### GetMapMapAnytypeOk

`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (*map[string]map[string]map[string]interface{}, bool)`
`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (*map[string]map[string]ObjectType, bool)`

GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMapMapAnytype

`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})`
`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]ObjectType)`

SetMapMapAnytype sets MapMapAnytype field to given value.

Expand All @@ -237,20 +237,20 @@ HasMapMapAnytype returns a boolean if a field has been set.

### GetAnytype1

`func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}`
`func (o *AdditionalPropertiesClass) GetAnytype1() ObjectType`

GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise.

### GetAnytype1Ok

`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*map[string]interface{}, bool)`
`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*ObjectType, bool)`

GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAnytype1

`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})`
`func (o *AdditionalPropertiesClass) SetAnytype1(v ObjectType)`

SetAnytype1 sets Anytype1 field to given value.

Expand All @@ -262,20 +262,20 @@ HasAnytype1 returns a boolean if a field has been set.

### GetAnytype2

`func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{}`
`func (o *AdditionalPropertiesClass) GetAnytype2() ObjectType`

GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise.

### GetAnytype2Ok

`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*map[string]interface{}, bool)`
`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*ObjectType, bool)`

GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAnytype2

`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})`
`func (o *AdditionalPropertiesClass) SetAnytype2(v ObjectType)`

SetAnytype2 sets Anytype2 field to given value.

Expand All @@ -287,20 +287,20 @@ HasAnytype2 returns a boolean if a field has been set.

### GetAnytype3

`func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{}`
`func (o *AdditionalPropertiesClass) GetAnytype3() ObjectType`

GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise.

### GetAnytype3Ok

`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*map[string]interface{}, bool)`
`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*ObjectType, bool)`

GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAnytype3

`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})`
`func (o *AdditionalPropertiesClass) SetAnytype3(v ObjectType)`

SetAnytype3 sets Anytype3 field to given value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type AdditionalPropertiesClass struct {
MapInteger *map[string]int32 `json:"map_integer,omitempty"`
MapBoolean *map[string]bool `json:"map_boolean,omitempty"`
MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"`
MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"`
MapArrayAnytype *map[string][]ObjectType `json:"map_array_anytype,omitempty"`
MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"`
MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"`
Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"`
Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"`
Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"`
MapMapAnytype *map[string]map[string]ObjectType `json:"map_map_anytype,omitempty"`
Anytype1 *ObjectType `json:"anytype_1,omitempty"`
Anytype2 *ObjectType `json:"anytype_2,omitempty"`
Anytype3 *ObjectType `json:"anytype_3,omitempty"`
}

// NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object
Expand Down Expand Up @@ -206,17 +206,17 @@ func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) {
}

// GetMapArrayAnytype returns the MapArrayAnytype field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} {
func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]ObjectType {
if o == nil || o.MapArrayAnytype == nil {
var ret map[string][]map[string]interface{}
var ret map[string][]ObjectType
return ret
}
return *o.MapArrayAnytype
}

// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (*map[string][]map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (*map[string][]ObjectType, bool) {
if o == nil || o.MapArrayAnytype == nil {
return nil, false
}
Expand All @@ -232,8 +232,8 @@ func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool {
return false
}

// SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field.
func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{}) {
// SetMapArrayAnytype gets a reference to the given map[string][]ObjectType and assigns it to the MapArrayAnytype field.
func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]ObjectType) {
o.MapArrayAnytype = &v
}

Expand Down Expand Up @@ -270,17 +270,17 @@ func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]stri
}

// GetMapMapAnytype returns the MapMapAnytype field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} {
func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]ObjectType {
if o == nil || o.MapMapAnytype == nil {
var ret map[string]map[string]map[string]interface{}
var ret map[string]map[string]ObjectType
return ret
}
return *o.MapMapAnytype
}

// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (*map[string]map[string]map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (*map[string]map[string]ObjectType, bool) {
if o == nil || o.MapMapAnytype == nil {
return nil, false
}
Expand All @@ -296,23 +296,23 @@ func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool {
return false
}

// SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field.
func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{}) {
// SetMapMapAnytype gets a reference to the given map[string]map[string]ObjectType and assigns it to the MapMapAnytype field.
func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]ObjectType) {
o.MapMapAnytype = &v
}

// GetAnytype1 returns the Anytype1 field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} {
func (o *AdditionalPropertiesClass) GetAnytype1() ObjectType {
if o == nil || o.Anytype1 == nil {
var ret map[string]interface{}
var ret ObjectType
return ret
}
return *o.Anytype1
}

// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*ObjectType, bool) {
if o == nil || o.Anytype1 == nil {
return nil, false
}
Expand All @@ -328,23 +328,23 @@ func (o *AdditionalPropertiesClass) HasAnytype1() bool {
return false
}

// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field.
func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) {
// SetAnytype1 gets a reference to the given ObjectType and assigns it to the Anytype1 field.
func (o *AdditionalPropertiesClass) SetAnytype1(v ObjectType) {
o.Anytype1 = &v
}

// GetAnytype2 returns the Anytype2 field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} {
func (o *AdditionalPropertiesClass) GetAnytype2() ObjectType {
if o == nil || o.Anytype2 == nil {
var ret map[string]interface{}
var ret ObjectType
return ret
}
return *o.Anytype2
}

// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*ObjectType, bool) {
if o == nil || o.Anytype2 == nil {
return nil, false
}
Expand All @@ -360,23 +360,23 @@ func (o *AdditionalPropertiesClass) HasAnytype2() bool {
return false
}

// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field.
func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) {
// SetAnytype2 gets a reference to the given ObjectType and assigns it to the Anytype2 field.
func (o *AdditionalPropertiesClass) SetAnytype2(v ObjectType) {
o.Anytype2 = &v
}

// GetAnytype3 returns the Anytype3 field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} {
func (o *AdditionalPropertiesClass) GetAnytype3() ObjectType {
if o == nil || o.Anytype3 == nil {
var ret map[string]interface{}
var ret ObjectType
return ret
}
return *o.Anytype3
}

// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*ObjectType, bool) {
if o == nil || o.Anytype3 == nil {
return nil, false
}
Expand All @@ -392,8 +392,8 @@ func (o *AdditionalPropertiesClass) HasAnytype3() bool {
return false
}

// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field.
func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) {
// SetAnytype3 gets a reference to the given ObjectType and assigns it to the Anytype3 field.
func (o *AdditionalPropertiesClass) SetAnytype3(v ObjectType) {
o.Anytype3 = &v
}

Expand Down
72 changes: 72 additions & 0 deletions samples/client/petstore/go-experimental/go-petstore/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,78 @@ func (v *NullType) UnmarshalJSON(src []byte) error {
return errors.New("Cannot unmarshal value into 'null' type")
}

// AnyType is a type whose value can anything.
type AnyType struct{
value interface{}
isSet bool
}

func NewAnyType(val interface{}) *AnyType {
return &AnyType{value: val, isSet: true}
}

func (v AnyType) Get() interface{} {
return v.value
}

func (v *AnyType) Set(val interface{}) {
v.value = val
v.isSet = true
}

func (v AnyType) IsSet() bool {
return v.isSet
}

func (v *AnyType) Unset() {
v.isSet = false
}

func (v AnyType) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}

func (v *AnyType) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

// ObjectType is a type whose value can be an object with undeclared properties.
type ObjectType struct{
value map[string]interface{}
isSet bool
}

func NewObjectType(val map[string]interface{}) *ObjectType {
return &ObjectType{value: val, isSet: true}
}

func (v ObjectType) Get() map[string]interface{} {
return v.value
}

func (v *ObjectType) Set(val map[string]interface{}) {
v.value = val
v.isSet = true
}

func (v ObjectType) IsSet() bool {
return v.isSet
}

func (v *ObjectType) Unset() {
v.isSet = false
}

func (v ObjectType) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}

func (v *ObjectType) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

type NullableBool struct {
value *bool
isSet bool
Expand Down
Loading