diff --git a/bin/configs/csharp-generichost-net4.7-allOf.yaml b/bin/configs/csharp-generichost-net4.7-allOf.yaml index ab7a40a46b4a..270621b08bca 100644 --- a/bin/configs/csharp-generichost-net4.7-allOf.yaml +++ b/bin/configs/csharp-generichost-net4.7-allOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net47 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.7-anyOf.yaml b/bin/configs/csharp-generichost-net4.7-anyOf.yaml index 5552241d9424..37bcf43a3353 100644 --- a/bin/configs/csharp-generichost-net4.7-anyOf.yaml +++ b/bin/configs/csharp-generichost-net4.7-anyOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net47 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.7-anyOfNoCompare.yaml b/bin/configs/csharp-generichost-net4.7-anyOfNoCompare.yaml index 7ebaa6835766..6a3b99785bed 100644 --- a/bin/configs/csharp-generichost-net4.7-anyOfNoCompare.yaml +++ b/bin/configs/csharp-generichost-net4.7-anyOfNoCompare.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net47 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.7-formModels.yaml b/bin/configs/csharp-generichost-net4.7-formModels.yaml index 6634d259f961..dbf7a3a27aa4 100644 --- a/bin/configs/csharp-generichost-net4.7-formModels.yaml +++ b/bin/configs/csharp-generichost-net4.7-formModels.yaml @@ -13,5 +13,6 @@ additionalProperties: targetFramework: net47 skipFormModel: false modelPropertySorting: alphabetical + operationParameterSorting: alphabetical inlineSchemaOptions: RESOLVE_INLINE_ENUMS: true diff --git a/bin/configs/csharp-generichost-net4.7-oneOf.yaml b/bin/configs/csharp-generichost-net4.7-oneOf.yaml index 353b288ca676..f5364b6a5284 100644 --- a/bin/configs/csharp-generichost-net4.7-oneOf.yaml +++ b/bin/configs/csharp-generichost-net4.7-oneOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net47 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.7-useDateTimeForDate.yaml b/bin/configs/csharp-generichost-net4.7-useDateTimeForDate.yaml index ca299c4849c7..4b026f869fe5 100644 --- a/bin/configs/csharp-generichost-net4.7-useDateTimeForDate.yaml +++ b/bin/configs/csharp-generichost-net4.7-useDateTimeForDate.yaml @@ -9,3 +9,4 @@ additionalProperties: useDateTimeForDate: true targetFramework: net47 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.7.yaml b/bin/configs/csharp-generichost-net4.7.yaml index 0eb928f3e2b1..55c105fac7a2 100644 --- a/bin/configs/csharp-generichost-net4.7.yaml +++ b/bin/configs/csharp-generichost-net4.7.yaml @@ -12,3 +12,4 @@ additionalProperties: equatable: true targetFramework: net47 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8-allOf.yaml b/bin/configs/csharp-generichost-net4.8-allOf.yaml index 3618129e9339..45729c8cc130 100644 --- a/bin/configs/csharp-generichost-net4.8-allOf.yaml +++ b/bin/configs/csharp-generichost-net4.8-allOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net48 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8-anyOf.yaml b/bin/configs/csharp-generichost-net4.8-anyOf.yaml index 846d3957b554..3eb6a0445d9d 100644 --- a/bin/configs/csharp-generichost-net4.8-anyOf.yaml +++ b/bin/configs/csharp-generichost-net4.8-anyOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net48 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8-anyOfNoCompare.yaml b/bin/configs/csharp-generichost-net4.8-anyOfNoCompare.yaml index 760f3cc0ed92..9a7945bf1a9a 100644 --- a/bin/configs/csharp-generichost-net4.8-anyOfNoCompare.yaml +++ b/bin/configs/csharp-generichost-net4.8-anyOfNoCompare.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net48 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8-formModels.yaml b/bin/configs/csharp-generichost-net4.8-formModels.yaml index ca16d286f19b..4948f3aef252 100644 --- a/bin/configs/csharp-generichost-net4.8-formModels.yaml +++ b/bin/configs/csharp-generichost-net4.8-formModels.yaml @@ -13,5 +13,6 @@ additionalProperties: targetFramework: net48 skipFormModel: false modelPropertySorting: alphabetical + operationParameterSorting: alphabetical inlineSchemaOptions: RESOLVE_INLINE_ENUMS: true diff --git a/bin/configs/csharp-generichost-net4.8-oneOf.yaml b/bin/configs/csharp-generichost-net4.8-oneOf.yaml index 89f61765db65..6d7ca40dff1b 100644 --- a/bin/configs/csharp-generichost-net4.8-oneOf.yaml +++ b/bin/configs/csharp-generichost-net4.8-oneOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: false equatable: true targetFramework: net48 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8-useDateTimeForDate.yaml b/bin/configs/csharp-generichost-net4.8-useDateTimeForDate.yaml index cf88bb71536d..99e94f185b56 100644 --- a/bin/configs/csharp-generichost-net4.8-useDateTimeForDate.yaml +++ b/bin/configs/csharp-generichost-net4.8-useDateTimeForDate.yaml @@ -9,3 +9,4 @@ additionalProperties: useDateTimeForDate: true targetFramework: net48 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net4.8.yaml b/bin/configs/csharp-generichost-net4.8.yaml index 8e33e8b54a17..1a76bfe86b86 100644 --- a/bin/configs/csharp-generichost-net4.8.yaml +++ b/bin/configs/csharp-generichost-net4.8.yaml @@ -12,3 +12,4 @@ additionalProperties: equatable: true targetFramework: net48 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-allOf.yaml b/bin/configs/csharp-generichost-net8-allOf.yaml index 33adf99fa2c3..fb3b8406c708 100644 --- a/bin/configs/csharp-generichost-net8-allOf.yaml +++ b/bin/configs/csharp-generichost-net8-allOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: true equatable: true targetFramework: net8.0 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-anyOf.yaml b/bin/configs/csharp-generichost-net8-anyOf.yaml index dd67a9cee622..4fef52ef5f68 100644 --- a/bin/configs/csharp-generichost-net8-anyOf.yaml +++ b/bin/configs/csharp-generichost-net8-anyOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: true equatable: true targetFramework: net8.0 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-anyOfNoCompare.yaml b/bin/configs/csharp-generichost-net8-anyOfNoCompare.yaml index e78b1dc2dda6..6ba86eda53d3 100644 --- a/bin/configs/csharp-generichost-net8-anyOfNoCompare.yaml +++ b/bin/configs/csharp-generichost-net8-anyOfNoCompare.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: true equatable: true targetFramework: net8.0 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-formModels.yaml b/bin/configs/csharp-generichost-net8-formModels.yaml index 48f677f318c2..f9621c39b0d7 100644 --- a/bin/configs/csharp-generichost-net8-formModels.yaml +++ b/bin/configs/csharp-generichost-net8-formModels.yaml @@ -13,5 +13,6 @@ additionalProperties: targetFramework: net8.0 skipFormModel: false modelPropertySorting: alphabetical + operationParameterSorting: alphabetical inlineSchemaOptions: RESOLVE_INLINE_ENUMS: true diff --git a/bin/configs/csharp-generichost-net8-nrt-useSourceGeneration.yaml b/bin/configs/csharp-generichost-net8-nrt-useSourceGeneration.yaml index 8901f9cfa9b6..b48828d2cb05 100644 --- a/bin/configs/csharp-generichost-net8-nrt-useSourceGeneration.yaml +++ b/bin/configs/csharp-generichost-net8-nrt-useSourceGeneration.yaml @@ -12,3 +12,4 @@ additionalProperties: equatable: true targetFramework: net8.0 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-nrt.yaml b/bin/configs/csharp-generichost-net8-nrt.yaml index c9cccf5f590c..e51b8e9c4109 100644 --- a/bin/configs/csharp-generichost-net8-nrt.yaml +++ b/bin/configs/csharp-generichost-net8-nrt.yaml @@ -12,3 +12,4 @@ additionalProperties: equatable: true targetFramework: net8.0 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-oneOf.yaml b/bin/configs/csharp-generichost-net8-oneOf.yaml index 11c0c6e2961e..2d0aca292b4c 100644 --- a/bin/configs/csharp-generichost-net8-oneOf.yaml +++ b/bin/configs/csharp-generichost-net8-oneOf.yaml @@ -11,3 +11,5 @@ additionalProperties: nullableReferenceTypes: true equatable: true targetFramework: net8.0 + modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8-useDateTimeForDate.yaml b/bin/configs/csharp-generichost-net8-useDateTimeForDate.yaml index 72f89ad2f26b..4fe855e07c05 100644 --- a/bin/configs/csharp-generichost-net8-useDateTimeForDate.yaml +++ b/bin/configs/csharp-generichost-net8-useDateTimeForDate.yaml @@ -9,3 +9,4 @@ additionalProperties: useDateTimeForDate: true targetFramework: net8.0 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-net8.yaml b/bin/configs/csharp-generichost-net8.yaml index 790a7bfeb0e9..caecf554d9a6 100644 --- a/bin/configs/csharp-generichost-net8.yaml +++ b/bin/configs/csharp-generichost-net8.yaml @@ -12,3 +12,4 @@ additionalProperties: equatable: true targetFramework: net8.0 modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/bin/configs/csharp-generichost-netstandard2.0.yaml b/bin/configs/csharp-generichost-netstandard2.0.yaml index 085f4f442769..92809fcc9013 100644 --- a/bin/configs/csharp-generichost-netstandard2.0.yaml +++ b/bin/configs/csharp-generichost-netstandard2.0.yaml @@ -11,3 +11,4 @@ additionalProperties: targetFramework: netstandard2.0 equatable: true modelPropertySorting: alphabetical + operationParameterSorting: alphabetical diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Adult.md b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Adult.md index 61a97ca2192b..4bf74e4efc9b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Adult.md +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Adult.md @@ -5,9 +5,9 @@ A representation of an adult Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Children** | [**List<Child>**](Child.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Child.md b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Child.md index 9ac30fd2d619..bb2a1e5a5613 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Child.md +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Child.md @@ -5,11 +5,11 @@ A representation of a child Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] -**BoosterSeat** | **bool** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Age** | **int** | | [optional] +**BoosterSeat** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Person.md b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Person.md index b41b51f12f2a..42c19689f9a1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Person.md +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/docs/models/Person.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs index 10c2f96d3a20..17720f6e735f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs @@ -54,21 +54,21 @@ public void ChildInstanceTest() } /// - /// Test the property 'BoosterSeat' + /// Test the property 'Age' /// [Fact] - public void BoosterSeatTest() + public void AgeTest() { - // TODO unit test for the property 'BoosterSeat' + // TODO unit test for the property 'Age' } /// - /// Test the property 'Age' + /// Test the property 'BoosterSeat' /// [Fact] - public void AgeTest() + public void BoosterSeatTest() { - // TODO unit test for the property 'Age' + // TODO unit test for the property 'BoosterSeat' } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs index 93161acf9fe6..aa3fc482188d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs @@ -74,12 +74,12 @@ public void ChildDeserializeFromPersonTest() } /// - /// Test the property 'Type' + /// Test the property 'FirstName' /// [Fact] - public void TypeTest() + public void FirstNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'FirstName' } /// @@ -92,12 +92,12 @@ public void LastNameTest() } /// - /// Test the property 'FirstName' + /// Test the property 'Type' /// [Fact] - public void FirstNameTest() + public void TypeTest() { - // TODO unit test for the property 'FirstName' + // TODO unit test for the property 'Type' } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 6a1524a06c42..3cdde4b29d96 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -32,11 +32,11 @@ public partial class Adult : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// children + /// firstName + /// lastName [JsonConstructor] - public Adult(Option lastName = default, Option firstName = default, Option> children = default) : base(lastName, firstName) + public Adult(Option> children = default, Option firstName = default, Option lastName = default) : base(firstName, lastName) { ChildrenOption = children; OnCreated(); @@ -44,13 +44,6 @@ public Adult(Option lastName = default, Option firstName = defau partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Adult"; - /// /// Used to track the state of Children /// @@ -64,6 +57,13 @@ public Adult(Option lastName = default, Option firstName = defau [JsonPropertyName("children")] public List Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new Option>(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Adult"; + /// /// Returns the string presentation of the object /// @@ -101,10 +101,10 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option> children = default; + Option firstName = default; + Option lastName = default; + Option type = default; while (utf8JsonReader.Read()) { @@ -121,18 +121,18 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()); + case "children": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + children = new Option>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()); break; - case "children": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - children = new Option>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; default: break; @@ -140,19 +140,19 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + if (children.IsSet && children.Value == null) + throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); - if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - return new Adult(lastName, firstName, children); + return new Adult(children, firstName, lastName); } /// @@ -179,28 +179,27 @@ public override void Write(Utf8JsonWriter writer, Adult adult, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Adult adult, JsonSerializerOptions jsonSerializerOptions) { - if (adult.LastNameOption.IsSet && adult.LastName == null) - throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); - - if (adult.FirstNameOption.IsSet && adult.FirstName == null) - throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.ChildrenOption.IsSet && adult.Children == null) throw new ArgumentNullException(nameof(adult.Children), "Property is required for class Adult."); - writer.WriteString("$_type", adult.Type); - - if (adult.LastNameOption.IsSet) - writer.WriteString("lastName", adult.LastName); + if (adult.FirstNameOption.IsSet && adult.FirstName == null) + throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.FirstNameOption.IsSet) - writer.WriteString("firstName", adult.FirstName); + if (adult.LastNameOption.IsSet && adult.LastName == null) + throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); if (adult.ChildrenOption.IsSet) { writer.WritePropertyName("children"); JsonSerializer.Serialize(writer, adult.Children, jsonSerializerOptions); } + if (adult.FirstNameOption.IsSet) + writer.WriteString("firstName", adult.FirstName); + + if (adult.LastNameOption.IsSet) + writer.WriteString("lastName", adult.LastName); + + writer.WriteString("$_type", adult.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs index 297e85e76f1e..7f96dcd8b664 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -32,12 +32,12 @@ public partial class Child : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// age + /// firstName + /// lastName /// boosterSeat [JsonConstructor] - public Child(Option lastName = default, Option firstName = default, Option age = default, Option boosterSeat = default) : base(lastName, firstName) + public Child(Option age = default, Option firstName = default, Option lastName = default, Option boosterSeat = default) : base(firstName, lastName) { AgeOption = age; BoosterSeatOption = boosterSeat; @@ -46,13 +46,6 @@ public Child(Option lastName = default, Option firstName = defau partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Child"; - /// /// Used to track the state of Age /// @@ -66,6 +59,13 @@ public Child(Option lastName = default, Option firstName = defau [JsonPropertyName("age")] public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Child"; + /// /// Used to track the state of BoosterSeat /// @@ -88,8 +88,8 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Child {\n"); sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append(" Age: ").Append(Age).Append("\n"); + sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -117,10 +117,10 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option age = default; + Option firstName = default; + Option lastName = default; + Option type = default; Option boosterSeat = default; while (utf8JsonReader.Read()) @@ -138,18 +138,18 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()); + case "age": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + age = new Option(utf8JsonReader.GetInt32()); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()); break; - case "age": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - age = new Option(utf8JsonReader.GetInt32()); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; case "boosterSeat": if (utf8JsonReader.TokenType != JsonTokenType.Null) @@ -161,22 +161,22 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + if (age.IsSet && age.Value == null) + throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); - if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); if (boosterSeat.IsSet && boosterSeat.Value == null) throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); - return new Child(lastName, firstName, age, boosterSeat); + return new Child(age, firstName, lastName, boosterSeat); } /// @@ -203,22 +203,22 @@ public override void Write(Utf8JsonWriter writer, Child child, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Child child, JsonSerializerOptions jsonSerializerOptions) { - if (child.LastNameOption.IsSet && child.LastName == null) - throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.FirstNameOption.IsSet && child.FirstName == null) throw new ArgumentNullException(nameof(child.FirstName), "Property is required for class Child."); - writer.WriteString("$_type", child.Type); + if (child.LastNameOption.IsSet && child.LastName == null) + throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.LastNameOption.IsSet) - writer.WriteString("lastName", child.LastName); + if (child.AgeOption.IsSet) + writer.WriteNumber("age", child.AgeOption.Value.Value); if (child.FirstNameOption.IsSet) writer.WriteString("firstName", child.FirstName); - if (child.AgeOption.IsSet) - writer.WriteNumber("age", child.AgeOption.Value.Value); + if (child.LastNameOption.IsSet) + writer.WriteString("lastName", child.LastName); + + writer.WriteString("$_type", child.Type); if (child.BoosterSeatOption.IsSet) writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value); diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs index 7240795850e4..6c9261c98790 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -32,24 +32,30 @@ public partial class Person : IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName /// firstName + /// lastName [JsonConstructor] - public Person(Option lastName = default, Option firstName = default) + public Person(Option firstName = default, Option lastName = default) { - LastNameOption = lastName; FirstNameOption = firstName; + LastNameOption = lastName; OnCreated(); } partial void OnCreated(); /// - /// The discriminator + /// Used to track the state of FirstName /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public string Type { get; } = "Person"; + public Option FirstNameOption { get; private set; } + + /// + /// Gets or Sets FirstName + /// + [JsonPropertyName("firstName")] + public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option(value); } } /// /// Used to track the state of LastName @@ -65,17 +71,11 @@ public Person(Option lastName = default, Option firstName = defa public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option(value); } } /// - /// Used to track the state of FirstName + /// The discriminator /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FirstNameOption { get; private set; } - - /// - /// Gets or Sets FirstName - /// - [JsonPropertyName("firstName")] - public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option(value); } } + public string Type { get; } = "Person"; /// /// Gets or Sets additional properties @@ -91,8 +91,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Person {\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -141,9 +141,9 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; Option firstName = default; + Option lastName = default; + Option type = default; string discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type"); @@ -168,14 +168,14 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); + case "firstName": + firstName = new Option(utf8JsonReader.GetString()); break; case "lastName": lastName = new Option(utf8JsonReader.GetString()); break; - case "firstName": - firstName = new Option(utf8JsonReader.GetString()); + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; default: break; @@ -183,16 +183,16 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + if (firstName.IsSet && firstName.Value == null) + throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); if (lastName.IsSet && lastName.Value == null) throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); - if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); - return new Person(lastName, firstName); + return new Person(firstName, lastName); } /// @@ -229,19 +229,19 @@ public override void Write(Utf8JsonWriter writer, Person person, JsonSerializerO /// public void WriteProperties(Utf8JsonWriter writer, Person person, JsonSerializerOptions jsonSerializerOptions) { - if (person.LastNameOption.IsSet && person.LastName == null) - throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); - if (person.FirstNameOption.IsSet && person.FirstName == null) throw new ArgumentNullException(nameof(person.FirstName), "Property is required for class Person."); - writer.WriteString("$_type", person.Type); + if (person.LastNameOption.IsSet && person.LastName == null) + throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); + + if (person.FirstNameOption.IsSet) + writer.WriteString("firstName", person.FirstName); if (person.LastNameOption.IsSet) writer.WriteString("lastName", person.LastName); - if (person.FirstNameOption.IsSet) - writer.WriteString("firstName", person.FirstName); + writer.WriteString("$_type", person.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/FakeApi.md index e2408ad1694f..7f8d74d314a4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateTime date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateTime** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null) +> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) - var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) - var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | | **enumHeaderString** | **TestEnumParametersEnumHeaderStringParameter** | Header parameter enum test (string) | [optional] | -| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | -| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | -| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | +| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index d68f587f1033..dbca7881df47 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs index 8a66cf923341..89f28095bdaa 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3781,19 +3781,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3801,17 +3801,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3819,23 +3819,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3846,20 +3846,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3868,23 +3868,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3897,45 +3897,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3948,30 +3948,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3990,41 +3990,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4056,7 +4056,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new TestEndpointParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4070,7 +4070,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4127,43 +4127,43 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// + /// /// /// - /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option> enumQueryStringArray, Option> enumFormStringArray) + private void ValidateTestEnumParameters(Option> enumFormStringArray, Option> enumHeaderStringArray, Option> enumQueryStringArray) { + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) throw new ArgumentNullException(nameof(enumQueryStringArray)); - - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4173,15 +4173,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4189,18 +4189,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4212,34 +4212,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4251,25 +4251,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumFormStringArray); + ValidateTestEnumParameters(enumFormStringArray, enumHeaderStringArray, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4280,38 +4280,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4335,7 +4335,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new TestEnumParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4345,7 +4345,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4402,22 +4402,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4427,13 +4427,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4441,16 +4441,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4462,30 +4462,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4497,21 +4497,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4522,15 +4522,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4558,7 +4558,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new TestGroupParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4572,7 +4572,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5208,39 +5208,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5249,19 +5249,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5271,16 +5271,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5288,19 +5288,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5312,36 +5312,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5353,26 +5353,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5383,12 +5383,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5412,7 +5412,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new TestQueryParameterCollectionFormatApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5422,7 +5422,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/UserApi.cs index c8ee9797c4a3..25824cb3dcad 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/UserApi.cs @@ -155,11 +155,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -167,11 +167,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -201,11 +201,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -213,11 +213,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1622,33 +1622,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1658,9 +1658,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1668,12 +1668,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1685,22 +1685,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1712,19 +1712,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1735,8 +1735,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1763,7 +1763,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new LoginUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1773,7 +1773,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2014,33 +2014,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2050,9 +2050,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2060,12 +2060,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2077,22 +2077,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2104,19 +2104,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2153,7 +2153,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new UpdateUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2163,7 +2163,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/FakeApi.md index 3f5be967684a..489d6659346b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateTime date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateTime** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 1e36a4956043..ce85f85778ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 90610642b72e..402f72e32af3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3781,19 +3781,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3801,17 +3801,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3819,23 +3819,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3846,20 +3846,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3868,23 +3868,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3897,45 +3897,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3948,30 +3948,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3990,41 +3990,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4056,7 +4056,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new TestEndpointParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4070,7 +4070,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4127,55 +4127,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4185,15 +4185,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4201,18 +4201,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4224,34 +4224,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4263,25 +4263,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4292,38 +4292,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4347,7 +4347,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new TestEnumParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4357,7 +4357,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4414,22 +4414,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4439,13 +4439,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4453,16 +4453,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4474,30 +4474,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4509,21 +4509,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4534,15 +4534,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4570,7 +4570,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new TestGroupParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4584,7 +4584,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5220,39 +5220,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5261,19 +5261,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5283,16 +5283,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5300,19 +5300,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5324,36 +5324,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5365,26 +5365,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5395,12 +5395,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5424,7 +5424,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new TestQueryParameterCollectionFormatApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5434,7 +5434,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index c8ee9797c4a3..25824cb3dcad 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -155,11 +155,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -167,11 +167,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -201,11 +201,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -213,11 +213,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1622,33 +1622,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1658,9 +1658,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1668,12 +1668,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1685,22 +1685,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1712,19 +1712,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1735,8 +1735,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1763,7 +1763,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new LoginUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1773,7 +1773,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2014,33 +2014,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2050,9 +2050,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2060,12 +2060,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2077,22 +2077,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2104,19 +2104,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2153,7 +2153,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new UpdateUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2163,7 +2163,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Adult.md b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Adult.md index 61a97ca2192b..4bf74e4efc9b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Adult.md +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Adult.md @@ -5,9 +5,9 @@ A representation of an adult Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Children** | [**List<Child>**](Child.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Child.md b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Child.md index 9ac30fd2d619..bb2a1e5a5613 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Child.md +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Child.md @@ -5,11 +5,11 @@ A representation of a child Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] -**BoosterSeat** | **bool** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Age** | **int** | | [optional] +**BoosterSeat** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Person.md b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Person.md index b41b51f12f2a..42c19689f9a1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Person.md +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/docs/models/Person.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs index 10c2f96d3a20..17720f6e735f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs @@ -54,21 +54,21 @@ public void ChildInstanceTest() } /// - /// Test the property 'BoosterSeat' + /// Test the property 'Age' /// [Fact] - public void BoosterSeatTest() + public void AgeTest() { - // TODO unit test for the property 'BoosterSeat' + // TODO unit test for the property 'Age' } /// - /// Test the property 'Age' + /// Test the property 'BoosterSeat' /// [Fact] - public void AgeTest() + public void BoosterSeatTest() { - // TODO unit test for the property 'Age' + // TODO unit test for the property 'BoosterSeat' } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs index 93161acf9fe6..aa3fc482188d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs @@ -74,12 +74,12 @@ public void ChildDeserializeFromPersonTest() } /// - /// Test the property 'Type' + /// Test the property 'FirstName' /// [Fact] - public void TypeTest() + public void FirstNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'FirstName' } /// @@ -92,12 +92,12 @@ public void LastNameTest() } /// - /// Test the property 'FirstName' + /// Test the property 'Type' /// [Fact] - public void FirstNameTest() + public void TypeTest() { - // TODO unit test for the property 'FirstName' + // TODO unit test for the property 'Type' } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 6a1524a06c42..3cdde4b29d96 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -32,11 +32,11 @@ public partial class Adult : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// children + /// firstName + /// lastName [JsonConstructor] - public Adult(Option lastName = default, Option firstName = default, Option> children = default) : base(lastName, firstName) + public Adult(Option> children = default, Option firstName = default, Option lastName = default) : base(firstName, lastName) { ChildrenOption = children; OnCreated(); @@ -44,13 +44,6 @@ public Adult(Option lastName = default, Option firstName = defau partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Adult"; - /// /// Used to track the state of Children /// @@ -64,6 +57,13 @@ public Adult(Option lastName = default, Option firstName = defau [JsonPropertyName("children")] public List Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new Option>(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Adult"; + /// /// Returns the string presentation of the object /// @@ -101,10 +101,10 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option> children = default; + Option firstName = default; + Option lastName = default; + Option type = default; while (utf8JsonReader.Read()) { @@ -121,18 +121,18 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()); + case "children": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + children = new Option>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()); break; - case "children": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - children = new Option>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; default: break; @@ -140,19 +140,19 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + if (children.IsSet && children.Value == null) + throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); - if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - return new Adult(lastName, firstName, children); + return new Adult(children, firstName, lastName); } /// @@ -179,28 +179,27 @@ public override void Write(Utf8JsonWriter writer, Adult adult, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Adult adult, JsonSerializerOptions jsonSerializerOptions) { - if (adult.LastNameOption.IsSet && adult.LastName == null) - throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); - - if (adult.FirstNameOption.IsSet && adult.FirstName == null) - throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.ChildrenOption.IsSet && adult.Children == null) throw new ArgumentNullException(nameof(adult.Children), "Property is required for class Adult."); - writer.WriteString("$_type", adult.Type); - - if (adult.LastNameOption.IsSet) - writer.WriteString("lastName", adult.LastName); + if (adult.FirstNameOption.IsSet && adult.FirstName == null) + throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.FirstNameOption.IsSet) - writer.WriteString("firstName", adult.FirstName); + if (adult.LastNameOption.IsSet && adult.LastName == null) + throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); if (adult.ChildrenOption.IsSet) { writer.WritePropertyName("children"); JsonSerializer.Serialize(writer, adult.Children, jsonSerializerOptions); } + if (adult.FirstNameOption.IsSet) + writer.WriteString("firstName", adult.FirstName); + + if (adult.LastNameOption.IsSet) + writer.WriteString("lastName", adult.LastName); + + writer.WriteString("$_type", adult.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs index 297e85e76f1e..7f96dcd8b664 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -32,12 +32,12 @@ public partial class Child : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// age + /// firstName + /// lastName /// boosterSeat [JsonConstructor] - public Child(Option lastName = default, Option firstName = default, Option age = default, Option boosterSeat = default) : base(lastName, firstName) + public Child(Option age = default, Option firstName = default, Option lastName = default, Option boosterSeat = default) : base(firstName, lastName) { AgeOption = age; BoosterSeatOption = boosterSeat; @@ -46,13 +46,6 @@ public Child(Option lastName = default, Option firstName = defau partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Child"; - /// /// Used to track the state of Age /// @@ -66,6 +59,13 @@ public Child(Option lastName = default, Option firstName = defau [JsonPropertyName("age")] public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Child"; + /// /// Used to track the state of BoosterSeat /// @@ -88,8 +88,8 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Child {\n"); sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append(" Age: ").Append(Age).Append("\n"); + sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -117,10 +117,10 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option age = default; + Option firstName = default; + Option lastName = default; + Option type = default; Option boosterSeat = default; while (utf8JsonReader.Read()) @@ -138,18 +138,18 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()); + case "age": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + age = new Option(utf8JsonReader.GetInt32()); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()); break; - case "age": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - age = new Option(utf8JsonReader.GetInt32()); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; case "boosterSeat": if (utf8JsonReader.TokenType != JsonTokenType.Null) @@ -161,22 +161,22 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + if (age.IsSet && age.Value == null) + throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); - if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); if (boosterSeat.IsSet && boosterSeat.Value == null) throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); - return new Child(lastName, firstName, age, boosterSeat); + return new Child(age, firstName, lastName, boosterSeat); } /// @@ -203,22 +203,22 @@ public override void Write(Utf8JsonWriter writer, Child child, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Child child, JsonSerializerOptions jsonSerializerOptions) { - if (child.LastNameOption.IsSet && child.LastName == null) - throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.FirstNameOption.IsSet && child.FirstName == null) throw new ArgumentNullException(nameof(child.FirstName), "Property is required for class Child."); - writer.WriteString("$_type", child.Type); + if (child.LastNameOption.IsSet && child.LastName == null) + throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.LastNameOption.IsSet) - writer.WriteString("lastName", child.LastName); + if (child.AgeOption.IsSet) + writer.WriteNumber("age", child.AgeOption.Value.Value); if (child.FirstNameOption.IsSet) writer.WriteString("firstName", child.FirstName); - if (child.AgeOption.IsSet) - writer.WriteNumber("age", child.AgeOption.Value.Value); + if (child.LastNameOption.IsSet) + writer.WriteString("lastName", child.LastName); + + writer.WriteString("$_type", child.Type); if (child.BoosterSeatOption.IsSet) writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value); diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs index 7240795850e4..6c9261c98790 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -32,24 +32,30 @@ public partial class Person : IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName /// firstName + /// lastName [JsonConstructor] - public Person(Option lastName = default, Option firstName = default) + public Person(Option firstName = default, Option lastName = default) { - LastNameOption = lastName; FirstNameOption = firstName; + LastNameOption = lastName; OnCreated(); } partial void OnCreated(); /// - /// The discriminator + /// Used to track the state of FirstName /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public string Type { get; } = "Person"; + public Option FirstNameOption { get; private set; } + + /// + /// Gets or Sets FirstName + /// + [JsonPropertyName("firstName")] + public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option(value); } } /// /// Used to track the state of LastName @@ -65,17 +71,11 @@ public Person(Option lastName = default, Option firstName = defa public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option(value); } } /// - /// Used to track the state of FirstName + /// The discriminator /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FirstNameOption { get; private set; } - - /// - /// Gets or Sets FirstName - /// - [JsonPropertyName("firstName")] - public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option(value); } } + public string Type { get; } = "Person"; /// /// Gets or Sets additional properties @@ -91,8 +91,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Person {\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -141,9 +141,9 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; Option firstName = default; + Option lastName = default; + Option type = default; string discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type"); @@ -168,14 +168,14 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()); + case "firstName": + firstName = new Option(utf8JsonReader.GetString()); break; case "lastName": lastName = new Option(utf8JsonReader.GetString()); break; - case "firstName": - firstName = new Option(utf8JsonReader.GetString()); + case "$_type": + type = new Option(utf8JsonReader.GetString()); break; default: break; @@ -183,16 +183,16 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + if (firstName.IsSet && firstName.Value == null) + throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); if (lastName.IsSet && lastName.Value == null) throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); - if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); - return new Person(lastName, firstName); + return new Person(firstName, lastName); } /// @@ -229,19 +229,19 @@ public override void Write(Utf8JsonWriter writer, Person person, JsonSerializerO /// public void WriteProperties(Utf8JsonWriter writer, Person person, JsonSerializerOptions jsonSerializerOptions) { - if (person.LastNameOption.IsSet && person.LastName == null) - throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); - if (person.FirstNameOption.IsSet && person.FirstName == null) throw new ArgumentNullException(nameof(person.FirstName), "Property is required for class Person."); - writer.WriteString("$_type", person.Type); + if (person.LastNameOption.IsSet && person.LastName == null) + throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); + + if (person.FirstNameOption.IsSet) + writer.WriteString("firstName", person.FirstName); if (person.LastNameOption.IsSet) writer.WriteString("lastName", person.LastName); - if (person.FirstNameOption.IsSet) - writer.WriteString("firstName", person.FirstName); + writer.WriteString("$_type", person.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/FakeApi.md index e2408ad1694f..7f8d74d314a4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateTime date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateTime** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null) +> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) - var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) - var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | | **enumHeaderString** | **TestEnumParametersEnumHeaderStringParameter** | Header parameter enum test (string) | [optional] | -| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | -| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | -| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | +| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index d68f587f1033..dbca7881df47 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs index 8a66cf923341..89f28095bdaa 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3781,19 +3781,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3801,17 +3801,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3819,23 +3819,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3846,20 +3846,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3868,23 +3868,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3897,45 +3897,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3948,30 +3948,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3990,41 +3990,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4056,7 +4056,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new TestEndpointParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4070,7 +4070,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4127,43 +4127,43 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// + /// /// /// - /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option> enumQueryStringArray, Option> enumFormStringArray) + private void ValidateTestEnumParameters(Option> enumFormStringArray, Option> enumHeaderStringArray, Option> enumQueryStringArray) { + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) throw new ArgumentNullException(nameof(enumQueryStringArray)); - - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4173,15 +4173,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4189,18 +4189,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4212,34 +4212,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4251,25 +4251,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumFormStringArray); + ValidateTestEnumParameters(enumFormStringArray, enumHeaderStringArray, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4280,38 +4280,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4335,7 +4335,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new TestEnumParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4345,7 +4345,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4402,22 +4402,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4427,13 +4427,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4441,16 +4441,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4462,30 +4462,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4497,21 +4497,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4522,15 +4522,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4558,7 +4558,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new TestGroupParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4572,7 +4572,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5208,39 +5208,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5249,19 +5249,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5271,16 +5271,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5288,19 +5288,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5312,36 +5312,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5353,26 +5353,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5383,12 +5383,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5412,7 +5412,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new TestQueryParameterCollectionFormatApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5422,7 +5422,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs index c8ee9797c4a3..25824cb3dcad 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs @@ -155,11 +155,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -167,11 +167,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -201,11 +201,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -213,11 +213,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1622,33 +1622,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1658,9 +1658,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1668,12 +1668,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1685,22 +1685,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1712,19 +1712,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1735,8 +1735,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1763,7 +1763,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new LoginUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1773,7 +1773,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2014,33 +2014,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2050,9 +2050,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2060,12 +2060,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2077,22 +2077,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2104,19 +2104,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2153,7 +2153,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new UpdateUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2163,7 +2163,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/FakeApi.md index 3f5be967684a..489d6659346b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateTime date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateTime** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 1e36a4956043..ce85f85778ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index 90610642b72e..402f72e32af3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3781,19 +3781,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3801,17 +3801,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3819,23 +3819,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3846,20 +3846,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3868,23 +3868,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3897,45 +3897,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3948,30 +3948,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3990,41 +3990,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4056,7 +4056,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new TestEndpointParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4070,7 +4070,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4127,55 +4127,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4185,15 +4185,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4201,18 +4201,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4224,34 +4224,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4263,25 +4263,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4292,38 +4292,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4347,7 +4347,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new TestEnumParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4357,7 +4357,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4414,22 +4414,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4439,13 +4439,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4453,16 +4453,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4474,30 +4474,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4509,21 +4509,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4534,15 +4534,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4570,7 +4570,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new TestGroupParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4584,7 +4584,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5220,39 +5220,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5261,19 +5261,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5283,16 +5283,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5300,19 +5300,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5324,36 +5324,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5365,26 +5365,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5395,12 +5395,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5424,7 +5424,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new TestQueryParameterCollectionFormatApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5434,7 +5434,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index c8ee9797c4a3..25824cb3dcad 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -155,11 +155,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -167,11 +167,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -201,11 +201,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -213,11 +213,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1622,33 +1622,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1658,9 +1658,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1668,12 +1668,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1685,22 +1685,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1712,19 +1712,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1735,8 +1735,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1763,7 +1763,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new LoginUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1773,7 +1773,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2014,33 +2014,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2050,9 +2050,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2060,12 +2060,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2077,22 +2077,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2104,19 +2104,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2153,7 +2153,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new UpdateUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2163,7 +2163,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Adult.md b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Adult.md index 61a97ca2192b..4bf74e4efc9b 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Adult.md +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Adult.md @@ -5,9 +5,9 @@ A representation of an adult Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Children** | [**List<Child>**](Child.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Child.md b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Child.md index 9ac30fd2d619..bb2a1e5a5613 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Child.md +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Child.md @@ -5,11 +5,11 @@ A representation of a child Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] -**BoosterSeat** | **bool** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] **Age** | **int** | | [optional] +**BoosterSeat** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Person.md b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Person.md index b41b51f12f2a..42c19689f9a1 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Person.md +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/docs/models/Person.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | | [optional] -**LastName** | **string** | | [optional] **FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs index 10c2f96d3a20..17720f6e735f 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs @@ -54,21 +54,21 @@ public void ChildInstanceTest() } /// - /// Test the property 'BoosterSeat' + /// Test the property 'Age' /// [Fact] - public void BoosterSeatTest() + public void AgeTest() { - // TODO unit test for the property 'BoosterSeat' + // TODO unit test for the property 'Age' } /// - /// Test the property 'Age' + /// Test the property 'BoosterSeat' /// [Fact] - public void AgeTest() + public void BoosterSeatTest() { - // TODO unit test for the property 'Age' + // TODO unit test for the property 'BoosterSeat' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs index 93161acf9fe6..aa3fc482188d 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs @@ -74,12 +74,12 @@ public void ChildDeserializeFromPersonTest() } /// - /// Test the property 'Type' + /// Test the property 'FirstName' /// [Fact] - public void TypeTest() + public void FirstNameTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'FirstName' } /// @@ -92,12 +92,12 @@ public void LastNameTest() } /// - /// Test the property 'FirstName' + /// Test the property 'Type' /// [Fact] - public void FirstNameTest() + public void TypeTest() { - // TODO unit test for the property 'FirstName' + // TODO unit test for the property 'Type' } } } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 3317131eb563..061761d954f3 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -34,11 +34,11 @@ public partial class Adult : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// children + /// firstName + /// lastName [JsonConstructor] - public Adult(Option lastName = default, Option firstName = default, Option?> children = default) : base(lastName, firstName) + public Adult(Option?> children = default, Option firstName = default, Option lastName = default) : base(firstName, lastName) { ChildrenOption = children; OnCreated(); @@ -46,13 +46,6 @@ public Adult(Option lastName = default, Option firstName = def partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Adult"; - /// /// Used to track the state of Children /// @@ -66,6 +59,13 @@ public Adult(Option lastName = default, Option firstName = def [JsonPropertyName("children")] public List? Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Adult"; + /// /// Returns the string presentation of the object /// @@ -103,10 +103,10 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option?> children = default; + Option firstName = default; + Option lastName = default; + Option type = default; while (utf8JsonReader.Read()) { @@ -123,18 +123,18 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()!); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()!); + case "children": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + children = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()!); break; - case "children": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - children = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()!); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()!); break; default: break; @@ -142,19 +142,19 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + if (children.IsSet && children.Value == null) + throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); - if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); - return new Adult(lastName, firstName, children); + return new Adult(children, firstName, lastName); } /// @@ -181,28 +181,27 @@ public override void Write(Utf8JsonWriter writer, Adult adult, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Adult adult, JsonSerializerOptions jsonSerializerOptions) { - if (adult.LastNameOption.IsSet && adult.LastName == null) - throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); - - if (adult.FirstNameOption.IsSet && adult.FirstName == null) - throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.ChildrenOption.IsSet && adult.Children == null) throw new ArgumentNullException(nameof(adult.Children), "Property is required for class Adult."); - writer.WriteString("$_type", adult.Type); - - if (adult.LastNameOption.IsSet) - writer.WriteString("lastName", adult.LastName); + if (adult.FirstNameOption.IsSet && adult.FirstName == null) + throw new ArgumentNullException(nameof(adult.FirstName), "Property is required for class Adult."); - if (adult.FirstNameOption.IsSet) - writer.WriteString("firstName", adult.FirstName); + if (adult.LastNameOption.IsSet && adult.LastName == null) + throw new ArgumentNullException(nameof(adult.LastName), "Property is required for class Adult."); if (adult.ChildrenOption.IsSet) { writer.WritePropertyName("children"); JsonSerializer.Serialize(writer, adult.Children, jsonSerializerOptions); } + if (adult.FirstNameOption.IsSet) + writer.WriteString("firstName", adult.FirstName); + + if (adult.LastNameOption.IsSet) + writer.WriteString("lastName", adult.LastName); + + writer.WriteString("$_type", adult.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs index 7df3b3a9f872..94bb37a7732d 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -34,12 +34,12 @@ public partial class Child : Person, IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName - /// firstName /// age + /// firstName + /// lastName /// boosterSeat [JsonConstructor] - public Child(Option lastName = default, Option firstName = default, Option age = default, Option boosterSeat = default) : base(lastName, firstName) + public Child(Option age = default, Option firstName = default, Option lastName = default, Option boosterSeat = default) : base(firstName, lastName) { AgeOption = age; BoosterSeatOption = boosterSeat; @@ -48,13 +48,6 @@ public Child(Option lastName = default, Option firstName = def partial void OnCreated(); - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new string Type { get; } = "Child"; - /// /// Used to track the state of Age /// @@ -68,6 +61,13 @@ public Child(Option lastName = default, Option firstName = def [JsonPropertyName("age")] public int? Age { get { return this.AgeOption; } set { this.AgeOption = new(value); } } + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new string Type { get; } = "Child"; + /// /// Used to track the state of BoosterSeat /// @@ -90,8 +90,8 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class Child {\n"); sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append(" Age: ").Append(Age).Append("\n"); + sb.Append(" BoosterSeat: ").Append(BoosterSeat).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -119,10 +119,10 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; - Option firstName = default; Option age = default; + Option firstName = default; + Option lastName = default; + Option type = default; Option boosterSeat = default; while (utf8JsonReader.Read()) @@ -140,18 +140,18 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()!); - break; - case "lastName": - lastName = new Option(utf8JsonReader.GetString()!); + case "age": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + age = new Option(utf8JsonReader.GetInt32()); break; case "firstName": firstName = new Option(utf8JsonReader.GetString()!); break; - case "age": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - age = new Option(utf8JsonReader.GetInt32()); + case "lastName": + lastName = new Option(utf8JsonReader.GetString()!); + break; + case "$_type": + type = new Option(utf8JsonReader.GetString()!); break; case "boosterSeat": if (utf8JsonReader.TokenType != JsonTokenType.Null) @@ -163,22 +163,22 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); - - if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + if (age.IsSet && age.Value == null) + throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); if (firstName.IsSet && firstName.Value == null) throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); - if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + if (lastName.IsSet && lastName.Value == null) + throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); if (boosterSeat.IsSet && boosterSeat.Value == null) throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); - return new Child(lastName, firstName, age, boosterSeat); + return new Child(age, firstName, lastName, boosterSeat); } /// @@ -205,22 +205,22 @@ public override void Write(Utf8JsonWriter writer, Child child, JsonSerializerOpt /// public void WriteProperties(Utf8JsonWriter writer, Child child, JsonSerializerOptions jsonSerializerOptions) { - if (child.LastNameOption.IsSet && child.LastName == null) - throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.FirstNameOption.IsSet && child.FirstName == null) throw new ArgumentNullException(nameof(child.FirstName), "Property is required for class Child."); - writer.WriteString("$_type", child.Type); + if (child.LastNameOption.IsSet && child.LastName == null) + throw new ArgumentNullException(nameof(child.LastName), "Property is required for class Child."); - if (child.LastNameOption.IsSet) - writer.WriteString("lastName", child.LastName); + if (child.AgeOption.IsSet) + writer.WriteNumber("age", child.AgeOption.Value!.Value); if (child.FirstNameOption.IsSet) writer.WriteString("firstName", child.FirstName); - if (child.AgeOption.IsSet) - writer.WriteNumber("age", child.AgeOption.Value!.Value); + if (child.LastNameOption.IsSet) + writer.WriteString("lastName", child.LastName); + + writer.WriteString("$_type", child.Type); if (child.BoosterSeatOption.IsSet) writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value!.Value); diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs index 4448ccdadb7a..d3f9d198830e 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -34,24 +34,30 @@ public partial class Person : IValidatableObject /// /// Initializes a new instance of the class. /// - /// lastName /// firstName + /// lastName [JsonConstructor] - public Person(Option lastName = default, Option firstName = default) + public Person(Option firstName = default, Option lastName = default) { - LastNameOption = lastName; FirstNameOption = firstName; + LastNameOption = lastName; OnCreated(); } partial void OnCreated(); /// - /// The discriminator + /// Used to track the state of FirstName /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public string Type { get; } = "Person"; + public Option FirstNameOption { get; private set; } + + /// + /// Gets or Sets FirstName + /// + [JsonPropertyName("firstName")] + public string? FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new(value); } } /// /// Used to track the state of LastName @@ -67,17 +73,11 @@ public Person(Option lastName = default, Option firstName = de public string? LastName { get { return this.LastNameOption; } set { this.LastNameOption = new(value); } } /// - /// Used to track the state of FirstName + /// The discriminator /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FirstNameOption { get; private set; } - - /// - /// Gets or Sets FirstName - /// - [JsonPropertyName("firstName")] - public string? FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new(value); } } + public string Type { get; } = "Person"; /// /// Gets or Sets additional properties @@ -93,8 +93,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Person {\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -143,9 +143,9 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver JsonTokenType startingTokenType = utf8JsonReader.TokenType; - Option type = default; - Option lastName = default; Option firstName = default; + Option lastName = default; + Option type = default; string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type"); @@ -170,14 +170,14 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver switch (localVarJsonPropertyName) { - case "$_type": - type = new Option(utf8JsonReader.GetString()!); + case "firstName": + firstName = new Option(utf8JsonReader.GetString()!); break; case "lastName": lastName = new Option(utf8JsonReader.GetString()!); break; - case "firstName": - firstName = new Option(utf8JsonReader.GetString()!); + case "$_type": + type = new Option(utf8JsonReader.GetString()!); break; default: break; @@ -185,16 +185,16 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } } - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + if (firstName.IsSet && firstName.Value == null) + throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); if (lastName.IsSet && lastName.Value == null) throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); - if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); - return new Person(lastName, firstName); + return new Person(firstName, lastName); } /// @@ -231,19 +231,19 @@ public override void Write(Utf8JsonWriter writer, Person person, JsonSerializerO /// public void WriteProperties(Utf8JsonWriter writer, Person person, JsonSerializerOptions jsonSerializerOptions) { - if (person.LastNameOption.IsSet && person.LastName == null) - throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); - if (person.FirstNameOption.IsSet && person.FirstName == null) throw new ArgumentNullException(nameof(person.FirstName), "Property is required for class Person."); - writer.WriteString("$_type", person.Type); + if (person.LastNameOption.IsSet && person.LastName == null) + throw new ArgumentNullException(nameof(person.LastName), "Property is required for class Person."); + + if (person.FirstNameOption.IsSet) + writer.WriteString("firstName", person.FirstName); if (person.LastNameOption.IsSet) writer.WriteString("lastName", person.LastName); - if (person.FirstNameOption.IsSet) - writer.WriteString("firstName", person.FirstName); + writer.WriteString("$_type", person.Type); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/FakeApi.md index 56c764f21e1d..ff2e0dab1ad8 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateOnly date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateOnly** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null) +> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) - var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) - var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional) + var enumQueryInteger = (TestEnumParametersEnumQueryIntegerParameter) "1"; // TestEnumParametersEnumQueryIntegerParameter | Query parameter enum test (double) (optional) + var enumQueryString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Query parameter enum test (string) (optional) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | | **enumHeaderString** | **TestEnumParametersEnumHeaderStringParameter** | Header parameter enum test (string) | [optional] | -| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | -| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form parameter enum test (string array) | [optional] | -| **enumFormString** | **TestEnumParametersRequestEnumFormString** | | [optional] | +| **enumQueryInteger** | **TestEnumParametersEnumQueryIntegerParameter** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **TestEnumParametersEnumHeaderStringParameter** | Query parameter enum test (string) | [optional] | +| **enumQueryStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index a5b062bdc1e7..495d785314c5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs index 037a370a9078..fd357fdbec8d 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3790,19 +3790,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3810,17 +3810,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3828,23 +3828,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3855,20 +3855,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3877,23 +3877,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3906,45 +3906,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3957,30 +3957,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3999,41 +3999,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4065,7 +4065,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4079,7 +4079,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4136,43 +4136,43 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// + /// /// /// - /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option> enumQueryStringArray, Option> enumFormStringArray) + private void ValidateTestEnumParameters(Option> enumFormStringArray, Option> enumHeaderStringArray, Option> enumQueryStringArray) { + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) throw new ArgumentNullException(nameof(enumQueryStringArray)); - - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4182,15 +4182,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4198,18 +4198,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4221,34 +4221,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4260,25 +4260,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// (optional) + /// Form parameter enum test (string array) (optional) /// Header parameter enum test (string) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional) - /// (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumFormStringArray); + ValidateTestEnumParameters(enumFormStringArray, enumHeaderStringArray, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4289,38 +4289,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4344,7 +4344,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4354,7 +4354,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4411,22 +4411,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4436,13 +4436,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4450,16 +4450,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4471,30 +4471,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4506,21 +4506,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4531,15 +4531,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4568,7 +4568,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4582,7 +4582,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5218,39 +5218,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5259,19 +5259,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5281,16 +5281,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5298,19 +5298,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5322,36 +5322,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5363,26 +5363,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5393,12 +5393,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5423,7 +5423,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5433,7 +5433,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs index 91c63f61ba53..b84ef2f23b58 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Api/UserApi.cs @@ -156,11 +156,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -168,11 +168,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -202,11 +202,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -214,11 +214,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1632,33 +1632,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1668,9 +1668,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1678,12 +1678,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1695,22 +1695,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1722,19 +1722,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1745,8 +1745,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1774,7 +1774,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1811,7 +1811,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2053,33 +2053,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2089,9 +2089,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2099,12 +2099,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2116,22 +2116,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2143,19 +2143,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2192,7 +2192,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2202,7 +2202,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/FakeApi.md index 69bd40f60766..ba7ed134222e 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateOnly date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateOnly** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index dc2ebc540c3b..406dbc964a6d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default!; - double varDouble = default!; string patternWithoutDelimiter = default!; byte[] varByte = default!; - Client.Option integer = default!; - Client.Option int32 = default!; - Client.Option int64 = default!; - Client.Option varFloat = default!; - Client.Option varString = default!; + double varDouble = default!; Client.Option binary = default!; + Client.Option callback = default!; Client.Option date = default!; Client.Option dateTime = default!; + Client.Option int32 = default!; + Client.Option int64 = default!; + Client.Option integer = default!; Client.Option password = default!; - Client.Option callback = default!; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default!; + Client.Option varString = default!; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default!; + Client.Option enumFormString = default!; + Client.Option> enumFormStringArray = default!; Client.Option enumHeaderString = default!; - Client.Option> enumQueryStringArray = default!; - Client.Option enumQueryString = default!; - Client.Option enumQueryInteger = default!; + Client.Option> enumHeaderStringArray = default!; Client.Option enumQueryDouble = default!; - Client.Option> enumFormStringArray = default!; - Client.Option enumFormString = default!; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default!; + Client.Option enumQueryString = default!; + Client.Option> enumQueryStringArray = default!; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default!; bool requiredBooleanGroup = default!; long requiredInt64Group = default!; - Client.Option stringGroup = default!; + int requiredStringGroup = default!; Client.Option booleanGroup = default!; Client.Option int64Group = default!; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default!; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default!; - List ioutil = default!; - List http = default!; - List url = default!; List context = default!; + List http = default!; + List ioutil = default!; + List pipe = default!; string requiredNotNullable = default!; - string? requiredNullable = default!; + List url = default!; Client.Option notRequiredNotNullable = default!; Client.Option notRequiredNullable = default!; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string? requiredNullable = default!; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index 8e2c7255cda5..bc750295c346 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default!; string password = default!; - var response = await _instance.LoginUserAsync(username, password); + string username = default!; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default!; User user = default!; - await _instance.UpdateUserAsync(username, user); + string username = default!; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/FakeApi.cs index d543e62f6c5c..aeabdca0e02f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/FakeApi.cs @@ -315,22 +315,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -339,22 +339,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -363,17 +363,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -381,17 +381,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -400,15 +400,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -416,15 +416,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -504,18 +504,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -523,18 +523,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <?> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3792,19 +3792,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3812,17 +3812,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3830,23 +3830,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3857,20 +3857,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3879,23 +3879,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3908,45 +3908,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3959,30 +3959,30 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4001,41 +4001,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4067,7 +4067,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4081,7 +4081,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4138,55 +4138,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4196,15 +4196,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4212,18 +4212,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4235,34 +4235,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4274,25 +4274,25 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4303,38 +4303,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4358,7 +4358,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4368,7 +4368,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4425,22 +4425,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4450,13 +4450,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4464,16 +4464,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4485,30 +4485,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4520,21 +4520,21 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4545,15 +4545,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4582,7 +4582,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4596,7 +4596,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5232,39 +5232,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string? requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string? requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5273,19 +5273,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5295,16 +5295,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5312,19 +5312,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5336,36 +5336,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5377,26 +5377,26 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5407,12 +5407,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5437,7 +5437,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5447,7 +5447,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/UserApi.cs index 26defe23f986..b0f90eaec7c5 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Api/UserApi.cs @@ -158,11 +158,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -170,11 +170,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <?> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -204,11 +204,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -216,11 +216,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <?> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1634,33 +1634,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1670,9 +1670,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1680,12 +1680,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1697,22 +1697,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1724,19 +1724,19 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1747,8 +1747,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1776,7 +1776,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1813,7 +1813,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2055,33 +2055,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2091,9 +2091,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2101,12 +2101,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2118,22 +2118,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2145,19 +2145,19 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2194,7 +2194,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2204,7 +2204,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/FakeApi.md index 69bd40f60766..ba7ed134222e 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateOnly date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateOnly** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 6b89cca478f6..66769b3aee6a 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index aef1593c210e..cebaacd2acfc 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -313,22 +313,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -337,22 +337,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -361,17 +361,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -379,17 +379,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -398,15 +398,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -414,15 +414,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -502,18 +502,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -521,18 +521,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3790,19 +3790,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3810,17 +3810,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3828,23 +3828,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3855,20 +3855,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3877,23 +3877,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3906,45 +3906,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3957,30 +3957,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3999,41 +3999,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4065,7 +4065,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4079,7 +4079,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4136,55 +4136,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4194,15 +4194,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4210,18 +4210,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4233,34 +4233,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4272,25 +4272,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4301,38 +4301,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4356,7 +4356,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4366,7 +4366,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4423,22 +4423,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4448,13 +4448,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4462,16 +4462,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4483,30 +4483,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4518,21 +4518,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4543,15 +4543,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4580,7 +4580,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4594,7 +4594,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5230,39 +5230,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5271,19 +5271,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5293,16 +5293,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5310,19 +5310,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5334,36 +5334,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5375,26 +5375,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5405,12 +5405,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5435,7 +5435,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5445,7 +5445,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 91c63f61ba53..b84ef2f23b58 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -156,11 +156,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -168,11 +168,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -202,11 +202,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -214,11 +214,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1632,33 +1632,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1668,9 +1668,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1678,12 +1678,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1695,22 +1695,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1722,19 +1722,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1745,8 +1745,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1774,7 +1774,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1811,7 +1811,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2053,33 +2053,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2089,9 +2089,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2099,12 +2099,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2116,22 +2116,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2143,19 +2143,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2192,7 +2192,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2202,7 +2202,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/FakeApi.md index 69bd40f60766..ba7ed134222e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateOnly date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateOnly date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateOnly.Parse("2013-10-20"); // DateOnly | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateOnly** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index dc2ebc540c3b..406dbc964a6d 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default!; - double varDouble = default!; string patternWithoutDelimiter = default!; byte[] varByte = default!; - Client.Option integer = default!; - Client.Option int32 = default!; - Client.Option int64 = default!; - Client.Option varFloat = default!; - Client.Option varString = default!; + double varDouble = default!; Client.Option binary = default!; + Client.Option callback = default!; Client.Option date = default!; Client.Option dateTime = default!; + Client.Option int32 = default!; + Client.Option int64 = default!; + Client.Option integer = default!; Client.Option password = default!; - Client.Option callback = default!; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default!; + Client.Option varString = default!; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default!; + Client.Option enumFormString = default!; + Client.Option> enumFormStringArray = default!; Client.Option enumHeaderString = default!; - Client.Option> enumQueryStringArray = default!; - Client.Option enumQueryString = default!; - Client.Option enumQueryInteger = default!; + Client.Option> enumHeaderStringArray = default!; Client.Option enumQueryDouble = default!; - Client.Option> enumFormStringArray = default!; - Client.Option enumFormString = default!; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default!; + Client.Option enumQueryString = default!; + Client.Option> enumQueryStringArray = default!; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default!; bool requiredBooleanGroup = default!; long requiredInt64Group = default!; - Client.Option stringGroup = default!; + int requiredStringGroup = default!; Client.Option booleanGroup = default!; Client.Option int64Group = default!; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default!; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default!; - List ioutil = default!; - List http = default!; - List url = default!; List context = default!; + List http = default!; + List ioutil = default!; + List pipe = default!; string requiredNotNullable = default!; - string? requiredNullable = default!; + List url = default!; Client.Option notRequiredNotNullable = default!; Client.Option notRequiredNullable = default!; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string? requiredNullable = default!; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index 8e2c7255cda5..bc750295c346 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default!; string password = default!; - var response = await _instance.LoginUserAsync(username, password); + string username = default!; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default!; User user = default!; - await _instance.UpdateUserAsync(username, user); + string username = default!; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/FakeApi.cs index d543e62f6c5c..aeabdca0e02f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/FakeApi.cs @@ -315,22 +315,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -339,22 +339,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -363,17 +363,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -381,17 +381,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -400,15 +400,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -416,15 +416,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <?> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -504,18 +504,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -523,18 +523,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <?> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3792,19 +3792,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3812,17 +3812,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3830,23 +3830,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3857,20 +3857,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3879,23 +3879,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3908,45 +3908,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3959,30 +3959,30 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4001,41 +4001,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4067,7 +4067,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4081,7 +4081,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4138,55 +4138,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4196,15 +4196,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4212,18 +4212,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4235,34 +4235,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4274,25 +4274,25 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4303,38 +4303,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4358,7 +4358,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4368,7 +4368,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4425,22 +4425,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4450,13 +4450,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4464,16 +4464,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4485,30 +4485,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4520,21 +4520,21 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4545,15 +4545,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4582,7 +4582,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4596,7 +4596,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5232,39 +5232,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string? requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string? requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5273,19 +5273,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5295,16 +5295,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5312,19 +5312,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5336,36 +5336,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string? requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5377,26 +5377,26 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string? requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string? requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5407,12 +5407,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5437,7 +5437,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5447,7 +5447,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/UserApi.cs index 26defe23f986..b0f90eaec7c5 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Api/UserApi.cs @@ -158,11 +158,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -170,11 +170,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <?> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -204,11 +204,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -216,11 +216,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <?> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1634,33 +1634,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1670,9 +1670,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1680,12 +1680,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1697,22 +1697,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1724,19 +1724,19 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1747,8 +1747,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1776,7 +1776,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1813,7 +1813,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2055,33 +2055,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2091,9 +2091,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2101,12 +2101,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2118,22 +2118,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2145,19 +2145,19 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2194,7 +2194,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2204,7 +2204,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/FakeApi.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/FakeApi.md index 3f5be967684a..489d6659346b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/FakeApi.md @@ -1067,7 +1067,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int integer = null, int int32 = null, long int64 = null, float varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, System.IO.Stream binary = null, string callback = null, DateTime date = null, DateTime dateTime = null, int int32 = null, long int64 = null, int integer = null, string password = null, float varFloat = null, string varString = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -1095,24 +1095,24 @@ namespace Example var apiInstance = new FakeApi(config); var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int | None (optional) - var int32 = 56; // int | None (optional) - var int64 = 789L; // long | None (optional) - var varFloat = 3.4F; // float | None (optional) - var varString = "varString_example"; // string | None (optional) + var varDouble = 1.2D; // double | None var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var callback = "callback_example"; // string | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var int32 = 56; // int | None (optional) + var int64 = 789L; // long | None (optional) + var integer = 56; // int | None (optional) var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var varFloat = 3.4F; // float | None (optional) + var varString = "varString_example"; // string | None (optional) try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParameters(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1132,7 +1132,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + apiInstance.TestEndpointParametersWithHttpInfo(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } catch (ApiException e) { @@ -1147,19 +1147,19 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **number** | **decimal** | None | | -| **varDouble** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | | **varByte** | **byte[]** | None | | -| **integer** | **int** | None | [optional] | -| **int32** | **int** | None | [optional] | -| **int64** | **long** | None | [optional] | -| **varFloat** | **float** | None | [optional] | -| **varString** | **string** | None | [optional] | +| **varDouble** | **double** | None | | | **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **callback** | **string** | None | [optional] | | **date** | **DateTime** | None | [optional] | | **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | +| **int32** | **int** | None | [optional] | +| **int64** | **long** | None | [optional] | +| **integer** | **int** | None | [optional] | | **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **varFloat** | **float** | None | [optional] | +| **varString** | **string** | None | [optional] | ### Return type @@ -1185,7 +1185,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (string enumFormString = null, List enumFormStringArray = null, string enumHeaderString = null, List enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List enumQueryStringArray = null) To test enum parameters @@ -1208,19 +1208,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1240,7 +1240,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } catch (ApiException e) { @@ -1254,14 +1254,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] | +| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | ### Return type @@ -1287,7 +1287,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int stringGroup = null, bool booleanGroup = null, long int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, bool booleanGroup = null, long int64Group = null, int stringGroup = null) Fake endpoint to test group parameters (optional) @@ -1313,17 +1313,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int | String in group parameters (optional) + var requiredStringGroup = 56; // int | Required String in group parameters var booleanGroup = true; // bool | Boolean in group parameters (optional) var int64Group = 789L; // long | Integer in group parameters (optional) + var stringGroup = 56; // int | String in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1343,7 +1343,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } catch (ApiException e) { @@ -1357,12 +1357,12 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int** | String in group parameters | [optional] | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **booleanGroup** | **bool** | Boolean in group parameters | [optional] | | **int64Group** | **long** | Integer in group parameters | [optional] | +| **stringGroup** | **int** | String in group parameters | [optional] | ### Return type @@ -1644,7 +1644,7 @@ No authorization required # **TestQueryParameterCollectionFormat** -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null) +> void TestQueryParameterCollectionFormat (List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, string notRequiredNotNullable = null, string notRequiredNullable = null, string requiredNullable) @@ -1667,19 +1667,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | var context = new List(); // List | + var http = new List(); // List | + var ioutil = new List(); // List | + var pipe = new List(); // List | var requiredNotNullable = "requiredNotNullable_example"; // string | - var requiredNullable = "requiredNullable_example"; // string | + var url = new List(); // List | var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional) var notRequiredNullable = "notRequiredNullable_example"; // string | (optional) + var requiredNullable = "requiredNullable_example"; // string | try { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1698,7 +1698,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } catch (ApiException e) { @@ -1712,15 +1712,15 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **pipe** | [**List<string>**](string.md) | | | -| **ioutil** | [**List<string>**](string.md) | | | -| **http** | [**List<string>**](string.md) | | | -| **url** | [**List<string>**](string.md) | | | | **context** | [**List<string>**](string.md) | | | +| **http** | [**List<string>**](string.md) | | | +| **ioutil** | [**List<string>**](string.md) | | | +| **pipe** | [**List<string>**](string.md) | | | | **requiredNotNullable** | **string** | | | -| **requiredNullable** | **string** | | | +| **url** | [**List<string>**](string.md) | | | | **notRequiredNotNullable** | **string** | | [optional] | | **notRequiredNullable** | **string** | | [optional] | +| **requiredNullable** | **string** | | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/UserApi.md b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/UserApi.md index 8a761998fdbd..34064e25c4a8 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/docs/apis/UserApi.md @@ -453,7 +453,7 @@ No authorization required # **LoginUser** -> string LoginUser (string username, string password) +> string LoginUser (string password, string username) Logs user into the system @@ -474,13 +474,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | The user name for login var password = "password_example"; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login try { // Logs user into the system - string result = apiInstance.LoginUser(username, password); + string result = apiInstance.LoginUser(password, username); Debug.WriteLine(result); } catch (ApiException e) @@ -501,7 +501,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Logs user into the system - ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password); + ApiResponse response = apiInstance.LoginUserWithHttpInfo(password, username); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -518,8 +518,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | The user name for login | | | **password** | **string** | The password for login in clear text | | +| **username** | **string** | The user name for login | | ### Return type @@ -625,7 +625,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -648,13 +648,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -674,7 +674,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -688,8 +688,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index 1e36a4956043..ce85f85778ef 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -193,20 +193,20 @@ public async Task TestClientModelAsyncTest() public async Task TestEndpointParametersAsyncTest() { decimal number = default; - double varDouble = default; string patternWithoutDelimiter = default; byte[] varByte = default; - Client.Option integer = default; - Client.Option int32 = default; - Client.Option int64 = default; - Client.Option varFloat = default; - Client.Option varString = default; + double varDouble = default; Client.Option binary = default; + Client.Option callback = default; Client.Option date = default; Client.Option dateTime = default; + Client.Option int32 = default; + Client.Option int64 = default; + Client.Option integer = default; Client.Option password = default; - Client.Option callback = default; - await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + Client.Option varFloat = default; + Client.Option varString = default; + await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); } /// @@ -215,15 +215,15 @@ public async Task TestEndpointParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestEnumParametersAsyncTest() { - Client.Option> enumHeaderStringArray = default; + Client.Option enumFormString = default; + Client.Option> enumFormStringArray = default; Client.Option enumHeaderString = default; - Client.Option> enumQueryStringArray = default; - Client.Option enumQueryString = default; - Client.Option enumQueryInteger = default; + Client.Option> enumHeaderStringArray = default; Client.Option enumQueryDouble = default; - Client.Option> enumFormStringArray = default; - Client.Option enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + Client.Option enumQueryInteger = default; + Client.Option enumQueryString = default; + Client.Option> enumQueryStringArray = default; + await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); } /// @@ -232,13 +232,13 @@ public async Task TestEnumParametersAsyncTest() [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; long requiredInt64Group = default; - Client.Option stringGroup = default; + int requiredStringGroup = default; Client.Option booleanGroup = default; Client.Option int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + Client.Option stringGroup = default; + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); } /// @@ -278,16 +278,16 @@ public async Task TestJsonFormDataAsyncTest() [Fact (Skip = "not implemented")] public async Task TestQueryParameterCollectionFormatAsyncTest() { - List pipe = default; - List ioutil = default; - List http = default; - List url = default; List context = default; + List http = default; + List ioutil = default; + List pipe = default; string requiredNotNullable = default; - string requiredNullable = default; + List url = default; Client.Option notRequiredNotNullable = default; Client.Option notRequiredNullable = default; - await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + string requiredNullable = default; + await _instance.TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); } /// diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index fba6a6f085fc..5a655797609e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -108,9 +108,9 @@ public async Task GetUserByNameAsyncTest() [Fact (Skip = "not implemented")] public async Task LoginUserAsyncTest() { - string username = default; string password = default; - var response = await _instance.LoginUserAsync(username, password); + string username = default; + var response = await _instance.LoginUserAsync(password, username); var model = response.Ok(); Assert.IsType(model); } @@ -130,9 +130,9 @@ public async Task LogoutUserAsyncTest() [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs index ea0880be652c..33bd469b7c0d 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -312,22 +312,22 @@ public interface IFakeApi : IApi /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -336,22 +336,22 @@ public interface IFakeApi : IApi /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -360,17 +360,17 @@ public interface IFakeApi : IApi /// To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// To test enum parameters @@ -378,17 +378,17 @@ public interface IFakeApi : IApi /// /// To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default); + Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -397,15 +397,15 @@ public interface IFakeApi : IApi /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// Fake endpoint to test group parameters (optional) @@ -413,15 +413,15 @@ public interface IFakeApi : IApi /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default); /// /// test inline additionalProperties @@ -501,18 +501,18 @@ public interface IFakeApi : IApi /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// @@ -520,18 +520,18 @@ public interface IFakeApi : IApi /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default); + Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default); /// /// test referenced string map @@ -3780,19 +3780,19 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEndpointParameters(ref decimal number, ref double varDouble, ref string patternWithoutDelimiter, ref byte[] varByte, ref Option integer, ref Option int32, ref Option int64, ref Option varFloat, ref Option varString, ref Option binary, ref Option date, ref Option dateTime, ref Option password, ref Option callback); + partial void FormatTestEndpointParameters(ref decimal number, ref string patternWithoutDelimiter, ref byte[] varByte, ref double varDouble, ref Option binary, ref Option callback, ref Option date, ref Option dateTime, ref Option int32, ref Option int64, ref Option integer, ref Option password, ref Option varFloat, ref Option varString); /// /// Validates the request parameters /// /// /// - /// /// - /// /// + /// + /// /// - private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option varString, Option binary, Option password, Option callback) + private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte[] varByte, Option binary, Option callback, Option password, Option varString) { if (patternWithoutDelimiter == null) throw new ArgumentNullException(nameof(patternWithoutDelimiter)); @@ -3800,17 +3800,17 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte if (varByte == null) throw new ArgumentNullException(nameof(varByte)); - if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString)); - if (binary.IsSet && binary.Value == null) throw new ArgumentNullException(nameof(binary)); + if (callback.IsSet && callback.Value == null) + throw new ArgumentNullException(nameof(callback)); + if (password.IsSet && password.Value == null) throw new ArgumentNullException(nameof(password)); - if (callback.IsSet && callback.Value == null) - throw new ArgumentNullException(nameof(callback)); + if (varString.IsSet && varString.Value == null) + throw new ArgumentNullException(nameof(varString)); } /// @@ -3818,23 +3818,23 @@ private void ValidateTestEndpointParameters(string patternWithoutDelimiter, byte /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParameters(ref suppressDefaultLog, apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -3845,20 +3845,20 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void AfterTestEndpointParameters(ref bool suppressDefaultLog, ITestEndpointParametersApiResponse apiResponseLocalVar, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Logs exceptions that occur while retrieving the server response @@ -3867,23 +3867,23 @@ private void AfterTestEndpointParametersDefaultImplementation(ITestEndpointParam /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback) + /// + /// + private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString) { bool suppressDefaultLog = false; - OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -3896,45 +3896,45 @@ private void OnErrorTestEndpointParametersDefaultImplementation(Exception except /// /// /// - /// /// /// - /// - /// - /// - /// - /// + /// /// + /// /// /// + /// + /// + /// /// - /// - partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer, Option int32, Option int64, Option varFloat, Option varString, Option binary, Option date, Option dateTime, Option password, Option callback); + /// + /// + partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary, Option callback, Option date, Option dateTime, Option int32, Option int64, Option integer, Option password, Option varFloat, Option varString); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersOrDefaultAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + return await TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -3947,30 +3947,30 @@ public async Task TestEndpointParametersOrDe /// /// Thrown when fails to make API call /// None - /// None /// None /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) + /// None /// None (optional) + /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, Option integer = default, Option int32 = default, Option int64 = default, Option varFloat = default, Option varString = default, Option binary = default, Option date = default, Option dateTime = default, Option password = default, Option callback = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEndpointParametersAsync(decimal number, string patternWithoutDelimiter, byte[] varByte, double varDouble, Option binary = default, Option callback = default, Option date = default, Option dateTime = default, Option int32 = default, Option int64 = default, Option integer = default, Option password = default, Option varFloat = default, Option varString = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, varString, binary, password, callback); + ValidateTestEndpointParameters(patternWithoutDelimiter, varByte, binary, callback, password, varString); - FormatTestEndpointParameters(ref number, ref varDouble, ref patternWithoutDelimiter, ref varByte, ref integer, ref int32, ref int64, ref varFloat, ref varString, ref binary, ref date, ref dateTime, ref password, ref callback); + FormatTestEndpointParameters(ref number, ref patternWithoutDelimiter, ref varByte, ref varDouble, ref binary, ref callback, ref date, ref dateTime, ref int32, ref int64, ref integer, ref password, ref varFloat, ref varString); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -3989,41 +3989,41 @@ public async Task TestEndpointParametersAsyn formParameterLocalVars.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); - formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); - formParameterLocalVars.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); formParameterLocalVars.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(varByte))); - if (integer.IsSet) - formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); - - if (int32.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); - - if (int64.IsSet) - formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); - - if (varFloat.IsSet) - formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); - - if (varString.IsSet) - formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); + formParameterLocalVars.Add(new KeyValuePair("double", ClientUtils.ParameterToString(varDouble))); if (binary.IsSet) multipartContentLocalVar.Add(new StreamContent(binary.Value)); + if (callback.IsSet) + formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (date.IsSet) formParameterLocalVars.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date.Value))); if (dateTime.IsSet) formParameterLocalVars.Add(new KeyValuePair("dateTime", ClientUtils.ParameterToString(dateTime.Value))); + if (int32.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int32", ClientUtils.ParameterToString(int32.Value))); + + if (int64.IsSet) + formParameterLocalVars.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64.Value))); + + if (integer.IsSet) + formParameterLocalVars.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer.Value))); + if (password.IsSet) formParameterLocalVars.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password.Value))); - if (callback.IsSet) - formParameterLocalVars.Add(new KeyValuePair("callback", ClientUtils.ParameterToString(callback.Value))); + if (varFloat.IsSet) + formParameterLocalVars.Add(new KeyValuePair("float", ClientUtils.ParameterToString(varFloat.Value))); + + if (varString.IsSet) + formParameterLocalVars.Add(new KeyValuePair("string", ClientUtils.ParameterToString(varString.Value))); List tokenBaseLocalVars = new List(); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; @@ -4055,7 +4055,7 @@ public async Task TestEndpointParametersAsyn TestEndpointParametersApiResponse apiResponseLocalVar = new TestEndpointParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + AfterTestEndpointParametersDefaultImplementation(apiResponseLocalVar, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnTestEndpointParameters(apiResponseLocalVar); @@ -4069,7 +4069,7 @@ public async Task TestEndpointParametersAsyn } catch(Exception e) { - OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); + OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString); Events.ExecuteOnErrorTestEndpointParameters(e); throw; } @@ -4126,55 +4126,55 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestEnumParameters(Option> enumHeaderStringArray, ref Option enumHeaderString, Option> enumQueryStringArray, ref Option enumQueryString, ref Option enumQueryInteger, ref Option enumQueryDouble, Option> enumFormStringArray, ref Option enumFormString); + partial void FormatTestEnumParameters(ref Option enumFormString, Option> enumFormStringArray, ref Option enumHeaderString, Option> enumHeaderStringArray, ref Option enumQueryDouble, ref Option enumQueryInteger, ref Option enumQueryString, Option> enumQueryStringArray); /// /// Validates the request parameters /// - /// + /// + /// /// - /// + /// /// - /// - /// + /// /// - private void ValidateTestEnumParameters(Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option> enumFormStringArray, Option enumFormString) + private void ValidateTestEnumParameters(Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryString, Option> enumQueryStringArray) { - if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) - throw new ArgumentNullException(nameof(enumHeaderStringArray)); + if (enumFormString.IsSet && enumFormString.Value == null) + throw new ArgumentNullException(nameof(enumFormString)); + + if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) + throw new ArgumentNullException(nameof(enumFormStringArray)); if (enumHeaderString.IsSet && enumHeaderString.Value == null) throw new ArgumentNullException(nameof(enumHeaderString)); - if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) - throw new ArgumentNullException(nameof(enumQueryStringArray)); + if (enumHeaderStringArray.IsSet && enumHeaderStringArray.Value == null) + throw new ArgumentNullException(nameof(enumHeaderStringArray)); if (enumQueryString.IsSet && enumQueryString.Value == null) throw new ArgumentNullException(nameof(enumQueryString)); - if (enumFormStringArray.IsSet && enumFormStringArray.Value == null) - throw new ArgumentNullException(nameof(enumFormStringArray)); - - if (enumFormString.IsSet && enumFormString.Value == null) - throw new ArgumentNullException(nameof(enumFormString)); + if (enumQueryStringArray.IsSet && enumQueryStringArray.Value == null) + throw new ArgumentNullException(nameof(enumQueryStringArray)); } /// /// Processes the server response /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParameters(ref suppressDefaultLog, apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4184,15 +4184,15 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void AfterTestEnumParameters(ref bool suppressDefaultLog, ITestEnumParametersApiResponse apiResponseLocalVar, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// Logs exceptions that occur while retrieving the server response @@ -4200,18 +4200,18 @@ private void AfterTestEnumParametersDefaultImplementation(ITestEnumParametersApi /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString) + /// + /// + /// + private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray) { bool suppressDefaultLog = false; - OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4223,34 +4223,34 @@ private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, /// /// /// - /// + /// + /// /// - /// - /// - /// + /// /// - /// - /// - partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option> enumHeaderStringArray, Option enumHeaderString, Option> enumQueryStringArray, Option enumQueryString, Option enumQueryInteger, Option enumQueryDouble, Option> enumFormStringArray, Option enumFormString); + /// + /// + /// + partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option enumFormString, Option> enumFormStringArray, Option enumHeaderString, Option> enumHeaderStringArray, Option enumQueryDouble, Option enumQueryInteger, Option enumQueryString, Option> enumQueryStringArray); /// /// To test enum parameters To test enum parameters /// - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersOrDefaultAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + return await TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4262,25 +4262,25 @@ public async Task TestEnumParametersOrDefaultAsy /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) + /// Form parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) + /// Header parameter enum test (string array) (optional) /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(Option> enumHeaderStringArray = default, Option enumHeaderString = default, Option> enumQueryStringArray = default, Option enumQueryString = default, Option enumQueryInteger = default, Option enumQueryDouble = default, Option> enumFormStringArray = default, Option enumFormString = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestEnumParametersAsync(Option enumFormString = default, Option> enumFormStringArray = default, Option enumHeaderString = default, Option> enumHeaderStringArray = default, Option enumQueryDouble = default, Option enumQueryInteger = default, Option enumQueryString = default, Option> enumQueryStringArray = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumFormStringArray, enumFormString); + ValidateTestEnumParameters(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryString, enumQueryStringArray); - FormatTestEnumParameters(enumHeaderStringArray, ref enumHeaderString, enumQueryStringArray, ref enumQueryString, ref enumQueryInteger, ref enumQueryDouble, enumFormStringArray, ref enumFormString); + FormatTestEnumParameters(ref enumFormString, enumFormStringArray, ref enumHeaderString, enumHeaderStringArray, ref enumQueryDouble, ref enumQueryInteger, ref enumQueryString, enumQueryStringArray); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4291,38 +4291,38 @@ public async Task TestEnumParametersAsync(Option System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - if (enumQueryStringArray.IsSet) - parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - - if (enumQueryString.IsSet) - parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); + if (enumQueryDouble.IsSet) + parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); if (enumQueryInteger.IsSet) parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value); - if (enumQueryDouble.IsSet) - parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value); + if (enumQueryString.IsSet) + parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value); - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + if (enumQueryStringArray.IsSet) + parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value); - if (enumHeaderStringArray.IsSet) - httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); if (enumHeaderString.IsSet) httpRequestMessageLocalVar.Headers.Add("enum_header_string", ClientUtils.ParameterToString(enumHeaderString.Value)); + if (enumHeaderStringArray.IsSet) + httpRequestMessageLocalVar.Headers.Add("enum_header_string_array", ClientUtils.ParameterToString(enumHeaderStringArray.Value)); + MultipartContent multipartContentLocalVar = new MultipartContent(); httpRequestMessageLocalVar.Content = multipartContentLocalVar; List> formParameterLocalVars = new List>(); - multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormStringArray.IsSet) - formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); - - if (enumFormString.IsSet) + multipartContentLocalVar.Add(new FormUrlEncodedContent(formParameterLocalVars)); if (enumFormString.IsSet) formParameterLocalVars.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString.Value))); + if (enumFormStringArray.IsSet) + formParameterLocalVars.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray.Value))); + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; string[] contentTypes = new string[] { @@ -4346,7 +4346,7 @@ public async Task TestEnumParametersAsync(Option TestEnumParametersApiResponse apiResponseLocalVar = new TestEnumParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + AfterTestEnumParametersDefaultImplementation(apiResponseLocalVar, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnTestEnumParameters(apiResponseLocalVar); @@ -4356,7 +4356,7 @@ public async Task TestEnumParametersAsync(Option } catch(Exception e) { - OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray); Events.ExecuteOnErrorTestEnumParameters(e); throw; } @@ -4413,22 +4413,22 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestGroupParameters(ref int requiredStringGroup, ref bool requiredBooleanGroup, ref long requiredInt64Group, ref Option stringGroup, ref Option booleanGroup, ref Option int64Group); + partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref long requiredInt64Group, ref int requiredStringGroup, ref Option booleanGroup, ref Option int64Group, ref Option stringGroup); /// /// Processes the server response /// /// - /// /// /// - /// + /// /// /// - private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParameters(ref suppressDefaultLog, apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -4438,13 +4438,13 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void AfterTestGroupParameters(ref bool suppressDefaultLog, ITestGroupParametersApiResponse apiResponseLocalVar, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Logs exceptions that occur while retrieving the server response @@ -4452,16 +4452,16 @@ private void AfterTestGroupParametersDefaultImplementation(ITestGroupParametersA /// /// /// - /// /// /// - /// + /// /// /// - private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group) + /// + private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup) { bool suppressDefaultLog = false; - OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -4473,30 +4473,30 @@ private void OnErrorTestGroupParametersDefaultImplementation(Exception exception /// /// /// - /// /// /// - /// + /// /// /// - partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup, Option booleanGroup, Option int64Group); + /// + partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup, Option int64Group, Option stringGroup); /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + return await TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -4508,21 +4508,21 @@ public async Task TestGroupParametersOrDefaultA /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) + /// Required String in group parameters /// Boolean in group parameters (optional) /// Integer in group parameters (optional) + /// String in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, Option stringGroup = default, Option booleanGroup = default, Option int64Group = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, long requiredInt64Group, int requiredStringGroup, Option booleanGroup = default, Option int64Group = default, Option stringGroup = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - FormatTestGroupParameters(ref requiredStringGroup, ref requiredBooleanGroup, ref requiredInt64Group, ref stringGroup, ref booleanGroup, ref int64Group); + FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredInt64Group, ref requiredStringGroup, ref booleanGroup, ref int64Group, ref stringGroup); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -4533,15 +4533,15 @@ public async Task TestGroupParametersAsync(int System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group); - - if (stringGroup.IsSet) - parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + parseQueryStringLocalVar["required_string_group"] = ClientUtils.ParameterToString(requiredStringGroup); if (int64Group.IsSet) parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value); + if (stringGroup.IsSet) + parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value); + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); httpRequestMessageLocalVar.Headers.Add("required_boolean_group", ClientUtils.ParameterToString(requiredBooleanGroup)); @@ -4569,7 +4569,7 @@ public async Task TestGroupParametersAsync(int TestGroupParametersApiResponse apiResponseLocalVar = new TestGroupParametersApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + AfterTestGroupParametersDefaultImplementation(apiResponseLocalVar, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnTestGroupParameters(apiResponseLocalVar); @@ -4583,7 +4583,7 @@ public async Task TestGroupParametersAsync(int } catch(Exception e) { - OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup); Events.ExecuteOnErrorTestGroupParameters(e); throw; } @@ -5219,39 +5219,39 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ref string requiredNotNullable, ref string requiredNullable, ref Option notRequiredNotNullable, ref Option notRequiredNullable); + partial void FormatTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, ref string requiredNotNullable, List url, ref Option notRequiredNotNullable, ref Option notRequiredNullable, ref string requiredNullable); /// /// Validates the request parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// + /// /// /// - private void ValidateTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, Option notRequiredNotNullable) + private void ValidateTestQueryParameterCollectionFormat(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable) { - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); + if (context == null) + throw new ArgumentNullException(nameof(context)); if (http == null) throw new ArgumentNullException(nameof(http)); - if (url == null) - throw new ArgumentNullException(nameof(url)); + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); - if (context == null) - throw new ArgumentNullException(nameof(context)); + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); if (requiredNotNullable == null) throw new ArgumentNullException(nameof(requiredNotNullable)); + if (url == null) + throw new ArgumentNullException(nameof(url)); + if (notRequiredNotNullable.IsSet && notRequiredNotNullable.Value == null) throw new ArgumentNullException(nameof(notRequiredNotNullable)); } @@ -5260,19 +5260,19 @@ private void ValidateTestQueryParameterCollectionFormat(List pipe, List< /// Processes the server response /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormat(ref suppressDefaultLog, apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -5282,16 +5282,16 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void AfterTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, ITestQueryParameterCollectionFormatApiResponse apiResponseLocalVar, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// Logs exceptions that occur while retrieving the server response @@ -5299,19 +5299,19 @@ private void AfterTestQueryParameterCollectionFormatDefaultImplementation(ITestQ /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable) + /// + private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable) { bool suppressDefaultLog = false; - OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -5323,36 +5323,36 @@ private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exce /// /// /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// /// - partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, Option notRequiredNotNullable, Option notRequiredNullable); + /// + partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable, Option notRequiredNullable, string requiredNullable); /// /// To test the collection format in query parameters /// - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatOrDefaultAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { try { - return await TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable, cancellationToken).ConfigureAwait(false); + return await TestQueryParameterCollectionFormatAsync(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -5364,26 +5364,26 @@ public async Task TestQueryParam /// To test the collection format in query parameters /// /// Thrown when fails to make API call - /// - /// - /// - /// /// + /// + /// + /// /// - /// + /// /// (optional) /// (optional) + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable = default, Option notRequiredNotNullable = default, Option notRequiredNullable = default, System.Threading.CancellationToken cancellationToken = default) + public async Task TestQueryParameterCollectionFormatAsync(List context, List http, List ioutil, List pipe, string requiredNotNullable, List url, Option notRequiredNotNullable = default, Option notRequiredNullable = default, string requiredNullable = default, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, notRequiredNotNullable); + ValidateTestQueryParameterCollectionFormat(context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable); - FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, ref requiredNotNullable, ref requiredNullable, ref notRequiredNotNullable, ref notRequiredNullable); + FormatTestQueryParameterCollectionFormat(context, http, ioutil, pipe, ref requiredNotNullable, url, ref notRequiredNotNullable, ref notRequiredNullable, ref requiredNullable); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -5394,12 +5394,12 @@ public async Task TestQueryParam System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); - parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); - parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); - parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["context"] = ClientUtils.ParameterToString(context); + parseQueryStringLocalVar["http"] = ClientUtils.ParameterToString(http); + parseQueryStringLocalVar["ioutil"] = ClientUtils.ParameterToString(ioutil); + parseQueryStringLocalVar["pipe"] = ClientUtils.ParameterToString(pipe); parseQueryStringLocalVar["requiredNotNullable"] = ClientUtils.ParameterToString(requiredNotNullable); + parseQueryStringLocalVar["url"] = ClientUtils.ParameterToString(url); parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable); if (notRequiredNotNullable.IsSet) @@ -5423,7 +5423,7 @@ public async Task TestQueryParam TestQueryParameterCollectionFormatApiResponse apiResponseLocalVar = new TestQueryParameterCollectionFormatApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/test-query-parameters", requestedAtLocalVar, _jsonSerializerOptions); - AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + AfterTestQueryParameterCollectionFormatDefaultImplementation(apiResponseLocalVar, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnTestQueryParameterCollectionFormat(apiResponseLocalVar); @@ -5433,7 +5433,7 @@ public async Task TestQueryParam } catch(Exception e) { - OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable); + OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, context, http, ioutil, pipe, requiredNotNullable, url, notRequiredNotNullable, notRequiredNullable, requiredNullable); Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e); throw; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs index 4d3a3aa9e48c..b9f0d653ffad 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Api/UserApi.cs @@ -154,11 +154,11 @@ public interface IUserApi : IApi /// /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs user into the system @@ -166,11 +166,11 @@ public interface IUserApi : IApi /// /// /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default); + Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Logs out current logged in user session @@ -200,11 +200,11 @@ public interface IUserApi : IApi /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); /// /// Updated user @@ -212,11 +212,11 @@ public interface IUserApi : IApi /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default); + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default); } /// @@ -1621,33 +1621,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatLoginUser(ref string username, ref string password); + partial void FormatLoginUser(ref string password, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateLoginUser(string username, string password) + private void ValidateLoginUser(string password, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (password == null) throw new ArgumentNullException(nameof(password)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password) + /// + private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string password, string username) { bool suppressDefaultLog = false; - AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, username, password); + AfterLoginUser(ref suppressDefaultLog, apiResponseLocalVar, password, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -1657,9 +1657,9 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password); + /// + partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -1667,12 +1667,12 @@ private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiRespon /// /// /// - /// /// - private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password) + /// + private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string password, string username) { bool suppressDefaultLog = false; - OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password); + OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, password, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -1684,22 +1684,22 @@ private void OnErrorLoginUserDefaultImplementation(Exception exception, string p /// /// /// - /// /// - partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password); + /// + partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username); /// /// Logs user into the system /// - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await LoginUserAsync(username, password, cancellationToken).ConfigureAwait(false); + return await LoginUserAsync(password, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1711,19 +1711,19 @@ public async Task LoginUserOrDefaultAsync(string username /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login /// The password for login in clear text + /// The user name for login /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default) + public async Task LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateLoginUser(username, password); + ValidateLoginUser(password, username); - FormatLoginUser(ref username, ref password); + FormatLoginUser(ref password, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -1734,8 +1734,8 @@ public async Task LoginUserAsync(string username, string System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); parseQueryStringLocalVar["password"] = ClientUtils.ParameterToString(password); + parseQueryStringLocalVar["username"] = ClientUtils.ParameterToString(username); uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); @@ -1762,7 +1762,7 @@ public async Task LoginUserAsync(string username, string LoginUserApiResponse apiResponseLocalVar = new LoginUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/login", requestedAtLocalVar, _jsonSerializerOptions); - AfterLoginUserDefaultImplementation(apiResponseLocalVar, username, password); + AfterLoginUserDefaultImplementation(apiResponseLocalVar, password, username); Events.ExecuteOnLoginUser(apiResponseLocalVar); @@ -1772,7 +1772,7 @@ public async Task LoginUserAsync(string username, string } catch(Exception e) { - OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password); + OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, password, username); Events.ExecuteOnErrorLoginUser(e); throw; } @@ -2013,33 +2013,33 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - partial void FormatUpdateUser(ref string username, User user); + partial void FormatUpdateUser(User user, ref string username); /// /// Validates the request parameters /// - /// /// + /// /// - private void ValidateUpdateUser(string username, User user) + private void ValidateUpdateUser(User user, string username) { - if (username == null) - throw new ArgumentNullException(nameof(username)); - if (user == null) throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); } /// /// Processes the server response /// /// - /// /// - private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user) + /// + private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, User user, string username) { bool suppressDefaultLog = false; - AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, username, user); + AfterUpdateUser(ref suppressDefaultLog, apiResponseLocalVar, user, username); if (!suppressDefaultLog) Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } @@ -2049,9 +2049,9 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user); + /// + partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username); /// /// Logs exceptions that occur while retrieving the server response @@ -2059,12 +2059,12 @@ private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResp /// /// /// - /// /// - private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user) + /// + private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username) { bool suppressDefaultLog = false; - OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, username, user); + OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username); if (!suppressDefaultLog) Logger.LogError(exception, "An error occurred while sending the request to the server."); } @@ -2076,22 +2076,22 @@ private void OnErrorUpdateUserDefaultImplementation(Exception exception, string /// /// /// - /// /// - partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user); + /// + partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username); /// /// Updated user This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { try { - return await UpdateUserAsync(username, user, cancellationToken).ConfigureAwait(false); + return await UpdateUserAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2103,19 +2103,19 @@ public async Task UpdateUserOrDefaultAsync(string userna /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default) { UriBuilder uriBuilderLocalVar = new UriBuilder(); try { - ValidateUpdateUser(username, user); + ValidateUpdateUser(user, username); - FormatUpdateUser(ref username, user); + FormatUpdateUser(user, ref username); using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) { @@ -2152,7 +2152,7 @@ public async Task UpdateUserAsync(string username, User UpdateUserApiResponse apiResponseLocalVar = new UpdateUserApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); - AfterUpdateUserDefaultImplementation(apiResponseLocalVar, username, user); + AfterUpdateUserDefaultImplementation(apiResponseLocalVar, user, username); Events.ExecuteOnUpdateUser(apiResponseLocalVar); @@ -2162,7 +2162,7 @@ public async Task UpdateUserAsync(string username, User } catch(Exception e) { - OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user); + OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username); Events.ExecuteOnErrorUpdateUser(e); throw; }