Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Nov 16, 2023
1 parent a5fc117 commit b510aff
Show file tree
Hide file tree
Showing 976 changed files with 26,182 additions and 46,889 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,190 changes: 387 additions & 803 deletions samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public partial class Bird : IEquatable<Bird>, IValidatableObject
/// <param name="color">color.</param>
public Bird(string size = default(string), string color = default(string))
{
this.Size = size;
this.Color = color;
Size = size;
Color = color;
}

/// <summary>
Expand Down Expand Up @@ -75,7 +75,7 @@ public override string ToString()
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
Expand All @@ -85,7 +85,7 @@ public virtual string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as Bird);
return Equals(input as Bird);
}

/// <summary>
Expand All @@ -101,14 +101,12 @@ public bool Equals(Bird input)
}
return
(
this.Size == input.Size ||
(this.Size != null &&
this.Size.Equals(input.Size))
Size == input.Size ||
Size.Equals(input.Size)
) &&
(
this.Color == input.Color ||
(this.Color != null &&
this.Color.Equals(input.Color))
Color == input.Color ||
Color.Equals(input.Color)
);
}

Expand All @@ -121,14 +119,8 @@ public override int GetHashCode()
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Size != null)
{
hashCode = (hashCode * 59) + this.Size.GetHashCode();
}
if (this.Color != null)
{
hashCode = (hashCode * 59) + this.Color.GetHashCode();
}
hashCode = (hashCode * 59) + Size.GetHashCode();
hashCode = (hashCode * 59) + Color.GetHashCode();
return hashCode;
}
}
Expand All @@ -138,7 +130,7 @@ public override int GetHashCode()
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public partial class Category : IEquatable<Category>, IValidatableObject
/// <param name="name">name.</param>
public Category(long id = default(long), string name = default(string))
{
this.Id = id;
this.Name = name;
Id = id;
Name = name;
}

/// <summary>
Expand Down Expand Up @@ -77,7 +77,7 @@ public override string ToString()
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
Expand All @@ -87,7 +87,7 @@ public virtual string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as Category);
return Equals(input as Category);
}

/// <summary>
Expand All @@ -103,13 +103,12 @@ public bool Equals(Category input)
}
return
(
this.Id == input.Id ||
this.Id.Equals(input.Id)
Id == input.Id ||
Id.Equals(input.Id)
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
Name == input.Name ||
Name.Equals(input.Name)
);
}

Expand All @@ -122,11 +121,8 @@ public override int GetHashCode()
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
hashCode = (hashCode * 59) + this.Id.GetHashCode();
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
hashCode = (hashCode * 59) + Id.GetHashCode();
hashCode = (hashCode * 59) + Name.GetHashCode();
return hashCode;
}
}
Expand All @@ -136,7 +132,7 @@ public override int GetHashCode()
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public partial class DataQuery : Query, IEquatable<DataQuery>, IValidatableObjec
/// <param name="outcomes">outcomes.</param>
public DataQuery(string suffix = default(string), string text = default(string), DateTime date = default(DateTime), long id = default(long), List<OutcomesEnum> outcomes = default(List<OutcomesEnum>)) : base(id, outcomes)
{
this.Suffix = suffix;
this.Text = text;
this.Date = date;
Suffix = suffix;
Text = text;
Date = date;
}

/// <summary>
Expand Down Expand Up @@ -91,7 +91,7 @@ public override string ToString()
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
Expand All @@ -101,7 +101,7 @@ public override string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as DataQuery);
return Equals(input as DataQuery);
}

/// <summary>
Expand All @@ -117,19 +117,16 @@ public bool Equals(DataQuery input)
}
return base.Equals(input) &&
(
this.Suffix == input.Suffix ||
(this.Suffix != null &&
this.Suffix.Equals(input.Suffix))
Suffix == input.Suffix ||
Suffix.Equals(input.Suffix)
) && base.Equals(input) &&
(
this.Text == input.Text ||
(this.Text != null &&
this.Text.Equals(input.Text))
Text == input.Text ||
Text.Equals(input.Text)
) && base.Equals(input) &&
(
this.Date == input.Date ||
(this.Date != null &&
this.Date.Equals(input.Date))
Date == input.Date ||
Date.Equals(input.Date)
);
}

Expand All @@ -142,18 +139,9 @@ public override int GetHashCode()
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
if (this.Suffix != null)
{
hashCode = (hashCode * 59) + this.Suffix.GetHashCode();
}
if (this.Text != null)
{
hashCode = (hashCode * 59) + this.Text.GetHashCode();
}
if (this.Date != null)
{
hashCode = (hashCode * 59) + this.Date.GetHashCode();
}
hashCode = (hashCode * 59) + Suffix.GetHashCode();
hashCode = (hashCode * 59) + Text.GetHashCode();
hashCode = (hashCode * 59) + Date.GetHashCode();
return hashCode;
}
}
Expand All @@ -163,7 +151,7 @@ public override int GetHashCode()
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
return this.BaseValidate(validationContext);
}
Expand All @@ -173,7 +161,7 @@ public override int GetHashCode()
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
protected IEnumerable<ValidationResult> BaseValidate(ValidationContext validationContext)
{
foreach (var x in BaseValidate(validationContext))
{
Expand Down
Loading

0 comments on commit b510aff

Please sign in to comment.