mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 13:22:45 +00:00
Merge remote-tracking branch 'origin/5.3.x' into 6.0.x
This commit is contained in:
@@ -17,6 +17,7 @@ docs/CatAllOf.md
|
||||
docs/Category.md
|
||||
docs/ClassModel.md
|
||||
docs/DefaultApi.md
|
||||
docs/DeprecatedObject.md
|
||||
docs/Dog.md
|
||||
docs/DogAllOf.md
|
||||
docs/EnumArrays.md
|
||||
@@ -39,6 +40,7 @@ docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
docs/Order.md
|
||||
docs/OuterComposite.md
|
||||
docs/OuterEnum.md
|
||||
@@ -85,6 +87,7 @@ src/Org.OpenAPITools/Model/Cat.cs
|
||||
src/Org.OpenAPITools/Model/CatAllOf.cs
|
||||
src/Org.OpenAPITools/Model/Category.cs
|
||||
src/Org.OpenAPITools/Model/ClassModel.cs
|
||||
src/Org.OpenAPITools/Model/DeprecatedObject.cs
|
||||
src/Org.OpenAPITools/Model/Dog.cs
|
||||
src/Org.OpenAPITools/Model/DogAllOf.cs
|
||||
src/Org.OpenAPITools/Model/EnumArrays.cs
|
||||
@@ -105,6 +108,7 @@ src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
src/Org.OpenAPITools/Model/Order.cs
|
||||
src/Org.OpenAPITools/Model/OuterComposite.cs
|
||||
src/Org.OpenAPITools/Model/OuterEnum.cs
|
||||
|
||||
@@ -161,6 +161,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||
- [Model.Category](docs/Category.md)
|
||||
- [Model.ClassModel](docs/ClassModel.md)
|
||||
- [Model.DeprecatedObject](docs/DeprecatedObject.md)
|
||||
- [Model.Dog](docs/Dog.md)
|
||||
- [Model.DogAllOf](docs/DogAllOf.md)
|
||||
- [Model.EnumArrays](docs/EnumArrays.md)
|
||||
@@ -181,6 +182,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||
- [Model.OuterEnum](docs/OuterEnum.md)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
# Org.OpenAPITools.Model.DeprecatedObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **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)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
# Org.OpenAPITools.Model.ObjectWithDeprecatedFields
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **string** | | [optional]
|
||||
**Id** | **decimal** | | [optional]
|
||||
**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
|
||||
**Bars** | **List<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)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing DeprecatedObject
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class DeprecatedObjectTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for DeprecatedObject
|
||||
//private DeprecatedObject instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of DeprecatedObject
|
||||
//instance = new DeprecatedObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of DeprecatedObject
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DeprecatedObjectInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOf" DeprecatedObject
|
||||
//Assert.IsInstanceOf(typeof(DeprecatedObject), instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Name'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NameTest()
|
||||
{
|
||||
// TODO unit test for the property 'Name'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ObjectWithDeprecatedFields
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class ObjectWithDeprecatedFieldsTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for ObjectWithDeprecatedFields
|
||||
//private ObjectWithDeprecatedFields instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of ObjectWithDeprecatedFields
|
||||
//instance = new ObjectWithDeprecatedFields();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ObjectWithDeprecatedFields
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ObjectWithDeprecatedFieldsInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOf" ObjectWithDeprecatedFields
|
||||
//Assert.IsInstanceOf(typeof(ObjectWithDeprecatedFields), instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Id'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void IdTest()
|
||||
{
|
||||
// TODO unit test for the property 'Id'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'DeprecatedRef'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DeprecatedRefTest()
|
||||
{
|
||||
// TODO unit test for the property 'DeprecatedRef'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Bars'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BarsTest()
|
||||
{
|
||||
// TODO unit test for the property 'Bars'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// DeprecatedObject
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class DeprecatedObject : IEquatable<DeprecatedObject>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DeprecatedObject" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name.</param>
|
||||
public DeprecatedObject(string name = default(string))
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class DeprecatedObject {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as DeprecatedObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if DeprecatedObject instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of DeprecatedObject to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(DeprecatedObject input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Name == input.Name ||
|
||||
(this.Name != null &&
|
||||
this.Name.Equals(input.Name))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// ObjectWithDeprecatedFields
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ObjectWithDeprecatedFields : IEquatable<ObjectWithDeprecatedFields>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ObjectWithDeprecatedFields" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="deprecatedRef">deprecatedRef.</param>
|
||||
/// <param name="bars">bars.</param>
|
||||
public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List<string> bars = default(List<string>))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.Id = id;
|
||||
this.DeprecatedRef = deprecatedRef;
|
||||
this.Bars = bars;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name="uuid", EmitDefaultValue=false)]
|
||||
public string Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name="id", EmitDefaultValue=false)]
|
||||
public decimal Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DeprecatedRef
|
||||
/// </summary>
|
||||
[DataMember(Name="deprecatedRef", EmitDefaultValue=false)]
|
||||
public DeprecatedObject DeprecatedRef { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bars
|
||||
/// </summary>
|
||||
[DataMember(Name="bars", EmitDefaultValue=false)]
|
||||
public List<string> Bars { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ObjectWithDeprecatedFields {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n");
|
||||
sb.Append(" Bars: ").Append(Bars).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ObjectWithDeprecatedFields);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ObjectWithDeprecatedFields instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ObjectWithDeprecatedFields to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ObjectWithDeprecatedFields input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Uuid == input.Uuid ||
|
||||
(this.Uuid != null &&
|
||||
this.Uuid.Equals(input.Uuid))
|
||||
) &&
|
||||
(
|
||||
this.Id == input.Id ||
|
||||
(this.Id != null &&
|
||||
this.Id.Equals(input.Id))
|
||||
) &&
|
||||
(
|
||||
this.DeprecatedRef == input.DeprecatedRef ||
|
||||
(this.DeprecatedRef != null &&
|
||||
this.DeprecatedRef.Equals(input.DeprecatedRef))
|
||||
) &&
|
||||
(
|
||||
this.Bars == input.Bars ||
|
||||
this.Bars != null &&
|
||||
input.Bars != null &&
|
||||
this.Bars.SequenceEqual(input.Bars)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Uuid != null)
|
||||
hashCode = hashCode * 59 + this.Uuid.GetHashCode();
|
||||
if (this.Id != null)
|
||||
hashCode = hashCode * 59 + this.Id.GetHashCode();
|
||||
if (this.DeprecatedRef != null)
|
||||
hashCode = hashCode * 59 + this.DeprecatedRef.GetHashCode();
|
||||
if (this.Bars != null)
|
||||
hashCode = hashCode * 59 + this.Bars.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user