forked from loafle/openapi-generator-original
[csharp-netcore] Better handling of oneOf/anyOf with duplicated data type (#15377)
* better handling of oneOf/anyOf with duplicated data type * update generichost template * remove newline in eof * bug fix (#15413) --------- Co-authored-by: devhl-labs <shawnkanyer@gmail.com>
This commit is contained in:
@@ -63,6 +63,7 @@ docs/NullableGuidClass.md
|
||||
docs/NullableShape.md
|
||||
docs/NumberOnly.md
|
||||
docs/ObjectWithDeprecatedFields.md
|
||||
docs/OneOfString.md
|
||||
docs/Order.md
|
||||
docs/OuterComposite.md
|
||||
docs/OuterEnum.md
|
||||
@@ -180,6 +181,7 @@ src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
src/Org.OpenAPITools/Model/OneOfString.cs
|
||||
src/Org.OpenAPITools/Model/Order.cs
|
||||
src/Org.OpenAPITools/Model/OuterComposite.cs
|
||||
src/Org.OpenAPITools/Model/OuterEnum.cs
|
||||
|
||||
@@ -205,6 +205,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.NullableShape](docs/NullableShape.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
|
||||
- [Model.OneOfString](docs/OneOfString.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
- [Model.OuterComposite](docs/OuterComposite.md)
|
||||
- [Model.OuterEnum](docs/OuterEnum.md)
|
||||
|
||||
@@ -2200,6 +2200,12 @@ components:
|
||||
default: C:\Users\username
|
||||
type: string
|
||||
type: object
|
||||
OneOfString:
|
||||
oneOf:
|
||||
- pattern: ^a
|
||||
type: string
|
||||
- pattern: ^b
|
||||
type: string
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Org.OpenAPITools.Model.OneOfString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[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,61 @@
|
||||
/*
|
||||
* 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.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing OneOfString
|
||||
/// </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 OneOfStringTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for OneOfString
|
||||
//private OneOfString instance;
|
||||
|
||||
public OneOfStringTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of OneOfString
|
||||
//instance = new OneOfString();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of OneOfString
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void OneOfStringInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" OneOfString
|
||||
//Assert.IsType<OneOfString>(instance);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
* 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;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// OneOfString
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(OneOfStringJsonConverter))]
|
||||
[DataContract(Name = "OneOfString")]
|
||||
public partial class OneOfString : AbstractOpenAPISchema, IEquatable<OneOfString>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OneOfString" /> class
|
||||
/// with the <see cref="string" /> class
|
||||
/// </summary>
|
||||
/// <param name="actualInstance">An instance of string.</param>
|
||||
public OneOfString(string actualInstance)
|
||||
{
|
||||
this.IsNullable = false;
|
||||
this.SchemaType= "oneOf";
|
||||
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
|
||||
}
|
||||
|
||||
|
||||
private Object _actualInstance;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ActualInstance
|
||||
/// </summary>
|
||||
public override Object ActualInstance
|
||||
{
|
||||
get
|
||||
{
|
||||
return _actualInstance;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
{
|
||||
this._actualInstance = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Invalid instance found. Must be the following types: string");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the actual instance of `string`. If the actual instance is not `string`,
|
||||
/// the InvalidClassException will be thrown
|
||||
/// </summary>
|
||||
/// <returns>An instance of string</returns>
|
||||
public string GetString()
|
||||
{
|
||||
return (string)this.ActualInstance;
|
||||
}
|
||||
|
||||
/// <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 OneOfString {\n");
|
||||
sb.Append(" ActualInstance: ").Append(this.ActualInstance).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 override string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this.ActualInstance, OneOfString.SerializerSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the JSON string into an instance of OneOfString
|
||||
/// </summary>
|
||||
/// <param name="jsonString">JSON string</param>
|
||||
/// <returns>An instance of OneOfString</returns>
|
||||
public static OneOfString FromJson(string jsonString)
|
||||
{
|
||||
OneOfString newOneOfString = null;
|
||||
|
||||
if (string.IsNullOrEmpty(jsonString))
|
||||
{
|
||||
return newOneOfString;
|
||||
}
|
||||
int match = 0;
|
||||
List<string> matchedTypes = new List<string>();
|
||||
|
||||
try
|
||||
{
|
||||
// if it does not contains "AdditionalProperties", use SerializerSettings to deserialize
|
||||
if (typeof(string).GetProperty("AdditionalProperties") == null)
|
||||
{
|
||||
newOneOfString = new OneOfString(JsonConvert.DeserializeObject<string>(jsonString, OneOfString.SerializerSettings));
|
||||
}
|
||||
else
|
||||
{
|
||||
newOneOfString = new OneOfString(JsonConvert.DeserializeObject<string>(jsonString, OneOfString.AdditionalPropertiesSerializerSettings));
|
||||
}
|
||||
matchedTypes.Add("string");
|
||||
match++;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// deserialization failed, try the next one
|
||||
System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into string: {1}", jsonString, exception.ToString()));
|
||||
}
|
||||
|
||||
if (match == 0)
|
||||
{
|
||||
throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined.");
|
||||
}
|
||||
else if (match > 1)
|
||||
{
|
||||
throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes);
|
||||
}
|
||||
|
||||
// deserialization is considered successful at this point if no exception has been thrown.
|
||||
return newOneOfString;
|
||||
}
|
||||
|
||||
/// <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 OneOfString).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if OneOfString instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of OneOfString to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(OneOfString 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.ActualInstance != null)
|
||||
hashCode = hashCode * 59 + this.ActualInstance.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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Custom JSON converter for OneOfString
|
||||
/// </summary>
|
||||
public class OneOfStringJsonConverter : JsonConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// To write the JSON string
|
||||
/// </summary>
|
||||
/// <param name="writer">JSON writer</param>
|
||||
/// <param name="value">Object to be converted into a JSON string</param>
|
||||
/// <param name="serializer">JSON Serializer</param>
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteRawValue((string)(typeof(OneOfString).GetMethod("ToJson").Invoke(value, null)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To convert a JSON string into an object
|
||||
/// </summary>
|
||||
/// <param name="reader">JSON reader</param>
|
||||
/// <param name="objectType">Object type</param>
|
||||
/// <param name="existingValue">Existing value</param>
|
||||
/// <param name="serializer">JSON Serializer</param>
|
||||
/// <returns>The object converted from the JSON string</returns>
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
if(reader.TokenType != JsonToken.Null)
|
||||
{
|
||||
return OneOfString.FromJson(JObject.Load(reader).ToString(Formatting.None));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the object can be converted
|
||||
/// </summary>
|
||||
/// <param name="objectType">Object type</param>
|
||||
/// <returns>True if the object can be converted</returns>
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,6 +66,7 @@ docs/models/NullableGuidClass.md
|
||||
docs/models/NullableShape.md
|
||||
docs/models/NumberOnly.md
|
||||
docs/models/ObjectWithDeprecatedFields.md
|
||||
docs/models/OneOfString.md
|
||||
docs/models/Order.md
|
||||
docs/models/OuterComposite.md
|
||||
docs/models/OuterEnum.md
|
||||
@@ -186,6 +187,7 @@ src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
src/Org.OpenAPITools/Model/OneOfString.cs
|
||||
src/Org.OpenAPITools/Model/Order.cs
|
||||
src/Org.OpenAPITools/Model/OuterComposite.cs
|
||||
src/Org.OpenAPITools/Model/OuterEnum.cs
|
||||
|
||||
@@ -2200,6 +2200,12 @@ components:
|
||||
default: C:\Users\username
|
||||
type: string
|
||||
type: object
|
||||
OneOfString:
|
||||
oneOf:
|
||||
- pattern: ^a
|
||||
type: string
|
||||
- pattern: ^b
|
||||
type: string
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Org.OpenAPITools.Model.OneOfString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[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,60 @@
|
||||
/*
|
||||
* 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.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing OneOfString
|
||||
/// </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 OneOfStringTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for OneOfString
|
||||
//private OneOfString instance;
|
||||
|
||||
public OneOfStringTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of OneOfString
|
||||
//instance = new OneOfString();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of OneOfString
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void OneOfStringInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" OneOfString
|
||||
//Assert.IsType<OneOfString>(instance);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -104,6 +104,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new NullableShapeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NumberOnlyJsonConverter());
|
||||
_jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OneOfStringJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OrderJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OuterCompositeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OuterEnumConverter());
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Activity
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ActivityOutputElementRepresentation
|
||||
/// </summary>
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type AdditionalPropertiesClass
|
||||
/// </summary>
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Animal
|
||||
/// </summary>
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ApiResponse
|
||||
/// </summary>
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Apple
|
||||
/// </summary>
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type AppleReq
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayOfArrayOfNumberOnly
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayOfNumberOnly
|
||||
/// </summary>
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayTest
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Banana
|
||||
/// </summary>
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type BananaReq
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type BasquePig
|
||||
/// </summary>
|
||||
|
||||
@@ -123,6 +123,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Capitalization
|
||||
/// </summary>
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Cat
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type CatAllOf
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Category
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ChildCat
|
||||
/// </summary>
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ChildCatAllOf
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ClassModel
|
||||
/// </summary>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ComplexQuadrilateral
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DanishPig
|
||||
/// </summary>
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DateOnlyClass
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DeprecatedObject
|
||||
/// </summary>
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Dog
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DogAllOf
|
||||
/// </summary>
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Drawing
|
||||
/// </summary>
|
||||
|
||||
@@ -186,6 +186,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EnumArrays
|
||||
/// </summary>
|
||||
|
||||
@@ -409,6 +409,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EnumTest
|
||||
/// </summary>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EquilateralTriangle
|
||||
/// </summary>
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type File
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FileSchemaTestClass
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Foo
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FooGetDefaultResponse
|
||||
/// </summary>
|
||||
|
||||
@@ -357,6 +357,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FormatTest
|
||||
/// </summary>
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Fruit
|
||||
/// </summary>
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FruitReq
|
||||
/// </summary>
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type GmFruit
|
||||
/// </summary>
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type GrandparentAnimal
|
||||
/// </summary>
|
||||
|
||||
@@ -123,6 +123,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type HasOnlyReadOnly
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type HealthCheckResult
|
||||
/// </summary>
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type IsoscelesTriangle
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type List
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type LiteralStringClass
|
||||
/// </summary>
|
||||
|
||||
@@ -115,6 +115,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Mammal
|
||||
/// </summary>
|
||||
|
||||
@@ -154,6 +154,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type MapTest
|
||||
/// </summary>
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type MixedPropertiesAndAdditionalPropertiesClass
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Model200Response
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ModelClient
|
||||
/// </summary>
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Name
|
||||
/// </summary>
|
||||
|
||||
@@ -170,6 +170,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableClass
|
||||
/// </summary>
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableGuidClass
|
||||
/// </summary>
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableShape
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NumberOnly
|
||||
/// </summary>
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ObjectWithDeprecatedFields
|
||||
/// </summary>
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
#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>
|
||||
/// OneOfString
|
||||
/// </summary>
|
||||
public partial class OneOfString : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OneOfString" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string"></param>
|
||||
[JsonConstructor]
|
||||
internal OneOfString(string _string)
|
||||
{
|
||||
String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
public string? String { 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 OneOfString {\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>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type OneOfString
|
||||
/// </summary>
|
||||
public class OneOfStringJsonConverter : JsonConverter<OneOfString>
|
||||
{
|
||||
/// <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 OneOfString 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;
|
||||
|
||||
Utf8JsonReader _stringReader = utf8JsonReader;
|
||||
bool _stringDeserialized = Client.ClientUtils.TryDeserialize<string>(ref _stringReader, jsonSerializerOptions, out string? _string);
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_stringDeserialized)
|
||||
return new OneOfString(_string);
|
||||
|
||||
throw new JsonException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="oneOfString"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public override void Write(Utf8JsonWriter writer, OneOfString oneOfString, JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
|
||||
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,6 +186,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Order
|
||||
/// </summary>
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type OuterComposite
|
||||
/// </summary>
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ParentPet
|
||||
/// </summary>
|
||||
|
||||
@@ -186,6 +186,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Pet
|
||||
/// </summary>
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Pig
|
||||
/// </summary>
|
||||
|
||||
@@ -120,6 +120,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type PolymorphicProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Quadrilateral
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type QuadrilateralInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ReadOnlyFirst
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Return
|
||||
/// </summary>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ScaleneTriangle
|
||||
/// </summary>
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Shape
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ShapeOrNull
|
||||
/// </summary>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type SimpleQuadrilateral
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type SpecialModelName
|
||||
/// </summary>
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Tag
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TestCollectionEndingWithWordList
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TestCollectionEndingWithWordListObject
|
||||
/// </summary>
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Triangle
|
||||
/// </summary>
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TriangleInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type User
|
||||
/// </summary>
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Whale
|
||||
/// </summary>
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Zebra
|
||||
/// </summary>
|
||||
|
||||
@@ -66,6 +66,7 @@ docs/models/NullableGuidClass.md
|
||||
docs/models/NullableShape.md
|
||||
docs/models/NumberOnly.md
|
||||
docs/models/ObjectWithDeprecatedFields.md
|
||||
docs/models/OneOfString.md
|
||||
docs/models/Order.md
|
||||
docs/models/OuterComposite.md
|
||||
docs/models/OuterEnum.md
|
||||
@@ -186,6 +187,7 @@ src/Org.OpenAPITools/Model/NullableGuidClass.cs
|
||||
src/Org.OpenAPITools/Model/NullableShape.cs
|
||||
src/Org.OpenAPITools/Model/NumberOnly.cs
|
||||
src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs
|
||||
src/Org.OpenAPITools/Model/OneOfString.cs
|
||||
src/Org.OpenAPITools/Model/Order.cs
|
||||
src/Org.OpenAPITools/Model/OuterComposite.cs
|
||||
src/Org.OpenAPITools/Model/OuterEnum.cs
|
||||
|
||||
@@ -2200,6 +2200,12 @@ components:
|
||||
default: C:\Users\username
|
||||
type: string
|
||||
type: object
|
||||
OneOfString:
|
||||
oneOf:
|
||||
- pattern: ^a
|
||||
type: string
|
||||
- pattern: ^b
|
||||
type: string
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Org.OpenAPITools.Model.OneOfString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[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,60 @@
|
||||
/*
|
||||
* 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.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing OneOfString
|
||||
/// </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 OneOfStringTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for OneOfString
|
||||
//private OneOfString instance;
|
||||
|
||||
public OneOfStringTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of OneOfString
|
||||
//instance = new OneOfString();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of OneOfString
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void OneOfStringInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" OneOfString
|
||||
//Assert.IsType<OneOfString>(instance);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,6 +102,7 @@ namespace Org.OpenAPITools.Client
|
||||
_jsonOptions.Converters.Add(new NullableShapeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new NumberOnlyJsonConverter());
|
||||
_jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OneOfStringJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OrderJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OuterCompositeJsonConverter());
|
||||
_jsonOptions.Converters.Add(new OuterEnumConverter());
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Activity
|
||||
/// </summary>
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ActivityOutputElementRepresentation
|
||||
/// </summary>
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type AdditionalPropertiesClass
|
||||
/// </summary>
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Animal
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user