forked from loafle/openapi-generator-original
Compare commits
4 Commits
master
...
devhl-labs
Author | SHA1 | Date | |
---|---|---|---|
|
a60677705f | ||
|
a5cf2fac8f | ||
|
70f4fcc872 | ||
|
6043942c1b |
@ -243,7 +243,15 @@
|
||||
{{/isMap}}
|
||||
{{/isEnum}}
|
||||
{{#isUuid}}
|
||||
{{^isNullable}}
|
||||
writer.WriteString("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}});
|
||||
{{/isNullable}}
|
||||
{{#isNullable}}
|
||||
if ({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}} == null)
|
||||
writer.WriteNull("{{baseName}}");
|
||||
else
|
||||
writer.WriteString("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}.Value);
|
||||
{{/isNullable}}
|
||||
{{/isUuid}}
|
||||
{{^isUuid}}
|
||||
{{^isEnum}}
|
||||
|
@ -2179,3 +2179,11 @@ components:
|
||||
type: string
|
||||
prop2:
|
||||
type: object
|
||||
NullableGuidClass:
|
||||
type: object
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
|
||||
nullable: true
|
||||
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -168,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -197,6 +197,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this._Uuid = uuid;
|
||||
if (this.Uuid != null)
|
||||
{
|
||||
this._flagUuid = true;
|
||||
}
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid
|
||||
{
|
||||
get{ return _Uuid;}
|
||||
set
|
||||
{
|
||||
_Uuid = value;
|
||||
_flagUuid = true;
|
||||
}
|
||||
}
|
||||
private Guid? _Uuid;
|
||||
private bool _flagUuid;
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Uuid should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerializeUuid()
|
||||
{
|
||||
return _flagUuid;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -59,6 +59,7 @@ docs/models/Model200Response.md
|
||||
docs/models/ModelClient.md
|
||||
docs/models/Name.md
|
||||
docs/models/NullableClass.md
|
||||
docs/models/NullableGuidClass.md
|
||||
docs/models/NullableShape.md
|
||||
docs/models/NumberOnly.md
|
||||
docs/models/ObjectWithDeprecatedFields.md
|
||||
@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,69 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -98,6 +98,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new ModelClientJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NameJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableGuidClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableShapeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NumberOnlyJsonConverter());
|
||||
_jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter());
|
||||
|
@ -0,0 +1,149 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
public partial class NullableGuidClass : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid</param>
|
||||
[JsonConstructor]
|
||||
public NullableGuidClass(Guid? uuid = default)
|
||||
{
|
||||
Uuid = uuid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[JsonPropertyName("uuid")]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableGuidClass
|
||||
/// </summary>
|
||||
public class NullableGuidClassJsonConverter : JsonConverter<NullableGuidClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override NullableGuidClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Guid? uuid = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string? propertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (propertyName)
|
||||
{
|
||||
case "uuid":
|
||||
uuid = utf8JsonReader.GetGuid();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new NullableGuidClass(uuid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableGuidClass"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, NullableGuidClass nullableGuidClass, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
if (nullableGuidClass.Uuid == null)
|
||||
writer.WriteNull("uuid");
|
||||
else
|
||||
writer.WriteString("uuid", nullableGuidClass.Uuid.Value);
|
||||
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
}
|
@ -59,6 +59,7 @@ docs/models/Model200Response.md
|
||||
docs/models/ModelClient.md
|
||||
docs/models/Name.md
|
||||
docs/models/NullableClass.md
|
||||
docs/models/NullableGuidClass.md
|
||||
docs/models/NullableShape.md
|
||||
docs/models/NumberOnly.md
|
||||
docs/models/ObjectWithDeprecatedFields.md
|
||||
@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,69 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -96,6 +96,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new ModelClientJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NameJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableGuidClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableShapeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NumberOnlyJsonConverter());
|
||||
_jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter());
|
||||
|
@ -0,0 +1,147 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
public partial class NullableGuidClass : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid</param>
|
||||
[JsonConstructor]
|
||||
public NullableGuidClass(Guid? uuid = default)
|
||||
{
|
||||
Uuid = uuid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[JsonPropertyName("uuid")]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableGuidClass
|
||||
/// </summary>
|
||||
public class NullableGuidClassJsonConverter : JsonConverter<NullableGuidClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override NullableGuidClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Guid? uuid = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string propertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (propertyName)
|
||||
{
|
||||
case "uuid":
|
||||
uuid = utf8JsonReader.GetGuid();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new NullableGuidClass(uuid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableGuidClass"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, NullableGuidClass nullableGuidClass, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
if (nullableGuidClass.Uuid == null)
|
||||
writer.WriteNull("uuid");
|
||||
else
|
||||
writer.WriteString("uuid", nullableGuidClass.Uuid.Value);
|
||||
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
}
|
@ -59,6 +59,7 @@ docs/models/Model200Response.md
|
||||
docs/models/ModelClient.md
|
||||
docs/models/Name.md
|
||||
docs/models/NullableClass.md
|
||||
docs/models/NullableGuidClass.md
|
||||
docs/models/NullableShape.md
|
||||
docs/models/NumberOnly.md
|
||||
docs/models/ObjectWithDeprecatedFields.md
|
||||
@ -174,6 +175,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,69 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -96,6 +96,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new ModelClientJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NameJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableGuidClassJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NullableShapeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NumberOnlyJsonConverter());
|
||||
_jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter());
|
||||
|
@ -0,0 +1,147 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
public partial class NullableGuidClass : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid</param>
|
||||
[JsonConstructor]
|
||||
public NullableGuidClass(Guid? uuid = default)
|
||||
{
|
||||
Uuid = uuid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[JsonPropertyName("uuid")]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableGuidClass
|
||||
/// </summary>
|
||||
public class NullableGuidClassJsonConverter : JsonConverter<NullableGuidClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="JsonException"></exception>
|
||||
public override NullableGuidClass Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
|
||||
throw new JsonException();
|
||||
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Guid? uuid = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth)
|
||||
break;
|
||||
|
||||
if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1)
|
||||
{
|
||||
string propertyName = utf8JsonReader.GetString();
|
||||
utf8JsonReader.Read();
|
||||
|
||||
switch (propertyName)
|
||||
{
|
||||
case "uuid":
|
||||
uuid = utf8JsonReader.GetGuid();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new NullableGuidClass(uuid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableGuidClass"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, NullableGuidClass nullableGuidClass, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
if (nullableGuidClass.Uuid == null)
|
||||
writer.WriteNull("uuid");
|
||||
else
|
||||
writer.WriteString("uuid", nullableGuidClass.Uuid.Value);
|
||||
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -165,6 +166,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -222,6 +222,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using FileParameter = Org.OpenAPITools.Client.FileParameter;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -168,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -168,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -168,6 +169,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -167,6 +168,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -197,6 +197,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -56,6 +56,7 @@ docs/Model200Response.md
|
||||
docs/ModelClient.md
|
||||
docs/Name.md
|
||||
docs/NullableClass.md
|
||||
docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
@ -167,6 +168,7 @@ src/Org.OpenAPITools/Model/Model200Response.cs
|
||||
src/Org.OpenAPITools/Model/ModelClient.cs
|
||||
src/Org.OpenAPITools/Model/Name.cs
|
||||
src/Org.OpenAPITools/Model/NullableClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
|
@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NullableClass](docs/NullableClass.md)
|
||||
- [Model.NullableGuidClass](docs/NullableGuidClass.md)
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.NullableGuidClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **Guid?** | | [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,70 @@
|
||||
/*
|
||||
* 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 Xunit;
|
||||
|
||||
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.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NullableGuidClass
|
||||
/// </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 NullableGuidClassTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NullableGuidClass
|
||||
//private NullableGuidClass instance;
|
||||
|
||||
public NullableGuidClassTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NullableGuidClass
|
||||
//instance = new NullableGuidClass();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NullableGuidClass
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NullableGuidClassInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" NullableGuidClass
|
||||
//Assert.IsType<NullableGuidClass>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Uuid'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UuidTest()
|
||||
{
|
||||
// TODO unit test for the property 'Uuid'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* 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.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// NullableGuidClass
|
||||
/// </summary>
|
||||
[DataContract(Name = "NullableGuidClass")]
|
||||
public partial class NullableGuidClass : IEquatable<NullableGuidClass>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NullableGuidClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
public NullableGuidClass(Guid? uuid = default(Guid?))
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class NullableGuidClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).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 OpenAPIClientUtils.compareLogic.Compare(this, input as NullableGuidClass).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NullableGuidClass instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NullableGuidClass to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NullableGuidClass input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <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();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user