forked from loafle/openapi-generator-original
changed default sorting of samples (#19335)
This commit is contained in:
parent
ad8a7d2a3c
commit
5166765724
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -13,5 +13,6 @@ additionalProperties:
|
||||
targetFramework: net47
|
||||
skipFormModel: false
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
inlineSchemaOptions:
|
||||
RESOLVE_INLINE_ENUMS: true
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -9,3 +9,4 @@ additionalProperties:
|
||||
useDateTimeForDate: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -12,3 +12,4 @@ additionalProperties:
|
||||
equatable: true
|
||||
targetFramework: net47
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -13,5 +13,6 @@ additionalProperties:
|
||||
targetFramework: net48
|
||||
skipFormModel: false
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
inlineSchemaOptions:
|
||||
RESOLVE_INLINE_ENUMS: true
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: false
|
||||
equatable: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -9,3 +9,4 @@ additionalProperties:
|
||||
useDateTimeForDate: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -12,3 +12,4 @@ additionalProperties:
|
||||
equatable: true
|
||||
targetFramework: net48
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: true
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: true
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: true
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -13,5 +13,6 @@ additionalProperties:
|
||||
targetFramework: net8.0
|
||||
skipFormModel: false
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
inlineSchemaOptions:
|
||||
RESOLVE_INLINE_ENUMS: true
|
||||
|
@ -12,3 +12,4 @@ additionalProperties:
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -12,3 +12,4 @@ additionalProperties:
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,5 @@ additionalProperties:
|
||||
nullableReferenceTypes: true
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -9,3 +9,4 @@ additionalProperties:
|
||||
useDateTimeForDate: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -12,3 +12,4 @@ additionalProperties:
|
||||
equatable: true
|
||||
targetFramework: net8.0
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -11,3 +11,4 @@ additionalProperties:
|
||||
targetFramework: netstandard2.0
|
||||
equatable: true
|
||||
modelPropertySorting: alphabetical
|
||||
operationParameterSorting: alphabetical
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -53,15 +53,6 @@ namespace Org.OpenAPITools.Test.Model
|
||||
//Assert.IsType<Child>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Age'
|
||||
/// </summary>
|
||||
@ -70,5 +61,14 @@ namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
// TODO unit test for the property 'Age'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Type'
|
||||
/// Test the property 'FirstName'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TypeTest()
|
||||
public void FirstNameTest()
|
||||
{
|
||||
// TODO unit test for the property 'Type'
|
||||
// TODO unit test for the property 'FirstName'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -92,12 +92,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'FirstName'
|
||||
/// Test the property 'Type'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FirstNameTest()
|
||||
public void TypeTest()
|
||||
{
|
||||
// TODO unit test for the property 'FirstName'
|
||||
// TODO unit test for the property 'Type'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Adult" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="children">children</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Adult(Option<string> lastName = default, Option<string> firstName = default, Option<List<Child>> children = default) : base(lastName, firstName)
|
||||
public Adult(Option<List<Child>> children = default, Option<string> firstName = default, Option<string> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
ChildrenOption = children;
|
||||
OnCreated();
|
||||
@ -44,13 +44,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Children
|
||||
/// </summary>
|
||||
@ -64,6 +57,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("children")]
|
||||
public List<Child> Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new Option<List<Child>>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -101,10 +101,10 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<List<Child>> children = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -121,18 +121,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions));
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions));
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -140,19 +140,19 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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.");
|
||||
|
||||
return new Adult(lastName, firstName, children);
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult.");
|
||||
|
||||
return new Adult(children, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -179,28 +179,27 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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.ChildrenOption.IsSet && adult.Children == null)
|
||||
throw new ArgumentNullException(nameof(adult.Children), "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)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<string> lastName = default, Option<string> firstName = default, Option<int?> age = default, Option<bool?> boosterSeat = default) : base(lastName, firstName)
|
||||
public Child(Option<int?> age = default, Option<string> firstName = default, Option<string> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -46,13 +46,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Age
|
||||
/// </summary>
|
||||
@ -66,6 +59,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -88,8 +88,8 @@ namespace Org.OpenAPITools.Model
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<int?> age = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
@ -138,18 +138,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
@ -161,22 +161,22 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -203,22 +203,22 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
|
@ -32,38 +32,18 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Person" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Person(Option<string> lastName = default, Option<string> firstName = default)
|
||||
public Person(Option<string> firstName = default, Option<string> lastName = default)
|
||||
{
|
||||
LastNameOption = lastName;
|
||||
FirstNameOption = firstName;
|
||||
LastNameOption = lastName;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of FirstName
|
||||
/// </summary>
|
||||
@ -77,6 +57,26 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("firstName")]
|
||||
public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
@ -91,8 +91,8 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
|
||||
string discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type");
|
||||
|
||||
@ -168,14 +168,14 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -183,16 +183,16 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -229,19 +229,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null)
|
||||
> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> 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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumQueryStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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 enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumHeaderStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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] |
|
||||
| **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] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] |
|
||||
| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form 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] |
|
||||
| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateTime> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersRequestEnumFormString> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -155,11 +155,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -167,11 +167,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -201,11 +201,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -213,11 +213,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1622,33 +1622,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1668,12 +1668,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2060,12 +2060,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateTime> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -155,11 +155,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -167,11 +167,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -201,11 +201,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -213,11 +213,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1622,33 +1622,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1668,12 +1668,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2060,12 +2060,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -53,15 +53,6 @@ namespace Org.OpenAPITools.Test.Model
|
||||
//Assert.IsType<Child>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Age'
|
||||
/// </summary>
|
||||
@ -70,5 +61,14 @@ namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
// TODO unit test for the property 'Age'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Type'
|
||||
/// Test the property 'FirstName'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TypeTest()
|
||||
public void FirstNameTest()
|
||||
{
|
||||
// TODO unit test for the property 'Type'
|
||||
// TODO unit test for the property 'FirstName'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -92,12 +92,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'FirstName'
|
||||
/// Test the property 'Type'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FirstNameTest()
|
||||
public void TypeTest()
|
||||
{
|
||||
// TODO unit test for the property 'FirstName'
|
||||
// TODO unit test for the property 'Type'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Adult" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="children">children</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Adult(Option<string> lastName = default, Option<string> firstName = default, Option<List<Child>> children = default) : base(lastName, firstName)
|
||||
public Adult(Option<List<Child>> children = default, Option<string> firstName = default, Option<string> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
ChildrenOption = children;
|
||||
OnCreated();
|
||||
@ -44,13 +44,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Children
|
||||
/// </summary>
|
||||
@ -64,6 +57,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("children")]
|
||||
public List<Child> Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new Option<List<Child>>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -101,10 +101,10 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<List<Child>> children = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -121,18 +121,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions));
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions));
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -140,19 +140,19 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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.");
|
||||
|
||||
return new Adult(lastName, firstName, children);
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult.");
|
||||
|
||||
return new Adult(children, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -179,28 +179,27 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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.ChildrenOption.IsSet && adult.Children == null)
|
||||
throw new ArgumentNullException(nameof(adult.Children), "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)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<string> lastName = default, Option<string> firstName = default, Option<int?> age = default, Option<bool?> boosterSeat = default) : base(lastName, firstName)
|
||||
public Child(Option<int?> age = default, Option<string> firstName = default, Option<string> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -46,13 +46,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Age
|
||||
/// </summary>
|
||||
@ -66,6 +59,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -88,8 +88,8 @@ namespace Org.OpenAPITools.Model
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<int?> age = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
@ -138,18 +138,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
@ -161,22 +161,22 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -203,22 +203,22 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
|
@ -32,38 +32,18 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Person" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Person(Option<string> lastName = default, Option<string> firstName = default)
|
||||
public Person(Option<string> firstName = default, Option<string> lastName = default)
|
||||
{
|
||||
LastNameOption = lastName;
|
||||
FirstNameOption = firstName;
|
||||
LastNameOption = lastName;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of FirstName
|
||||
/// </summary>
|
||||
@ -77,6 +57,26 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("firstName")]
|
||||
public string FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string LastName { get { return this.LastNameOption; } set { this.LastNameOption = new Option<string>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
@ -91,8 +91,8 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string> type = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
|
||||
string discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type");
|
||||
|
||||
@ -168,14 +168,14 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -183,16 +183,16 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -229,19 +229,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null)
|
||||
> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> 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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumQueryStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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 enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumHeaderStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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] |
|
||||
| **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] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] |
|
||||
| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form 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] |
|
||||
| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateTime> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersRequestEnumFormString> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -155,11 +155,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -167,11 +167,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -201,11 +201,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -213,11 +213,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1622,33 +1622,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1668,12 +1668,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2060,12 +2060,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateTime> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -155,11 +155,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -167,11 +167,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -201,11 +201,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -213,11 +213,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1622,33 +1622,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1668,12 +1668,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2060,12 +2060,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -53,15 +53,6 @@ namespace Org.OpenAPITools.Test.Model
|
||||
//Assert.IsType<Child>(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Age'
|
||||
/// </summary>
|
||||
@ -70,5 +61,14 @@ namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
// TODO unit test for the property 'Age'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'BoosterSeat'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BoosterSeatTest()
|
||||
{
|
||||
// TODO unit test for the property 'BoosterSeat'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Type'
|
||||
/// Test the property 'FirstName'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TypeTest()
|
||||
public void FirstNameTest()
|
||||
{
|
||||
// TODO unit test for the property 'Type'
|
||||
// TODO unit test for the property 'FirstName'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -92,12 +92,12 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'FirstName'
|
||||
/// Test the property 'Type'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FirstNameTest()
|
||||
public void TypeTest()
|
||||
{
|
||||
// TODO unit test for the property 'FirstName'
|
||||
// TODO unit test for the property 'Type'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,11 +34,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Adult" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="children">children</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Adult(Option<string?> lastName = default, Option<string?> firstName = default, Option<List<Child>?> children = default) : base(lastName, firstName)
|
||||
public Adult(Option<List<Child>?> children = default, Option<string?> firstName = default, Option<string?> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
ChildrenOption = children;
|
||||
OnCreated();
|
||||
@ -46,13 +46,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Children
|
||||
/// </summary>
|
||||
@ -66,6 +59,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("children")]
|
||||
public List<Child>? Children { get { return this.ChildrenOption; } set { this.ChildrenOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Adult";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -103,10 +103,10 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string?> type = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<List<Child>?> children = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> type = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -123,18 +123,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>?>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions)!);
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "children":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
children = new Option<List<Child>?>(JsonSerializer.Deserialize<List<Child>>(ref utf8JsonReader, jsonSerializerOptions)!);
|
||||
case "lastName":
|
||||
lastName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -142,19 +142,19 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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.");
|
||||
|
||||
return new Adult(lastName, firstName, children);
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult.");
|
||||
|
||||
return new Adult(children, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -181,28 +181,27 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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.ChildrenOption.IsSet && adult.Children == null)
|
||||
throw new ArgumentNullException(nameof(adult.Children), "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)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<string?> lastName = default, Option<string?> firstName = default, Option<int?> age = default, Option<bool?> boosterSeat = default) : base(lastName, firstName)
|
||||
public Child(Option<int?> age = default, Option<string?> firstName = default, Option<string?> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -48,13 +48,6 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of Age
|
||||
/// </summary>
|
||||
@ -68,6 +61,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -90,8 +90,8 @@ namespace Org.OpenAPITools.Model
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string?> type = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<int?> age = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
@ -140,18 +140,18 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "age":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
case "lastName":
|
||||
lastName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
@ -163,22 +163,22 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -205,22 +205,22 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
|
@ -34,38 +34,18 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Person" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
[JsonConstructor]
|
||||
public Person(Option<string?> lastName = default, Option<string?> firstName = default)
|
||||
public Person(Option<string?> firstName = default, Option<string?> lastName = default)
|
||||
{
|
||||
LastNameOption = lastName;
|
||||
FirstNameOption = firstName;
|
||||
LastNameOption = lastName;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string?> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string? LastName { get { return this.LastNameOption; } set { this.LastNameOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of FirstName
|
||||
/// </summary>
|
||||
@ -79,6 +59,26 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("firstName")]
|
||||
public string? FirstName { get { return this.FirstNameOption; } set { this.FirstNameOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of LastName
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public Option<string?> LastNameOption { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[JsonPropertyName("lastName")]
|
||||
public string? LastName { get { return this.LastNameOption; } set { this.LastNameOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Type { get; } = "Person";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
@ -93,8 +93,8 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
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 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<string?> type = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> type = default;
|
||||
|
||||
string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "$_type");
|
||||
|
||||
@ -170,14 +170,14 @@ namespace Org.OpenAPITools.Model
|
||||
|
||||
switch (localVarJsonPropertyName)
|
||||
{
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
case "firstName":
|
||||
firstName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "lastName":
|
||||
lastName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -185,16 +185,16 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -231,19 +231,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumQueryStringArray = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersRequestEnumFormString enumFormString = null)
|
||||
> void TestEnumParameters (TestEnumParametersRequestEnumFormString enumFormString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumFormStringArray = null, TestEnumParametersEnumHeaderStringParameter enumHeaderString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> enumHeaderStringArray = null, TestEnumParametersEnumQueryDoubleParameter enumQueryDouble = null, TestEnumParametersEnumQueryIntegerParameter enumQueryInteger = null, TestEnumParametersEnumHeaderStringParameter enumQueryString = null, List<TestEnumParametersRequestEnumFormStringArrayInner> 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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumQueryStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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 enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumFormString = (TestEnumParametersRequestEnumFormString) "_abc"; // TestEnumParametersRequestEnumFormString | (optional)
|
||||
var enumFormStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Form parameter enum test (string array) (optional)
|
||||
var enumHeaderString = (TestEnumParametersEnumHeaderStringParameter) "_abc"; // TestEnumParametersEnumHeaderStringParameter | Header parameter enum test (string) (optional)
|
||||
var enumHeaderStringArray = new List<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = (TestEnumParametersEnumQueryDoubleParameter) "1.1"; // TestEnumParametersEnumQueryDoubleParameter | Query parameter enum test (double) (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<TestEnumParametersRequestEnumFormStringArrayInner>(); // List<TestEnumParametersRequestEnumFormStringArrayInner> | 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] |
|
||||
| **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] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [optional] |
|
||||
| **enumFormStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Form 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] |
|
||||
| **enumHeaderStringArray** | [**List<TestEnumParametersRequestEnumFormStringArrayInner>**](TestEnumParametersRequestEnumFormStringArrayInner.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **TestEnumParametersEnumQueryDoubleParameter** | Query parameter enum test (double) | [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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateOnly> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersRequestEnumFormString> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumFormStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumHeaderString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumHeaderStringArray = default;
|
||||
Client.Option<TestEnumParametersEnumQueryDoubleParameter> enumQueryDouble = default;
|
||||
Client.Option<TestEnumParametersEnumQueryIntegerParameter> enumQueryInteger = default;
|
||||
Client.Option<TestEnumParametersEnumHeaderStringParameter> enumQueryString = default;
|
||||
Client.Option<List<TestEnumParametersRequestEnumFormStringArrayInner>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -156,11 +156,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -168,11 +168,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -202,11 +202,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -214,11 +214,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1632,33 +1632,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1678,12 +1678,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2099,12 +2099,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default!;
|
||||
double varDouble = default!;
|
||||
string patternWithoutDelimiter = default!;
|
||||
byte[] varByte = default!;
|
||||
Client.Option<int> integer = default!;
|
||||
Client.Option<int> int32 = default!;
|
||||
Client.Option<long> int64 = default!;
|
||||
Client.Option<float> varFloat = default!;
|
||||
Client.Option<string> varString = default!;
|
||||
double varDouble = default!;
|
||||
Client.Option<System.IO.Stream> binary = default!;
|
||||
Client.Option<string> callback = default!;
|
||||
Client.Option<DateOnly> date = default!;
|
||||
Client.Option<DateTime> dateTime = default!;
|
||||
Client.Option<int> int32 = default!;
|
||||
Client.Option<long> int64 = default!;
|
||||
Client.Option<int> integer = default!;
|
||||
Client.Option<string> password = default!;
|
||||
Client.Option<string> callback = default!;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default!;
|
||||
Client.Option<string> varString = default!;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default!;
|
||||
Client.Option<string> enumHeaderString = default!;
|
||||
Client.Option<List<string>> enumQueryStringArray = default!;
|
||||
Client.Option<string> enumQueryString = default!;
|
||||
Client.Option<int> enumQueryInteger = default!;
|
||||
Client.Option<double> enumQueryDouble = default!;
|
||||
Client.Option<List<string>> enumFormStringArray = default!;
|
||||
Client.Option<string> enumFormString = default!;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default!;
|
||||
Client.Option<string> enumHeaderString = default!;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default!;
|
||||
Client.Option<double> enumQueryDouble = default!;
|
||||
Client.Option<int> enumQueryInteger = default!;
|
||||
Client.Option<string> enumQueryString = default!;
|
||||
Client.Option<List<string>> enumQueryStringArray = default!;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default!;
|
||||
bool requiredBooleanGroup = default!;
|
||||
long requiredInt64Group = default!;
|
||||
Client.Option<int> stringGroup = default!;
|
||||
int requiredStringGroup = default!;
|
||||
Client.Option<bool> booleanGroup = default!;
|
||||
Client.Option<long> int64Group = default!;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default!;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default!;
|
||||
List<string> ioutil = default!;
|
||||
List<string> http = default!;
|
||||
List<string> url = default!;
|
||||
List<string> context = default!;
|
||||
List<string> http = default!;
|
||||
List<string> ioutil = default!;
|
||||
List<string> pipe = default!;
|
||||
string requiredNotNullable = default!;
|
||||
string? requiredNullable = default!;
|
||||
List<string> url = default!;
|
||||
Client.Option<string> notRequiredNotNullable = default!;
|
||||
Client.Option<string?> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -158,11 +158,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -170,11 +170,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>?></returns>
|
||||
Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -204,11 +204,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -216,11 +216,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>?></returns>
|
||||
Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1634,33 +1634,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1680,12 +1680,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse?> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2101,12 +2101,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse?> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateOnly> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -156,11 +156,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -168,11 +168,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -202,11 +202,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -214,11 +214,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1632,33 +1632,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1678,12 +1678,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2099,12 +2099,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default!;
|
||||
double varDouble = default!;
|
||||
string patternWithoutDelimiter = default!;
|
||||
byte[] varByte = default!;
|
||||
Client.Option<int> integer = default!;
|
||||
Client.Option<int> int32 = default!;
|
||||
Client.Option<long> int64 = default!;
|
||||
Client.Option<float> varFloat = default!;
|
||||
Client.Option<string> varString = default!;
|
||||
double varDouble = default!;
|
||||
Client.Option<System.IO.Stream> binary = default!;
|
||||
Client.Option<string> callback = default!;
|
||||
Client.Option<DateOnly> date = default!;
|
||||
Client.Option<DateTime> dateTime = default!;
|
||||
Client.Option<int> int32 = default!;
|
||||
Client.Option<long> int64 = default!;
|
||||
Client.Option<int> integer = default!;
|
||||
Client.Option<string> password = default!;
|
||||
Client.Option<string> callback = default!;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default!;
|
||||
Client.Option<string> varString = default!;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default!;
|
||||
Client.Option<string> enumHeaderString = default!;
|
||||
Client.Option<List<string>> enumQueryStringArray = default!;
|
||||
Client.Option<string> enumQueryString = default!;
|
||||
Client.Option<int> enumQueryInteger = default!;
|
||||
Client.Option<double> enumQueryDouble = default!;
|
||||
Client.Option<List<string>> enumFormStringArray = default!;
|
||||
Client.Option<string> enumFormString = default!;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default!;
|
||||
Client.Option<string> enumHeaderString = default!;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default!;
|
||||
Client.Option<double> enumQueryDouble = default!;
|
||||
Client.Option<int> enumQueryInteger = default!;
|
||||
Client.Option<string> enumQueryString = default!;
|
||||
Client.Option<List<string>> enumQueryStringArray = default!;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default!;
|
||||
bool requiredBooleanGroup = default!;
|
||||
long requiredInt64Group = default!;
|
||||
Client.Option<int> stringGroup = default!;
|
||||
int requiredStringGroup = default!;
|
||||
Client.Option<bool> booleanGroup = default!;
|
||||
Client.Option<long> int64Group = default!;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default!;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default!;
|
||||
List<string> ioutil = default!;
|
||||
List<string> http = default!;
|
||||
List<string> url = default!;
|
||||
List<string> context = default!;
|
||||
List<string> http = default!;
|
||||
List<string> ioutil = default!;
|
||||
List<string> pipe = default!;
|
||||
string requiredNotNullable = default!;
|
||||
string? requiredNullable = default!;
|
||||
List<string> url = default!;
|
||||
Client.Option<string> notRequiredNotNullable = default!;
|
||||
Client.Option<string?> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -158,11 +158,11 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse> LoginUserAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -170,11 +170,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>?></returns>
|
||||
Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string password, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -204,11 +204,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@ -216,11 +216,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>?></returns>
|
||||
Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1634,33 +1634,33 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void AfterLoginUserDefaultImplementation(ILoginUserApiResponse apiResponseLocalVar, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterLoginUser(ref bool suppressDefaultLog, ILoginUserApiResponse apiResponseLocalVar, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -1680,12 +1680,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string password, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse?> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ILoginUserApiResponse"/>></returns>
|
||||
public async Task<ILoginUserApiResponse> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ILoginUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
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);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void AfterUpdateUserDefaultImplementation(IUpdateUserApiResponse apiResponseLocalVar, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void AfterUpdateUser(ref bool suppressDefaultLog, IUpdateUserApiResponse apiResponseLocalVar, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
@ -2101,12 +2101,12 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, User user)
|
||||
/// <param name="username"></param>
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, User user);
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse?> UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse?> 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 @@ namespace Org.OpenAPITools.Api
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="IUpdateUserApiResponse"/>></returns>
|
||||
public async Task<IUpdateUserApiResponse> UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<IUpdateUserApiResponse> 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 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
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 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username, user);
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ No authorization required
|
||||
|
||||
<a id="testendpointparameters"></a>
|
||||
# **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)
|
||||
|
||||
<a id="testenumparameters"></a>
|
||||
# **TestEnumParameters**
|
||||
> void TestEnumParameters (List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int enumQueryInteger = null, double enumQueryDouble = null, List<string> enumFormStringArray = null, string enumFormString = null)
|
||||
> void TestEnumParameters (string enumFormString = null, List<string> enumFormStringArray = null, string enumHeaderString = null, List<string> enumHeaderStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, string enumQueryString = null, List<string> 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<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumQueryStringArray = new List<string>(); // List<string> | 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 enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
|
||||
var enumFormStringArray = new List<string>(); // List<string> | Form parameter enum test (string array) (optional) (default to $)
|
||||
var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||
var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
|
||||
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<string>(); // List<string> | 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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **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] |
|
||||
| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
|
||||
| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
|
||||
| **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
|
||||
|
||||
<a id="testgroupparameters"></a>
|
||||
# **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
|
||||
|
||||
<a id="testqueryparametercollectionformat"></a>
|
||||
# **TestQueryParameterCollectionFormat**
|
||||
> void TestQueryParameterCollectionFormat (List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
|
||||
> void TestQueryParameterCollectionFormat (List<string> context, List<string> http, List<string> ioutil, List<string> pipe, string requiredNotNullable, List<string> 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<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var url = new List<string>(); // List<string> |
|
||||
var context = new List<string>(); // List<string> |
|
||||
var http = new List<string>(); // List<string> |
|
||||
var ioutil = new List<string>(); // List<string> |
|
||||
var pipe = new List<string>(); // List<string> |
|
||||
var requiredNotNullable = "requiredNotNullable_example"; // string |
|
||||
var requiredNullable = "requiredNullable_example"; // string |
|
||||
var url = new List<string>(); // List<string> |
|
||||
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
|
||||
|
||||
|
@ -453,7 +453,7 @@ No authorization required
|
||||
|
||||
<a id="loginuser"></a>
|
||||
# **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<string> response = apiInstance.LoginUserWithHttpInfo(username, password);
|
||||
ApiResponse<string> 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
|
||||
|
||||
<a id="updateuser"></a>
|
||||
# **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
|
||||
|
||||
|
@ -193,20 +193,20 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task TestEndpointParametersAsyncTest()
|
||||
{
|
||||
decimal number = default;
|
||||
double varDouble = default;
|
||||
string patternWithoutDelimiter = default;
|
||||
byte[] varByte = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
double varDouble = default;
|
||||
Client.Option<System.IO.Stream> binary = default;
|
||||
Client.Option<string> callback = default;
|
||||
Client.Option<DateTime> date = default;
|
||||
Client.Option<DateTime> dateTime = default;
|
||||
Client.Option<int> int32 = default;
|
||||
Client.Option<long> int64 = default;
|
||||
Client.Option<int> integer = default;
|
||||
Client.Option<string> password = default;
|
||||
Client.Option<string> callback = default;
|
||||
await _instance.TestEndpointParametersAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback);
|
||||
Client.Option<float> varFloat = default;
|
||||
Client.Option<string> varString = default;
|
||||
await _instance.TestEndpointParametersAsync(number, patternWithoutDelimiter, varByte, varDouble, binary, callback, date, dateTime, int32, int64, integer, password, varFloat, varString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -215,15 +215,15 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestEnumParametersAsyncTest()
|
||||
{
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumFormString = default;
|
||||
await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
Client.Option<List<string>> enumFormStringArray = default;
|
||||
Client.Option<string> enumHeaderString = default;
|
||||
Client.Option<List<string>> enumHeaderStringArray = default;
|
||||
Client.Option<double> enumQueryDouble = default;
|
||||
Client.Option<int> enumQueryInteger = default;
|
||||
Client.Option<string> enumQueryString = default;
|
||||
Client.Option<List<string>> enumQueryStringArray = default;
|
||||
await _instance.TestEnumParametersAsync(enumFormString, enumFormStringArray, enumHeaderString, enumHeaderStringArray, enumQueryDouble, enumQueryInteger, enumQueryString, enumQueryStringArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -232,13 +232,13 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestGroupParametersAsyncTest()
|
||||
{
|
||||
int requiredStringGroup = default;
|
||||
bool requiredBooleanGroup = default;
|
||||
long requiredInt64Group = default;
|
||||
Client.Option<int> stringGroup = default;
|
||||
int requiredStringGroup = default;
|
||||
Client.Option<bool> booleanGroup = default;
|
||||
Client.Option<long> int64Group = default;
|
||||
await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
Client.Option<int> stringGroup = default;
|
||||
await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredInt64Group, requiredStringGroup, booleanGroup, int64Group, stringGroup);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -278,16 +278,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact (Skip = "not implemented")]
|
||||
public async Task TestQueryParameterCollectionFormatAsyncTest()
|
||||
{
|
||||
List<string> pipe = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> http = default;
|
||||
List<string> url = default;
|
||||
List<string> context = default;
|
||||
List<string> http = default;
|
||||
List<string> ioutil = default;
|
||||
List<string> pipe = default;
|
||||
string requiredNotNullable = default;
|
||||
string requiredNullable = default;
|
||||
List<string> url = default;
|
||||
Client.Option<string> notRequiredNotNullable = default;
|
||||
Client.Option<string> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,9 +108,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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<string>(model);
|
||||
}
|
||||
@ -130,9 +130,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user