Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
update go samples
  • Loading branch information
wing328 committed Jun 3, 2020
commit 161f57b114783e00c577bf7516f9cac2bf7fac03
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableModel200Response) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ import (
// AdditionalPropertiesAnyType struct for AdditionalPropertiesAnyType
type AdditionalPropertiesAnyType struct {
Name *string `json:"name,omitempty"`
AdditionalProperties map[string]interface{}
}

type _AdditionalPropertiesAnyType AdditionalPropertiesAnyType

// NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
Expand Down Expand Up @@ -72,9 +75,31 @@ func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) {
if o.Name != nil {
toSerialize["name"] = o.Name
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}

return json.Marshal(toSerialize)
}

func (o *AdditionalPropertiesAnyType) UnmarshalJSON(bytes []byte) (err error) {
varAdditionalPropertiesAnyType := _AdditionalPropertiesAnyType{}

if err = json.Unmarshal(bytes, &varAdditionalPropertiesAnyType); err == nil {
*o = AdditionalPropertiesAnyType(varAdditionalPropertiesAnyType)
}

additionalProperties := make(map[string]interface{})

if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "name")
o.AdditionalProperties = additionalProperties
}

return err
}

type NullableAdditionalPropertiesAnyType struct {
value *AdditionalPropertiesAnyType
isSet bool
Expand Down Expand Up @@ -111,3 +136,4 @@ func (v *NullableAdditionalPropertiesAnyType) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesArray) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesBoolean) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,4 @@ func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesInteger) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesNumber) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesObject) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableAdditionalPropertiesString) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ func (v *NullableAnimal) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,4 @@ func (v *NullableApiResponse) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,4 @@ func (v *NullableArrayTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ func (v *NullableBigCat) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableBigCatAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,4 @@ func (v *NullableCapitalization) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ func (v *NullableCat) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,4 @@ func (v *NullableCategory) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableClassModel) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableClient) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ func (v *NullableDog) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,4 @@ func (v *NullableEnumTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ func (v *NullableFile) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -553,3 +553,4 @@ func (v *NullableFormatTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableList) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ func (v *NullableMapTest) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,4 @@ func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,4 @@ func (v *NullableName) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,4 @@ func (v *NullableOrder) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,4 @@ func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,4 @@ func (v *NullablePet) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableReturn) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ func (v *NullableTag) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,4 @@ func (v *NullableTypeHolderDefault) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,4 @@ func (v *NullableTypeHolderExample) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,4 @@ func (v *NullableUser) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}


Original file line number Diff line number Diff line change
Expand Up @@ -1119,3 +1119,4 @@ func (v *NullableXmlItem) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}