mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
[csharp] enum suffix changes enumValueNameSuffix to enumValueSuffix (#4927)
* [csharp] Change enum value suffix name 'enumValueNameSuffix' and 'enumNameSuffix' were introduced in a recent commit. This changes 'enumValueNameSuffix' to 'enumValueSuffix' to better differentiate between the two options. This also adds a caveat to the default description which explains that this flexibility may cause issues when used by client generator. * [csharp][aspnetcore] Regenerate samples
This commit is contained in:
parent
9b893ef3c1
commit
ec1e9a4c9b
@ -28,7 +28,7 @@ sidebar_label: aspnetcore
|
|||||||
|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01|
|
|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01|
|
||||||
|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true|
|
|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true|
|
||||||
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|
||||||
|enumValueNameSuffix|Suffix that will be appended to all enum value names.| |Enum|
|
|enumValueSuffix|Suffix that will be appended to all enum values.| |Enum|
|
||||||
|classModifier|Class Modifier can be empty, abstract| ||
|
|classModifier|Class Modifier can be empty, abstract| ||
|
||||||
|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual|
|
|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual|
|
||||||
|buildTarget|Target to build an application or library| |program|
|
|buildTarget|Target to build an application or library| |program|
|
||||||
|
@ -227,8 +227,8 @@ public class CodegenConstants {
|
|||||||
public static final String ENUM_NAME_SUFFIX = "enumNameSuffix";
|
public static final String ENUM_NAME_SUFFIX = "enumNameSuffix";
|
||||||
public static final String ENUM_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum names.";
|
public static final String ENUM_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum names.";
|
||||||
|
|
||||||
public static final String ENUM_VALUE_NAME_SUFFIX = "enumValueNameSuffix";
|
public static final String ENUM_VALUE_SUFFIX = "enumValueSuffix";
|
||||||
public static final String ENUM_VALUE_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum value names.";
|
public static final String ENUM_VALUE_SUFFIX_DESC = "Suffix that will be appended to all enum values. Note: For clients this may impact serialization and deserialization of enum values.";
|
||||||
|
|
||||||
public static final String GIT_HOST = "gitHost";
|
public static final String GIT_HOST = "gitHost";
|
||||||
public static final String GIT_HOST_DESC = "Git host, e.g. gitlab.com.";
|
public static final String GIT_HOST_DESC = "Git host, e.g. gitlab.com.";
|
||||||
|
@ -63,7 +63,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
|
|
||||||
protected String interfacePrefix = "I";
|
protected String interfacePrefix = "I";
|
||||||
protected String enumNameSuffix = "Enum";
|
protected String enumNameSuffix = "Enum";
|
||||||
protected String enumValueNameSuffix = "Enum";
|
protected String enumValueSuffix = "Enum";
|
||||||
|
|
||||||
protected String sourceFolder = "src";
|
protected String sourceFolder = "src";
|
||||||
|
|
||||||
@ -367,8 +367,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
setEnumNameSuffix(additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString());
|
setEnumNameSuffix(additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_NAME_SUFFIX)) {
|
if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_SUFFIX)) {
|
||||||
setEnumValueNameSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_NAME_SUFFIX).toString());
|
setEnumValueSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_SUFFIX).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// This either updates additionalProperties with the above fixes, or sets the default if the option was not specified.
|
// This either updates additionalProperties with the above fixes, or sets the default if the option was not specified.
|
||||||
@ -1017,8 +1017,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
this.enumNameSuffix = enumNameSuffix;
|
this.enumNameSuffix = enumNameSuffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnumValueNameSuffix(final String enumValueNameSuffix) {
|
public void setEnumValueSuffix(final String enumValueSuffix) {
|
||||||
this.enumValueNameSuffix = enumValueNameSuffix;
|
this.enumValueSuffix = enumValueSuffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSupportNullable() {
|
public boolean isSupportNullable() {
|
||||||
@ -1058,7 +1058,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
enumName = enumName.replaceFirst("^_", "");
|
enumName = enumName.replaceFirst("^_", "");
|
||||||
enumName = enumName.replaceFirst("_$", "");
|
enumName = enumName.replaceFirst("_$", "");
|
||||||
|
|
||||||
enumName = camelize(enumName) + this.enumValueNameSuffix;
|
enumName = camelize(enumName) + this.enumValueSuffix;
|
||||||
|
|
||||||
if (enumName.matches("\\d.*")) { // starts with number
|
if (enumName.matches("\\d.*")) { // starts with number
|
||||||
return "_" + enumName;
|
return "_" + enumName;
|
||||||
|
@ -214,9 +214,9 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
|||||||
CodegenConstants.ENUM_NAME_SUFFIX_DESC,
|
CodegenConstants.ENUM_NAME_SUFFIX_DESC,
|
||||||
enumNameSuffix);
|
enumNameSuffix);
|
||||||
|
|
||||||
addOption(CodegenConstants.ENUM_VALUE_NAME_SUFFIX,
|
addOption(CodegenConstants.ENUM_VALUE_SUFFIX,
|
||||||
CodegenConstants.ENUM_VALUE_NAME_SUFFIX_DESC,
|
"Suffix that will be appended to all enum values.",
|
||||||
enumValueNameSuffix);
|
enumValueSuffix);
|
||||||
|
|
||||||
classModifier.addEnum("", "Keep class default with no modifier");
|
classModifier.addEnum("", "Keep class default with no modifier");
|
||||||
classModifier.addEnum("abstract", "Make class abstract");
|
classModifier.addEnum("abstract", "Make class abstract");
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package org.openapitools.codegen.csharp;
|
package org.openapitools.codegen.csharp;
|
||||||
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.media.Schema;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import io.swagger.v3.oas.models.media.StringSchema;
|
import io.swagger.v3.oas.models.media.StringSchema;
|
||||||
@ -30,7 +31,6 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class CsharpModelEnumTest {
|
public class CsharpModelEnumTest {
|
||||||
@ -93,6 +93,25 @@ public class CsharpModelEnumTest {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(description = "use custom suffixes for enums")
|
||||||
|
public void useCustomEnumSuffixes() {
|
||||||
|
final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen();
|
||||||
|
codegen.setEnumNameSuffix("EnumName");
|
||||||
|
codegen.setEnumValueSuffix("EnumValue");
|
||||||
|
|
||||||
|
OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
|
||||||
|
final Schema petSchema = openAPI.getComponents().getSchemas().get("Pet");
|
||||||
|
final CodegenModel cm = codegen.fromModel("Pet", petSchema);
|
||||||
|
final CodegenProperty statusProperty = cm.vars.get(5);
|
||||||
|
Assert.assertEquals(statusProperty.name, "Status");
|
||||||
|
Assert.assertTrue(statusProperty.isEnum);
|
||||||
|
Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnumName");
|
||||||
|
|
||||||
|
Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnumValue");
|
||||||
|
}
|
||||||
|
|
||||||
@Test(description = "use default suffixes for enums")
|
@Test(description = "use default suffixes for enums")
|
||||||
public void useDefaultEnumSuffixes() {
|
public void useDefaultEnumSuffixes() {
|
||||||
final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen();
|
final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen();
|
||||||
@ -110,11 +129,11 @@ public class CsharpModelEnumTest {
|
|||||||
Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnum");
|
Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(description = "use custom suffixes for enums")
|
@Test(description = "support empty suffixes for enums")
|
||||||
public void useCustomEnumSuffixes() {
|
public void useEmptyEnumSuffixes() {
|
||||||
final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen();
|
final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen();
|
||||||
codegen.setEnumNameSuffix("EnumName");
|
codegen.setEnumNameSuffix("");
|
||||||
codegen.setEnumValueNameSuffix("EnumValue");
|
codegen.setEnumValueSuffix("");
|
||||||
|
|
||||||
OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml");
|
OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml");
|
||||||
codegen.setOpenAPI(openAPI);
|
codegen.setOpenAPI(openAPI);
|
||||||
@ -124,8 +143,9 @@ public class CsharpModelEnumTest {
|
|||||||
final CodegenProperty statusProperty = cm.vars.get(5);
|
final CodegenProperty statusProperty = cm.vars.get(5);
|
||||||
Assert.assertEquals(statusProperty.name, "Status");
|
Assert.assertEquals(statusProperty.name, "Status");
|
||||||
Assert.assertTrue(statusProperty.isEnum);
|
Assert.assertTrue(statusProperty.isEnum);
|
||||||
Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnumName");
|
Assert.assertEquals(statusProperty.datatypeWithEnum, "Status");
|
||||||
|
|
||||||
Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnumValue");
|
Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "Aaaa");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
4.2.0-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -159,6 +159,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Model.BigCat](docs/BigCat.md)
|
||||||
|
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||||
- [Model.Capitalization](docs/Capitalization.md)
|
- [Model.Capitalization](docs/Capitalization.md)
|
||||||
- [Model.Cat](docs/Cat.md)
|
- [Model.Cat](docs/Cat.md)
|
||||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Declawed** | **bool** | | [optional]
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCatAllOf
|
||||||
|
/// </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 BigCatAllOfTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCatAllOf
|
||||||
|
//private BigCatAllOf instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCatAllOf
|
||||||
|
//instance = new BigCatAllOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatAllOfInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCatAllOf
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCatAllOf), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCat
|
||||||
|
/// </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 BigCatTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCat
|
||||||
|
//private BigCat instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCat
|
||||||
|
//instance = new BigCat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCat
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCat
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCat), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -32,6 +32,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
|
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||||
public partial class Animal : IEquatable<Animal>
|
public partial class Animal : IEquatable<Animal>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -0,0 +1,153 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCat
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCat : Cat, IEquatable<BigCat>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
protected BigCat() { }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed)
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCat {\n");
|
||||||
|
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCat instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCat to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCat input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.Equals(input) &&
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hashCode = base.GetHashCode();
|
||||||
|
if (this.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,147 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCatAllOf : IEquatable<BigCatAllOf>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCatAllOf" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCatAllOf(KindEnum? kind = default(KindEnum?))
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCatAllOf {\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCatAllOf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCatAllOf instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCatAllOf to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCatAllOf input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
4.2.0-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -159,6 +159,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Model.BigCat](docs/BigCat.md)
|
||||||
|
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||||
- [Model.Capitalization](docs/Capitalization.md)
|
- [Model.Capitalization](docs/Capitalization.md)
|
||||||
- [Model.Cat](docs/Cat.md)
|
- [Model.Cat](docs/Cat.md)
|
||||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Declawed** | **bool** | | [optional]
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCatAllOf
|
||||||
|
/// </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 BigCatAllOfTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCatAllOf
|
||||||
|
//private BigCatAllOf instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCatAllOf
|
||||||
|
//instance = new BigCatAllOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatAllOfInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCatAllOf
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCatAllOf), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCat
|
||||||
|
/// </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 BigCatTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCat
|
||||||
|
//private BigCat instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCat
|
||||||
|
//instance = new BigCat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCat
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCat
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCat), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -32,6 +32,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
|
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCat
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCat : Cat, IEquatable<BigCat>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
protected BigCat() { }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed)
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCat {\n");
|
||||||
|
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCat instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCat to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCat input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.Equals(input) &&
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hashCode = base.GetHashCode();
|
||||||
|
if (this.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.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)
|
||||||
|
{
|
||||||
|
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCatAllOf : IEquatable<BigCatAllOf>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCatAllOf" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCatAllOf(KindEnum? kind = default(KindEnum?))
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCatAllOf {\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCatAllOf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCatAllOf instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCatAllOf to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCatAllOf input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -122,6 +122,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="validationContext">Validation context</param>
|
/// <param name="validationContext">Validation context</param>
|
||||||
/// <returns>Validation Result</returns>
|
/// <returns>Validation Result</returns>
|
||||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
return this.BaseValidate(validationContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||||
yield break;
|
yield break;
|
||||||
|
@ -1 +1 @@
|
|||||||
4.2.0-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -135,6 +135,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Model.BigCat](docs/BigCat.md)
|
||||||
|
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||||
- [Model.Capitalization](docs/Capitalization.md)
|
- [Model.Capitalization](docs/Capitalization.md)
|
||||||
- [Model.Cat](docs/Cat.md)
|
- [Model.Cat](docs/Cat.md)
|
||||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Declawed** | **bool** | | [optional]
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -30,6 +30,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
|
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||||
public partial class Animal : IEquatable<Animal>
|
public partial class Animal : IEquatable<Animal>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -0,0 +1,150 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCat
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCat : Cat, IEquatable<BigCat>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
protected BigCat() { }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed)
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCat {\n");
|
||||||
|
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCat instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCat to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCat input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.Equals(input) &&
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hashCode = base.GetHashCode();
|
||||||
|
if (this.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
public partial class BigCatAllOf : IEquatable<BigCatAllOf>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=false)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCatAllOf" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCatAllOf(KindEnum? kind = default(KindEnum?))
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCatAllOf {\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCatAllOf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCatAllOf instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCatAllOf to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCatAllOf input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
4.2.0-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -159,6 +159,8 @@ Class | Method | HTTP request | Description
|
|||||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||||
|
- [Model.BigCat](docs/BigCat.md)
|
||||||
|
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||||
- [Model.Capitalization](docs/Capitalization.md)
|
- [Model.Capitalization](docs/Capitalization.md)
|
||||||
- [Model.Cat](docs/Cat.md)
|
- [Model.Cat](docs/Cat.md)
|
||||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCat
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Declawed** | **bool** | | [optional]
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Org.OpenAPITools.Model.BigCatAllOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Kind** | **string** | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCatAllOf
|
||||||
|
/// </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 BigCatAllOfTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCatAllOf
|
||||||
|
//private BigCatAllOf instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCatAllOf
|
||||||
|
//instance = new BigCatAllOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatAllOfInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCatAllOf
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCatAllOf), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Org.OpenAPITools.Api;
|
||||||
|
using Org.OpenAPITools.Model;
|
||||||
|
using Org.OpenAPITools.Client;
|
||||||
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Test
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class for testing BigCat
|
||||||
|
/// </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 BigCatTests
|
||||||
|
{
|
||||||
|
// TODO uncomment below to declare an instance variable for BigCat
|
||||||
|
//private BigCat instance;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup before each test
|
||||||
|
/// </summary>
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to create an instance of BigCat
|
||||||
|
//instance = new BigCat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up after each test
|
||||||
|
/// </summary>
|
||||||
|
[TearDown]
|
||||||
|
public void Cleanup()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test an instance of BigCat
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void BigCatInstanceTest()
|
||||||
|
{
|
||||||
|
// TODO uncomment below to test "IsInstanceOf" BigCat
|
||||||
|
//Assert.IsInstanceOf(typeof(BigCat), instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test the property 'Kind'
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void KindTest()
|
||||||
|
{
|
||||||
|
// TODO unit test for the property 'Kind'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -34,6 +34,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
|
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||||
[ImplementPropertyChanged]
|
[ImplementPropertyChanged]
|
||||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,186 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCat
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class BigCat : Cat, IEquatable<BigCat>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=true)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
[JsonConstructorAttribute]
|
||||||
|
protected BigCat() { }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCat" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed)
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCat {\n");
|
||||||
|
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCat instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCat to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCat input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.Equals(input) &&
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hash code
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Hash code</returns>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked // Overflow is fine, just wrap
|
||||||
|
{
|
||||||
|
int hashCode = base.GetHashCode();
|
||||||
|
if (this.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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)
|
||||||
|
{
|
||||||
|
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using PropertyChanged;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||||
|
|
||||||
|
namespace Org.OpenAPITools.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// BigCatAllOf
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[ImplementPropertyChanged]
|
||||||
|
public partial class BigCatAllOf : IEquatable<BigCatAllOf>, IValidatableObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines Kind
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum KindEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Lions for value: lions
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "lions")]
|
||||||
|
Lions = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Tigers for value: tigers
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "tigers")]
|
||||||
|
Tigers = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Leopards for value: leopards
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "leopards")]
|
||||||
|
Leopards = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enum Jaguars for value: jaguars
|
||||||
|
/// </summary>
|
||||||
|
[EnumMember(Value = "jaguars")]
|
||||||
|
Jaguars = 4
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Kind
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="kind", EmitDefaultValue=true)]
|
||||||
|
public KindEnum? Kind { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BigCatAllOf" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="kind">kind.</param>
|
||||||
|
public BigCatAllOf(KindEnum? kind = default(KindEnum?))
|
||||||
|
{
|
||||||
|
this.Kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <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 BigCatAllOf {\n");
|
||||||
|
sb.Append(" Kind: ").Append(Kind).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if objects are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Object to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public override bool Equals(object input)
|
||||||
|
{
|
||||||
|
return this.Equals(input as BigCatAllOf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if BigCatAllOf instances are equal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">Instance of BigCatAllOf to be compared</param>
|
||||||
|
/// <returns>Boolean</returns>
|
||||||
|
public bool Equals(BigCatAllOf input)
|
||||||
|
{
|
||||||
|
if (input == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
this.Kind == input.Kind ||
|
||||||
|
(this.Kind != null &&
|
||||||
|
this.Kind.Equals(input.Kind))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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.Kind != null)
|
||||||
|
hashCode = hashCode * 59 + this.Kind.GetHashCode();
|
||||||
|
return hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Property changed event handler
|
||||||
|
/// </summary>
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger when a property changed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="propertyName">Property Name</param>
|
||||||
|
public virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||||
|
// Properties with setters are modified at compile time to notify of changes.
|
||||||
|
var propertyChanged = PropertyChanged;
|
||||||
|
if (propertyChanged != null)
|
||||||
|
{
|
||||||
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -145,6 +145,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="validationContext">Validation context</param>
|
/// <param name="validationContext">Validation context</param>
|
||||||
/// <returns>Validation Result</returns>
|
/// <returns>Validation Result</returns>
|
||||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
return this.BaseValidate(validationContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// To validate all properties of the instance
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="validationContext">Validation context</param>
|
||||||
|
/// <returns>Validation Result</returns>
|
||||||
|
protected IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> BaseValidate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||||
yield break;
|
yield break;
|
||||||
|
@ -59,36 +59,36 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
||||||
*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
|
*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||||
*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
|
*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||||
*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
|
*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||||
*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
|
*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
|
||||||
*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
|
*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
|
||||||
*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||||
*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
|
*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
|
*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||||
*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
|
*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
|
||||||
*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user
|
*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user
|
||||||
*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
|
*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||||
*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
|
*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||||
*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
|
*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
|
||||||
*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
|
*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
|
||||||
*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
|
*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
|
||||||
*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
|
*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
|
||||||
*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
|
*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
|
||||||
- [ApiResponse](docs//ApiResponse.md)
|
- [ApiResponse](doc//ApiResponse.md)
|
||||||
- [Category](docs//Category.md)
|
- [Category](doc//Category.md)
|
||||||
- [Order](docs//Order.md)
|
- [Order](doc//Order.md)
|
||||||
- [Pet](docs//Pet.md)
|
- [Pet](doc//Pet.md)
|
||||||
- [Tag](docs//Tag.md)
|
- [Tag](doc//Tag.md)
|
||||||
- [User](docs//User.md)
|
- [User](doc//User.md)
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Authorization
|
## Documentation For Authorization
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
name: openapi
|
name: openapi
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
description: OpenAPI API client
|
description: OpenAPI API client
|
||||||
|
authors:
|
||||||
|
- Author <author@homepage>
|
||||||
|
homepage: homepage
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.0.0 <3.0.0'
|
sdk: '>=2.0.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1 +1 @@
|
|||||||
4.1.3-SNAPSHOT
|
4.2.3-SNAPSHOT
|
Loading…
Reference in New Issue
Block a user