forked from loafle/openapi-generator-original
Support models with multi-level hierarchy (via roxspring) (#4503)
* Example of broken multi-level hierarchy * Support for multiple levels of hierarchy in model objects * Support for multiple levels of hierarchy in generators * Regenerated samples * Temporarily skip scalaz sample verification, which is having issue with Java version in CI container * Re-enable scalaz in verify samples Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
This commit is contained in:
parent
daec02b8c5
commit
376e419d0b
@ -1876,7 +1876,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
// parent model
|
||||
final String parentName = ModelUtils.getParentName(composed, allDefinitions);
|
||||
final List<String> allParents = ModelUtils.getAllParentsName(composed, allDefinitions);
|
||||
final List<String> allParents = ModelUtils.getAllParentsName(composed, allDefinitions, false);
|
||||
final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName);
|
||||
|
||||
// TODO revise the logic below to set dicriminator, xml attributes
|
||||
@ -2083,10 +2083,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
Map<String, Schema> allDefinitions = ModelUtils.getSchemas(this.openAPI);
|
||||
allDefinitions.forEach((childName, child) -> {
|
||||
if (child instanceof ComposedSchema && ((ComposedSchema) child).getAllOf() != null) {
|
||||
Set<String> parentSchemas = ((ComposedSchema) child).getAllOf().stream()
|
||||
.filter(s -> s.get$ref() != null)
|
||||
.map(s -> ModelUtils.getSimpleRef(s.get$ref()))
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
final List<String> parentSchemas = ModelUtils.getAllParentsName((ComposedSchema) child, allDefinitions, true);
|
||||
if (parentSchemas.contains(schemaName)) {
|
||||
discriminator.getMappedModels().add(new MappedModel(childName, toModelName(childName)));
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
|
||||
// Because the child models extend the parents, the enums will be available via the parent.
|
||||
|
||||
// Only bother with reconciliation if the parent model has enums.
|
||||
if (!parentCodegenModel.hasEnums) {
|
||||
if (parentCodegenModel == null || !parentCodegenModel.hasEnums) {
|
||||
return codegenModel;
|
||||
}
|
||||
|
||||
|
@ -572,7 +572,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
for (final CodegenProperty property : codegenModel.readWriteVars) {
|
||||
if (property.defaultValue == null && property.baseName.equals(parentCodegenModel.discriminator.getPropertyName())) {
|
||||
if (property.defaultValue == null && parentCodegenModel.discriminator != null && property.baseName.equals(parentCodegenModel.discriminator.getPropertyName())) {
|
||||
property.defaultValue = "\"" + name + "\"";
|
||||
}
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
for (final CodegenProperty property : codegenModel.readWriteVars) {
|
||||
if (property.defaultValue == null && property.baseName.equals(parentCodegenModel.discriminator.getPropertyName())) {
|
||||
if (property.defaultValue == null && parentCodegenModel.discriminator != null && property.baseName.equals(parentCodegenModel.discriminator.getPropertyName())) {
|
||||
property.defaultValue = "\"" + name + "\"";
|
||||
}
|
||||
}
|
||||
|
@ -937,7 +937,7 @@ public class ModelUtils {
|
||||
if (s == null) {
|
||||
LOGGER.error("Failed to obtain schema from {}", parentName);
|
||||
return "UNKNOWN_PARENT_NAME";
|
||||
} else if (s.getDiscriminator() != null && StringUtils.isNotEmpty(s.getDiscriminator().getPropertyName())) {
|
||||
} else if (hasOrInheritsDiscriminator(s, allSchemas)) {
|
||||
// discriminator.propertyName is used
|
||||
return parentName;
|
||||
} else {
|
||||
@ -961,7 +961,7 @@ public class ModelUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<String> getAllParentsName(ComposedSchema composedSchema, Map<String, Schema> allSchemas) {
|
||||
public static List<String> getAllParentsName(ComposedSchema composedSchema, Map<String, Schema> allSchemas, boolean includeAncestors) {
|
||||
List<Schema> interfaces = getInterfaces(composedSchema);
|
||||
List<String> names = new ArrayList<String>();
|
||||
|
||||
@ -974,9 +974,12 @@ public class ModelUtils {
|
||||
if (s == null) {
|
||||
LOGGER.error("Failed to obtain schema from {}", parentName);
|
||||
names.add("UNKNOWN_PARENT_NAME");
|
||||
} else if (s.getDiscriminator() != null && StringUtils.isNotEmpty(s.getDiscriminator().getPropertyName())) {
|
||||
} else if (hasOrInheritsDiscriminator(s, allSchemas)) {
|
||||
// discriminator.propertyName is used
|
||||
names.add(parentName);
|
||||
if (includeAncestors && s instanceof ComposedSchema) {
|
||||
names.addAll(getAllParentsName((ComposedSchema) s, allSchemas, true));
|
||||
}
|
||||
} else {
|
||||
LOGGER.debug("Not a parent since discriminator.propertyName is not set {}", s.get$ref());
|
||||
// not a parent since discriminator.propertyName is not set
|
||||
@ -990,6 +993,32 @@ public class ModelUtils {
|
||||
return names;
|
||||
}
|
||||
|
||||
private static boolean hasOrInheritsDiscriminator(Schema schema, Map<String, Schema> allSchemas) {
|
||||
if (schema.getDiscriminator() != null && StringUtils.isNotEmpty(schema.getDiscriminator().getPropertyName())) {
|
||||
return true;
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(schema.get$ref())) {
|
||||
String parentName = getSimpleRef(schema.get$ref());
|
||||
Schema s = allSchemas.get(parentName);
|
||||
if (s != null) {
|
||||
return hasOrInheritsDiscriminator(s, allSchemas);
|
||||
}
|
||||
else {
|
||||
LOGGER.error("Failed to obtain schema from {}", parentName);
|
||||
}
|
||||
}
|
||||
else if (schema instanceof ComposedSchema) {
|
||||
final ComposedSchema composed = (ComposedSchema) schema;
|
||||
final List<Schema> interfaces = getInterfaces(composed);
|
||||
for (Schema i : interfaces) {
|
||||
if (hasOrInheritsDiscriminator(i, allSchemas)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isNullable(Schema schema) {
|
||||
if (schema == null) {
|
||||
return false;
|
||||
|
@ -488,6 +488,7 @@ public class DefaultCodegenTest {
|
||||
test.setPropertyBaseName("className");
|
||||
test.getMappedModels().add(new CodegenDiscriminator.MappedModel("Dog", "Dog"));
|
||||
test.getMappedModels().add(new CodegenDiscriminator.MappedModel("Cat", "Cat"));
|
||||
test.getMappedModels().add(new CodegenDiscriminator.MappedModel("BigCat", "BigCat"));
|
||||
Assert.assertEquals(discriminator, test);
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ public abstract class JavaJaxrsBaseTest {
|
||||
String jsonSubType = "@JsonSubTypes({\n" +
|
||||
" @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" +
|
||||
" @JsonSubTypes.Type(value = Cat.class, name = \"Cat\"),\n" +
|
||||
" @JsonSubTypes.Type(value = BigDog.class, name = \"BigDog\"),\n" +
|
||||
"})";
|
||||
assertFileContains(generator, outputPath + "/src/gen/java/org/openapitools/model/Animal.java", jsonTypeInfo, jsonSubType);
|
||||
}
|
||||
|
@ -1330,6 +1330,14 @@ definitions:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/definitions/Cat'
|
||||
- type: object
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum: [lions, tigers, leopards, jaguars]
|
||||
Animal:
|
||||
type: object
|
||||
discriminator: className
|
||||
|
@ -145,6 +145,8 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||
- [Model.BigCat](docs/BigCat.md)
|
||||
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Model.Capitalization](docs/Capitalization.md)
|
||||
- [Model.Cat](docs/Cat.md)
|
||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# 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,9 @@
|
||||
# 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,71 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <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 : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for BigCatAllOf
|
||||
//private BigCatAllOf instance;
|
||||
|
||||
public BigCatAllOfTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of BigCatAllOf
|
||||
//instance = new BigCatAllOf();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of BigCatAllOf
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BigCatAllOfInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" BigCatAllOf
|
||||
//Assert.IsInstanceOfType<BigCatAllOf> (instance, "variable 'instance' is a BigCatAllOf");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Kind'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void KindTest()
|
||||
{
|
||||
// TODO unit test for the property 'Kind'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <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 : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for BigCat
|
||||
//private BigCat instance;
|
||||
|
||||
public BigCatTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of BigCat
|
||||
//instance = new BigCat();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of BigCat
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BigCatInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" BigCat
|
||||
//Assert.IsInstanceOfType<BigCat> (instance, "variable 'instance' is a BigCat");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Kind'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void KindTest()
|
||||
{
|
||||
// TODO unit test for the property 'Kind'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,8 +34,10 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,158 @@
|
||||
/*
|
||||
* 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;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
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>
|
||||
/// <param name="className">className (required).</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
/// <param name="declawed">declawed.</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 OpenAPIClientUtils.compareLogic.Compare(this, input as BigCat).AreEqual;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
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 BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
/*
|
||||
* 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;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
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 OpenAPIClientUtils.compareLogic.Compare(this, input as BigCatAllOf).AreEqual;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -157,6 +157,8 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||
- [Model.BigCat](docs/BigCat.md)
|
||||
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Model.Capitalization](docs/Capitalization.md)
|
||||
- [Model.Cat](docs/Cat.md)
|
||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# 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,9 @@
|
||||
# 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,71 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <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 : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for BigCatAllOf
|
||||
//private BigCatAllOf instance;
|
||||
|
||||
public BigCatAllOfTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of BigCatAllOf
|
||||
//instance = new BigCatAllOf();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of BigCatAllOf
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BigCatAllOfInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" BigCatAllOf
|
||||
//Assert.IsInstanceOfType<BigCatAllOf> (instance, "variable 'instance' is a BigCatAllOf");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Kind'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void KindTest()
|
||||
{
|
||||
// TODO unit test for the property 'Kind'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <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 : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for BigCat
|
||||
//private BigCat instance;
|
||||
|
||||
public BigCatTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of BigCat
|
||||
//instance = new BigCat();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of BigCat
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void BigCatInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" BigCat
|
||||
//Assert.IsInstanceOfType<BigCat> (instance, "variable 'instance' is a BigCat");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Kind'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void KindTest()
|
||||
{
|
||||
// TODO unit test for the property 'Kind'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,8 +34,10 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,158 @@
|
||||
/*
|
||||
* 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;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
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>
|
||||
/// <param name="className">className (required).</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
/// <param name="declawed">declawed.</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 OpenAPIClientUtils.compareLogic.Compare(this, input as BigCat).AreEqual;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
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 BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
/*
|
||||
* 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;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
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 OpenAPIClientUtils.compareLogic.Compare(this, input as BigCatAllOf).AreEqual;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -159,6 +159,8 @@ Class | Method | HTTP request | Description
|
||||
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [Model.ArrayTest](docs/ArrayTest.md)
|
||||
- [Model.BigCat](docs/BigCat.md)
|
||||
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Model.Capitalization](docs/Capitalization.md)
|
||||
- [Model.Cat](docs/Cat.md)
|
||||
- [Model.CatAllOf](docs/CatAllOf.md)
|
||||
|
14
samples/client/petstore/csharp/OpenAPIClient/docs/BigCat.md
Normal file
14
samples/client/petstore/csharp/OpenAPIClient/docs/BigCat.md
Normal file
@ -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")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||
[JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")]
|
||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||
{
|
||||
/// <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>
|
||||
/// <returns>Validation Result</returns>
|
||||
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;
|
||||
yield break;
|
||||
|
@ -0,0 +1,31 @@
|
||||
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule OpenapiPetstore.Model.BigCat do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
|
||||
@derive [Poison.Encoder]
|
||||
defstruct [
|
||||
:"className",
|
||||
:"color",
|
||||
:"declawed",
|
||||
:"kind"
|
||||
]
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
:"className" => String.t,
|
||||
:"color" => String.t | nil,
|
||||
:"declawed" => boolean() | nil,
|
||||
:"kind" => String.t | nil
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.BigCat do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,25 @@
|
||||
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule OpenapiPetstore.Model.BigCatAllOf do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
|
||||
@derive [Poison.Encoder]
|
||||
defstruct [
|
||||
:"kind"
|
||||
]
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
:"kind" => String.t | nil
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.BigCatAllOf do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
@ -86,6 +86,8 @@ Class | Method | HTTP request | Description
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BigCat](docs/BigCat.md)
|
||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
|
@ -1422,6 +1422,10 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
- $ref: '#/components/schemas/BigCat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@ -2086,6 +2090,15 @@ components:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat_allOf:
|
||||
properties:
|
||||
kind:
|
||||
enum:
|
||||
- lions
|
||||
- tigers
|
||||
- leopards
|
||||
- jaguars
|
||||
type: string
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
@ -0,0 +1,14 @@
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Color** | **string** | | [optional] [default to red]
|
||||
**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,11 @@
|
||||
# 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,18 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package petstore
|
||||
// BigCat struct for BigCat
|
||||
type BigCat struct {
|
||||
ClassName string `json:"className" xml:"className"`
|
||||
Color string `json:"color,omitempty" xml:"color"`
|
||||
Declawed bool `json:"declawed,omitempty" xml:"declawed"`
|
||||
Kind string `json:"kind,omitempty" xml:"kind"`
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package petstore
|
||||
// BigCatAllOf struct for BigCatAllOf
|
||||
type BigCatAllOf struct {
|
||||
Kind string `json:"kind,omitempty" xml:"kind"`
|
||||
}
|
@ -86,6 +86,8 @@ Class | Method | HTTP request | Description
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BigCat](docs/BigCat.md)
|
||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
|
@ -1422,6 +1422,10 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
- $ref: '#/components/schemas/BigCat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@ -2086,6 +2090,15 @@ components:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat_allOf:
|
||||
properties:
|
||||
kind:
|
||||
enum:
|
||||
- lions
|
||||
- tigers
|
||||
- leopards
|
||||
- jaguars
|
||||
type: string
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
14
samples/client/petstore/go/go-petstore/docs/BigCat.md
Normal file
14
samples/client/petstore/go/go-petstore/docs/BigCat.md
Normal file
@ -0,0 +1,14 @@
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Color** | **string** | | [optional] [default to red]
|
||||
**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)
|
||||
|
||||
|
11
samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md
Normal file
11
samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md
Normal file
@ -0,0 +1,11 @@
|
||||
# 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)
|
||||
|
||||
|
17
samples/client/petstore/go/go-petstore/model_big_cat.go
Normal file
17
samples/client/petstore/go/go-petstore/model_big_cat.go
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
// BigCat struct for BigCat
|
||||
type BigCat struct {
|
||||
ClassName string `json:"className"`
|
||||
Color string `json:"color,omitempty"`
|
||||
Declawed bool `json:"declawed,omitempty"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
// BigCatAllOf struct for BigCatAllOf
|
||||
type BigCatAllOf struct {
|
||||
Kind string `json:"kind,omitempty"`
|
||||
}
|
@ -653,6 +653,75 @@ mkArrayTest =
|
||||
, arrayTestArrayArrayOfModel = Nothing
|
||||
}
|
||||
|
||||
-- ** BigCat
|
||||
-- | BigCat
|
||||
data BigCat = BigCat
|
||||
{ bigCatClassName :: !(Text) -- ^ /Required/ "className"
|
||||
, bigCatColor :: !(Maybe Text) -- ^ "color"
|
||||
, bigCatDeclawed :: !(Maybe Bool) -- ^ "declawed"
|
||||
, bigCatKind :: !(Maybe E'Kind) -- ^ "kind"
|
||||
} deriving (P.Show, P.Eq, P.Typeable)
|
||||
|
||||
-- | FromJSON BigCat
|
||||
instance A.FromJSON BigCat where
|
||||
parseJSON = A.withObject "BigCat" $ \o ->
|
||||
BigCat
|
||||
<$> (o .: "className")
|
||||
<*> (o .:? "color")
|
||||
<*> (o .:? "declawed")
|
||||
<*> (o .:? "kind")
|
||||
|
||||
-- | ToJSON BigCat
|
||||
instance A.ToJSON BigCat where
|
||||
toJSON BigCat {..} =
|
||||
_omitNulls
|
||||
[ "className" .= bigCatClassName
|
||||
, "color" .= bigCatColor
|
||||
, "declawed" .= bigCatDeclawed
|
||||
, "kind" .= bigCatKind
|
||||
]
|
||||
|
||||
|
||||
-- | Construct a value of type 'BigCat' (by applying it's required fields, if any)
|
||||
mkBigCat
|
||||
:: Text -- ^ 'bigCatClassName'
|
||||
-> BigCat
|
||||
mkBigCat bigCatClassName =
|
||||
BigCat
|
||||
{ bigCatClassName
|
||||
, bigCatColor = Nothing
|
||||
, bigCatDeclawed = Nothing
|
||||
, bigCatKind = Nothing
|
||||
}
|
||||
|
||||
-- ** BigCatAllOf
|
||||
-- | BigCatAllOf
|
||||
data BigCatAllOf = BigCatAllOf
|
||||
{ bigCatAllOfKind :: !(Maybe E'Kind) -- ^ "kind"
|
||||
} deriving (P.Show, P.Eq, P.Typeable)
|
||||
|
||||
-- | FromJSON BigCatAllOf
|
||||
instance A.FromJSON BigCatAllOf where
|
||||
parseJSON = A.withObject "BigCatAllOf" $ \o ->
|
||||
BigCatAllOf
|
||||
<$> (o .:? "kind")
|
||||
|
||||
-- | ToJSON BigCatAllOf
|
||||
instance A.ToJSON BigCatAllOf where
|
||||
toJSON BigCatAllOf {..} =
|
||||
_omitNulls
|
||||
[ "kind" .= bigCatAllOfKind
|
||||
]
|
||||
|
||||
|
||||
-- | Construct a value of type 'BigCatAllOf' (by applying it's required fields, if any)
|
||||
mkBigCatAllOf
|
||||
:: BigCatAllOf
|
||||
mkBigCatAllOf =
|
||||
BigCatAllOf
|
||||
{ bigCatAllOfKind = Nothing
|
||||
}
|
||||
|
||||
-- ** Capitalization
|
||||
-- | Capitalization
|
||||
data Capitalization = Capitalization
|
||||
@ -2199,6 +2268,40 @@ toE'JustSymbol = \case
|
||||
s -> P.Left $ "toE'JustSymbol: enum parse failure: " P.++ P.show s
|
||||
|
||||
|
||||
-- ** E'Kind
|
||||
|
||||
-- | Enum of 'Text'
|
||||
data E'Kind
|
||||
= E'Kind'Lions -- ^ @"lions"@
|
||||
| E'Kind'Tigers -- ^ @"tigers"@
|
||||
| E'Kind'Leopards -- ^ @"leopards"@
|
||||
| E'Kind'Jaguars -- ^ @"jaguars"@
|
||||
deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
|
||||
|
||||
instance A.ToJSON E'Kind where toJSON = A.toJSON . fromE'Kind
|
||||
instance A.FromJSON E'Kind where parseJSON o = P.either P.fail (pure . P.id) . toE'Kind =<< A.parseJSON o
|
||||
instance WH.ToHttpApiData E'Kind where toQueryParam = WH.toQueryParam . fromE'Kind
|
||||
instance WH.FromHttpApiData E'Kind where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Kind
|
||||
instance MimeRender MimeMultipartFormData E'Kind where mimeRender _ = mimeRenderDefaultMultipartFormData
|
||||
|
||||
-- | unwrap 'E'Kind' enum
|
||||
fromE'Kind :: E'Kind -> Text
|
||||
fromE'Kind = \case
|
||||
E'Kind'Lions -> "lions"
|
||||
E'Kind'Tigers -> "tigers"
|
||||
E'Kind'Leopards -> "leopards"
|
||||
E'Kind'Jaguars -> "jaguars"
|
||||
|
||||
-- | parse 'E'Kind' enum
|
||||
toE'Kind :: Text -> P.Either String E'Kind
|
||||
toE'Kind = \case
|
||||
"lions" -> P.Right E'Kind'Lions
|
||||
"tigers" -> P.Right E'Kind'Tigers
|
||||
"leopards" -> P.Right E'Kind'Leopards
|
||||
"jaguars" -> P.Right E'Kind'Jaguars
|
||||
s -> P.Left $ "toE'Kind: enum parse failure: " P.++ P.show s
|
||||
|
||||
|
||||
-- ** E'Status
|
||||
|
||||
-- | Enum of 'Text' .
|
||||
|
@ -228,6 +228,39 @@ arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> Ar
|
||||
|
||||
|
||||
|
||||
-- * BigCat
|
||||
|
||||
-- | 'bigCatClassName' Lens
|
||||
bigCatClassNameL :: Lens_' BigCat (Text)
|
||||
bigCatClassNameL f BigCat{..} = (\bigCatClassName -> BigCat { bigCatClassName, ..} ) <$> f bigCatClassName
|
||||
{-# INLINE bigCatClassNameL #-}
|
||||
|
||||
-- | 'bigCatColor' Lens
|
||||
bigCatColorL :: Lens_' BigCat (Maybe Text)
|
||||
bigCatColorL f BigCat{..} = (\bigCatColor -> BigCat { bigCatColor, ..} ) <$> f bigCatColor
|
||||
{-# INLINE bigCatColorL #-}
|
||||
|
||||
-- | 'bigCatDeclawed' Lens
|
||||
bigCatDeclawedL :: Lens_' BigCat (Maybe Bool)
|
||||
bigCatDeclawedL f BigCat{..} = (\bigCatDeclawed -> BigCat { bigCatDeclawed, ..} ) <$> f bigCatDeclawed
|
||||
{-# INLINE bigCatDeclawedL #-}
|
||||
|
||||
-- | 'bigCatKind' Lens
|
||||
bigCatKindL :: Lens_' BigCat (Maybe E'Kind)
|
||||
bigCatKindL f BigCat{..} = (\bigCatKind -> BigCat { bigCatKind, ..} ) <$> f bigCatKind
|
||||
{-# INLINE bigCatKindL #-}
|
||||
|
||||
|
||||
|
||||
-- * BigCatAllOf
|
||||
|
||||
-- | 'bigCatAllOfKind' Lens
|
||||
bigCatAllOfKindL :: Lens_' BigCatAllOf (Maybe E'Kind)
|
||||
bigCatAllOfKindL f BigCatAllOf{..} = (\bigCatAllOfKind -> BigCatAllOf { bigCatAllOfKind, ..} ) <$> f bigCatAllOfKind
|
||||
{-# INLINE bigCatAllOfKindL #-}
|
||||
|
||||
|
||||
|
||||
-- * Capitalization
|
||||
|
||||
-- | 'capitalizationSmallCamel' Lens
|
||||
|
@ -1422,6 +1422,10 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
- $ref: '#/components/schemas/BigCat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@ -2086,6 +2090,15 @@ components:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat_allOf:
|
||||
properties:
|
||||
kind:
|
||||
enum:
|
||||
- lions
|
||||
- tigers
|
||||
- leopards
|
||||
- jaguars
|
||||
type: string
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
@ -223,6 +223,25 @@ genArrayTest n =
|
||||
<*> arbitraryReducedMaybe n -- arrayTestArrayArrayOfInteger :: Maybe [[Integer]]
|
||||
<*> arbitraryReducedMaybe n -- arrayTestArrayArrayOfModel :: Maybe [[ReadOnlyFirst]]
|
||||
|
||||
instance Arbitrary BigCat where
|
||||
arbitrary = sized genBigCat
|
||||
|
||||
genBigCat :: Int -> Gen BigCat
|
||||
genBigCat n =
|
||||
BigCat
|
||||
<$> arbitrary -- bigCatClassName :: Text
|
||||
<*> arbitraryReducedMaybe n -- bigCatColor :: Maybe Text
|
||||
<*> arbitraryReducedMaybe n -- bigCatDeclawed :: Maybe Bool
|
||||
<*> arbitraryReducedMaybe n -- bigCatKind :: Maybe E'Kind
|
||||
|
||||
instance Arbitrary BigCatAllOf where
|
||||
arbitrary = sized genBigCatAllOf
|
||||
|
||||
genBigCatAllOf :: Int -> Gen BigCatAllOf
|
||||
genBigCatAllOf n =
|
||||
BigCatAllOf
|
||||
<$> arbitraryReducedMaybe n -- bigCatAllOfKind :: Maybe E'Kind
|
||||
|
||||
instance Arbitrary Capitalization where
|
||||
arbitrary = sized genCapitalization
|
||||
|
||||
@ -598,6 +617,9 @@ instance Arbitrary E'Inner where
|
||||
instance Arbitrary E'JustSymbol where
|
||||
arbitrary = arbitraryBoundedEnum
|
||||
|
||||
instance Arbitrary E'Kind where
|
||||
arbitrary = arbitraryBoundedEnum
|
||||
|
||||
instance Arbitrary E'Status where
|
||||
arbitrary = arbitraryBoundedEnum
|
||||
|
||||
|
@ -33,6 +33,8 @@ main =
|
||||
propMimeEq MimeJSON (Proxy :: Proxy ArrayOfArrayOfNumberOnly)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy ArrayOfNumberOnly)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy ArrayTest)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy BigCat)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy BigCatAllOf)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy Capitalization)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy Cat)
|
||||
propMimeEq MimeJSON (Proxy :: Proxy CatAllOf)
|
||||
|
@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
23
samples/client/petstore/java/jersey1/docs/BigCat.md
Normal file
23
samples/client/petstore/java/jersey1/docs/BigCat.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
23
samples/client/petstore/java/jersey1/docs/BigCatAllOf.md
Normal file
23
samples/client/petstore/java/jersey1/docs/BigCatAllOf.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
23
samples/client/petstore/java/jersey2-java6/docs/BigCat.md
Normal file
23
samples/client/petstore/java/jersey2-java6/docs/BigCat.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return ObjectUtils.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.hashCodeMulti(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,140 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return ObjectUtils.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.hashCodeMulti(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
23
samples/client/petstore/java/jersey2-java8/docs/BigCat.md
Normal file
23
samples/client/petstore/java/jersey2-java8/docs/BigCat.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
23
samples/client/petstore/java/jersey2/docs/BigCat.md
Normal file
23
samples/client/petstore/java/jersey2/docs/BigCat.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
23
samples/client/petstore/java/jersey2/docs/BigCatAllOf.md
Normal file
23
samples/client/petstore/java/jersey2/docs/BigCatAllOf.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCat.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCat extends Cat {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCat bigCat = (BigCat) o;
|
||||
return Objects.equals(this.kind, bigCat.kind) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind, super.hashCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
BigCatAllOf.JSON_PROPERTY_KIND
|
||||
})
|
||||
|
||||
public class BigCatAllOf {
|
||||
/**
|
||||
* Gets or Sets kind
|
||||
*/
|
||||
public enum KindEnum {
|
||||
LIONS("lions"),
|
||||
|
||||
TIGERS("tigers"),
|
||||
|
||||
LEOPARDS("leopards"),
|
||||
|
||||
JAGUARS("jaguars");
|
||||
|
||||
private String value;
|
||||
|
||||
KindEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static KindEnum fromValue(String value) {
|
||||
for (KindEnum b : KindEnum.values()) {
|
||||
if (b.value.equals(value)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get kind
|
||||
* @return kind
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_KIND)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public KindEnum getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
||||
public void setKind(KindEnum kind) {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
|
||||
return Objects.equals(this.kind, bigCatAllOf.kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(kind);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class BigCatAllOf {\n");
|
||||
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
public class BigCatAllOfTest {
|
||||
private final BigCatAllOf model = new BigCatAllOf();
|
||||
|
||||
/**
|
||||
* Model tests for BigCatAllOf
|
||||
*/
|
||||
@Test
|
||||
public void testBigCatAllOf() {
|
||||
// TODO: test BigCatAllOf
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
public class BigCatTest {
|
||||
private final BigCat model = new BigCat();
|
||||
|
||||
/**
|
||||
* Model tests for BigCat
|
||||
*/
|
||||
@Test
|
||||
public void testBigCat() {
|
||||
// TODO: test BigCat
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'className'
|
||||
*/
|
||||
@Test
|
||||
public void classNameTest() {
|
||||
// TODO: test className
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'declawed'
|
||||
*/
|
||||
@Test
|
||||
public void declawedTest() {
|
||||
// TODO: test declawed
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'kind'
|
||||
*/
|
||||
@Test
|
||||
public void kindTest() {
|
||||
// TODO: test kind
|
||||
}
|
||||
|
||||
}
|
23
samples/client/petstore/java/native/docs/BigCat.md
Normal file
23
samples/client/petstore/java/native/docs/BigCat.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
23
samples/client/petstore/java/native/docs/BigCatAllOf.md
Normal file
23
samples/client/petstore/java/native/docs/BigCatAllOf.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | [**KindEnum**](#KindEnum) | | [optional]
|
||||
|
||||
|
||||
|
||||
## Enum: KindEnum
|
||||
|
||||
Name | Value
|
||||
---- | -----
|
||||
LIONS | "lions"
|
||||
TIGERS | "tigers"
|
||||
LEOPARDS | "leopards"
|
||||
JAGUARS | "jaguars"
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||
})
|
||||
|
||||
public class Animal {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user