[C#] fix validate (#16097)

* fix validation with discriminator using parent instead

* add new files

* add new workflow

* fix
This commit is contained in:
William Cheng
2023-07-16 10:24:47 +08:00
committed by GitHub
parent 7258b3c171
commit 598c27ddb0
109 changed files with 13833 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 Bird
/// </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 BirdTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Bird
//private Bird instance;
public BirdTests()
{
// TODO uncomment below to create an instance of Bird
//instance = new Bird();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of Bird
/// </summary>
[Fact]
public void BirdInstanceTest()
{
// TODO uncomment below to test "IsType" Bird
//Assert.IsType<Bird>(instance);
}
/// <summary>
/// Test the property 'Size'
/// </summary>
[Fact]
public void SizeTest()
{
// TODO unit test for the property 'Size'
}
/// <summary>
/// Test the property 'Color'
/// </summary>
[Fact]
public void ColorTest()
{
// TODO unit test for the property 'Color'
}
}
}

View File

@@ -0,0 +1,76 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 Category
/// </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 CategoryTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Category
//private Category instance;
public CategoryTests()
{
// TODO uncomment below to create an instance of Category
//instance = new Category();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of Category
/// </summary>
[Fact]
public void CategoryInstanceTest()
{
// TODO uncomment below to test "IsType" Category
//Assert.IsType<Category>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,85 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 DataQuery
/// </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 DataQueryTests : IDisposable
{
// TODO uncomment below to declare an instance variable for DataQuery
//private DataQuery instance;
public DataQueryTests()
{
// TODO uncomment below to create an instance of DataQuery
//instance = new DataQuery();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of DataQuery
/// </summary>
[Fact]
public void DataQueryInstanceTest()
{
// TODO uncomment below to test "IsType" DataQuery
//Assert.IsType<DataQuery>(instance);
}
/// <summary>
/// Test the property 'Suffix'
/// </summary>
[Fact]
public void SuffixTest()
{
// TODO unit test for the property 'Suffix'
}
/// <summary>
/// Test the property 'Text'
/// </summary>
[Fact]
public void TextTest()
{
// TODO unit test for the property 'Text'
}
/// <summary>
/// Test the property 'Date'
/// </summary>
[Fact]
public void DateTest()
{
// TODO unit test for the property 'Date'
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 DefaultValue
/// </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 DefaultValueTests : IDisposable
{
// TODO uncomment below to declare an instance variable for DefaultValue
//private DefaultValue instance;
public DefaultValueTests()
{
// TODO uncomment below to create an instance of DefaultValue
//instance = new DefaultValue();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of DefaultValue
/// </summary>
[Fact]
public void DefaultValueInstanceTest()
{
// TODO uncomment below to test "IsType" DefaultValue
//Assert.IsType<DefaultValue>(instance);
}
/// <summary>
/// Test the property 'ArrayStringEnumRefDefault'
/// </summary>
[Fact]
public void ArrayStringEnumRefDefaultTest()
{
// TODO unit test for the property 'ArrayStringEnumRefDefault'
}
/// <summary>
/// Test the property 'ArrayStringEnumDefault'
/// </summary>
[Fact]
public void ArrayStringEnumDefaultTest()
{
// TODO unit test for the property 'ArrayStringEnumDefault'
}
/// <summary>
/// Test the property 'ArrayStringDefault'
/// </summary>
[Fact]
public void ArrayStringDefaultTest()
{
// TODO unit test for the property 'ArrayStringDefault'
}
/// <summary>
/// Test the property 'ArrayIntegerDefault'
/// </summary>
[Fact]
public void ArrayIntegerDefaultTest()
{
// TODO unit test for the property 'ArrayIntegerDefault'
}
/// <summary>
/// Test the property 'ArrayString'
/// </summary>
[Fact]
public void ArrayStringTest()
{
// TODO unit test for the property 'ArrayString'
}
/// <summary>
/// Test the property 'ArrayStringNullable'
/// </summary>
[Fact]
public void ArrayStringNullableTest()
{
// TODO unit test for the property 'ArrayStringNullable'
}
/// <summary>
/// Test the property 'ArrayStringExtensionNullable'
/// </summary>
[Fact]
public void ArrayStringExtensionNullableTest()
{
// TODO unit test for the property 'ArrayStringExtensionNullable'
}
/// <summary>
/// Test the property 'StringNullable'
/// </summary>
[Fact]
public void StringNullableTest()
{
// TODO unit test for the property 'StringNullable'
}
}
}

View File

@@ -0,0 +1,85 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 NumberPropertiesOnly
/// </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 NumberPropertiesOnlyTests : IDisposable
{
// TODO uncomment below to declare an instance variable for NumberPropertiesOnly
//private NumberPropertiesOnly instance;
public NumberPropertiesOnlyTests()
{
// TODO uncomment below to create an instance of NumberPropertiesOnly
//instance = new NumberPropertiesOnly();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of NumberPropertiesOnly
/// </summary>
[Fact]
public void NumberPropertiesOnlyInstanceTest()
{
// TODO uncomment below to test "IsType" NumberPropertiesOnly
//Assert.IsType<NumberPropertiesOnly>(instance);
}
/// <summary>
/// Test the property 'Number'
/// </summary>
[Fact]
public void NumberTest()
{
// TODO unit test for the property 'Number'
}
/// <summary>
/// Test the property 'VarFloat'
/// </summary>
[Fact]
public void VarFloatTest()
{
// TODO unit test for the property 'VarFloat'
}
/// <summary>
/// Test the property 'VarDouble'
/// </summary>
[Fact]
public void VarDoubleTest()
{
// TODO unit test for the property 'VarDouble'
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 Pet
/// </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 PetTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Pet
//private Pet instance;
public PetTests()
{
// TODO uncomment below to create an instance of Pet
//instance = new Pet();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of Pet
/// </summary>
[Fact]
public void PetInstanceTest()
{
// TODO uncomment below to test "IsType" Pet
//Assert.IsType<Pet>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
/// <summary>
/// Test the property 'Category'
/// </summary>
[Fact]
public void CategoryTest()
{
// TODO unit test for the property 'Category'
}
/// <summary>
/// Test the property 'PhotoUrls'
/// </summary>
[Fact]
public void PhotoUrlsTest()
{
// TODO unit test for the property 'PhotoUrls'
}
/// <summary>
/// Test the property 'Tags'
/// </summary>
[Fact]
public void TagsTest()
{
// TODO unit test for the property 'Tags'
}
/// <summary>
/// Test the property 'Status'
/// </summary>
[Fact]
public void StatusTest()
{
// TODO unit test for the property 'Status'
}
}
}

View File

@@ -0,0 +1,76 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 Query
/// </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 QueryTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Query
//private Query instance;
public QueryTests()
{
// TODO uncomment below to create an instance of Query
//instance = new Query();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of Query
/// </summary>
[Fact]
public void QueryInstanceTest()
{
// TODO uncomment below to test "IsType" Query
//Assert.IsType<Query>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Outcomes'
/// </summary>
[Fact]
public void OutcomesTest()
{
// TODO unit test for the property 'Outcomes'
}
}
}

View File

@@ -0,0 +1,58 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 StringEnumRef
/// </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 StringEnumRefTests : IDisposable
{
// TODO uncomment below to declare an instance variable for StringEnumRef
//private StringEnumRef instance;
public StringEnumRefTests()
{
// TODO uncomment below to create an instance of StringEnumRef
//instance = new StringEnumRef();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of StringEnumRef
/// </summary>
[Fact]
public void StringEnumRefInstanceTest()
{
// TODO uncomment below to test "IsType" StringEnumRef
//Assert.IsType<StringEnumRef>(instance);
}
}
}

View File

@@ -0,0 +1,76 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 Tag
/// </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 TagTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Tag
//private Tag instance;
public TagTests()
{
// TODO uncomment below to create an instance of Tag
//instance = new Tag();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of Tag
/// </summary>
[Fact]
public void TagInstanceTest()
{
// TODO uncomment below to test "IsType" Tag
//Assert.IsType<Tag>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,94 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
/// </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 TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests : IDisposable
{
// TODO uncomment below to declare an instance variable for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
//private TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter instance;
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests()
{
// TODO uncomment below to create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
//instance = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
/// </summary>
[Fact]
public void TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterInstanceTest()
{
// TODO uncomment below to test "IsType" TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
//Assert.IsType<TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter>(instance);
}
/// <summary>
/// Test the property 'Size'
/// </summary>
[Fact]
public void SizeTest()
{
// TODO unit test for the property 'Size'
}
/// <summary>
/// Test the property 'Color'
/// </summary>
[Fact]
public void ColorTest()
{
// TODO unit test for the property 'Color'
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Fact]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,67 @@
/*
* Echo Server API
*
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
* 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 TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
/// </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 TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests : IDisposable
{
// TODO uncomment below to declare an instance variable for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
//private TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter instance;
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests()
{
// TODO uncomment below to create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
//instance = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
/// </summary>
[Fact]
public void TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterInstanceTest()
{
// TODO uncomment below to test "IsType" TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
//Assert.IsType<TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter>(instance);
}
/// <summary>
/// Test the property 'Values'
/// </summary>
[Fact]
public void ValuesTest()
{
// TODO unit test for the property 'Values'
}
}
}