From 2d69e1608c917b614ef6e2cb9533a07309b0750a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 4 Aug 2024 18:32:13 +0800 Subject: [PATCH] update samples --- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../src/Org.OpenAPITools/Model/FormatTest.cs | 10 +++++----- .../go/go-petstore/model_filter_type_range.go | 20 ++++++++++++++++++- .../go/go-petstore/model_filter_type_regex.go | 20 ++++++++++++++++++- 11 files changed, 83 insertions(+), 47 deletions(-) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index ccc8525ec83d..b0822c334f55 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index ccc8525ec83d..b0822c334f55 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index ccc8525ec83d..b0822c334f55 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index ccc8525ec83d..b0822c334f55 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index 909a36ff4bf6..74dddf235e24 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 8cc65ff423b6..5ba09166f394 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -198,7 +198,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -224,7 +224,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -237,7 +237,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -250,7 +250,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -263,7 +263,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index 909a36ff4bf6..74dddf235e24 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index 5de7cb1bba73..6ca85f86117d 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -238,7 +238,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -251,7 +251,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -264,7 +264,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index ccc8525ec83d..b0822c334f55 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int32Range /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int32RangeOption { get; private set; } /// @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Negative /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeOption { get; private set; } /// @@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64NegativeExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64NegativeExclusiveOption { get; private set; } /// @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64Positive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveOption { get; private set; } /// @@ -261,7 +261,7 @@ namespace Org.OpenAPITools.Model /// Used to track the state of Int64PositiveExclusive /// [JsonIgnore] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public Option Int64PositiveExclusiveOption { get; private set; } /// diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_range.go b/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_range.go index 1997a473f62b..cfb9c006444c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_range.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_range.go @@ -69,6 +69,7 @@ func (o *FilterTypeRange) SetType(v string) { o.Type = v } + // GetData returns the Data field value if set, zero value otherwise. func (o *FilterTypeRange) GetData() []string { if o == nil || IsNil(o.Data) { @@ -131,6 +132,11 @@ func (o *FilterTypeRange) UnmarshalJSON(data []byte) (err error) { "type", } + // defaultValueFuncMap captures the default values for required properties. + // These values are used when required properties are missing from the payload. + defaultValueFuncMap := map[string]func() interface{} { + } + var defaultValueApplied bool allProperties := make(map[string]interface{}) err = json.Unmarshal(data, &allProperties) @@ -140,11 +146,23 @@ func (o *FilterTypeRange) UnmarshalJSON(data []byte) (err error) { } for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { + if value, exists := allProperties[requiredProperty]; !exists || value == "" { + if _, ok := defaultValueFuncMap[requiredProperty]; ok { + allProperties[requiredProperty] = defaultValueFuncMap[requiredProperty]() + defaultValueApplied = true + } + } + if value, exists := allProperties[requiredProperty]; !exists || value == ""{ return fmt.Errorf("no value given for required property %v", requiredProperty) } } + if defaultValueApplied { + data, err = json.Marshal(allProperties) + if err != nil{ + return err + } + } varFilterTypeRange := _FilterTypeRange{} err = json.Unmarshal(data, &varFilterTypeRange) diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_regex.go b/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_regex.go index 3f562665a3ee..7ee6c5013cb2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_regex.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_filter_type_regex.go @@ -69,6 +69,7 @@ func (o *FilterTypeRegex) SetType(v string) { o.Type = v } + // GetRegex returns the Regex field value if set, zero value otherwise. func (o *FilterTypeRegex) GetRegex() string { if o == nil || IsNil(o.Regex) { @@ -131,6 +132,11 @@ func (o *FilterTypeRegex) UnmarshalJSON(data []byte) (err error) { "type", } + // defaultValueFuncMap captures the default values for required properties. + // These values are used when required properties are missing from the payload. + defaultValueFuncMap := map[string]func() interface{} { + } + var defaultValueApplied bool allProperties := make(map[string]interface{}) err = json.Unmarshal(data, &allProperties) @@ -140,11 +146,23 @@ func (o *FilterTypeRegex) UnmarshalJSON(data []byte) (err error) { } for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { + if value, exists := allProperties[requiredProperty]; !exists || value == "" { + if _, ok := defaultValueFuncMap[requiredProperty]; ok { + allProperties[requiredProperty] = defaultValueFuncMap[requiredProperty]() + defaultValueApplied = true + } + } + if value, exists := allProperties[requiredProperty]; !exists || value == ""{ return fmt.Errorf("no value given for required property %v", requiredProperty) } } + if defaultValueApplied { + data, err = json.Marshal(allProperties) + if err != nil{ + return err + } + } varFilterTypeRegex := _FilterTypeRegex{} err = json.Unmarshal(data, &varFilterTypeRegex)