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