Remove null checks for C# value types (#2933)

This commit is contained in:
sunn 2019-05-30 12:06:42 +02:00 committed by William Cheng
parent 20b8eff6e3
commit aae97638a9
335 changed files with 2070 additions and 518 deletions

View File

@ -76,6 +76,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// nullable type
protected Set<String> nullableType = new HashSet<String>();
protected Set<String> valueTypes = new HashSet<String>();
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCSharpCodegen.class);
public AbstractCSharpCodegen() {
@ -191,6 +193,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
nullableType = new HashSet<String>(
Arrays.asList("decimal", "bool", "int", "float", "long", "double", "DateTime", "Guid")
);
// value Types
valueTypes = new HashSet<String>(
Arrays.asList("decimal", "bool", "int", "float", "long", "double")
);
}
public void setReturnICollection(boolean returnICollection) {
@ -415,6 +421,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
final Map<String, Object> processed = super.postProcessAllModels(objs);
postProcessEnumRefs(processed);
updateValueTypeProperty(processed);
return processed;
}
@ -455,6 +462,19 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
var.isPrimitiveType = true;
}
}
for (CodegenProperty var : model.vars) {
if (enumRefs.containsKey(var.dataType)) {
// Handle any enum properties referred to by $ref.
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
// while enums in many other languages are true objects.
CodegenModel refModel = enumRefs.get(var.dataType);
var.allowableValues = refModel.allowableValues;
var.isEnum = true;
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
var.isPrimitiveType = true;
}
}
// We're looping all models here.
if (model.isEnum) {
@ -542,6 +562,23 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
}
}
/**
* Update property if it is a C# value type
*
* @param models list of all models
*/
protected void updateValueTypeProperty(Map<String, Object> models) {
for (Map.Entry<String, Object> entry : models.entrySet()) {
String openAPIName = entry.getKey();
CodegenModel model = ModelUtils.getModelByName(openAPIName, models);
if (model != null) {
for (CodegenProperty var : model.vars) {
var.vendorExtensions.put("isValueType", isValueType(var));
}
}
}
}
@Override
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
super.postProcessOperationsWithModels(objs, allModels);
@ -1056,6 +1093,17 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"double".equals(dataType) || "decimal".equals(dataType) || "float".equals(dataType);
}
/**
* Return true if the property being passed is a C# value type
*
* @param var property
* @return true if property is a value type
*/
protected boolean isValueType(CodegenProperty var) {
return (valueTypes.contains(var.dataType) || var.isEnum ) ;
}
@Override
public void setParameterExampleValue(CodegenParameter codegenParameter) {

View File

@ -89,14 +89,14 @@ namespace {{modelPackage}}
return {{#vars}}{{^isContainer}}
(
{{name}} == other.{{name}} ||
{{name}} != null &&
{{^vendorExtensions.isValueType}}{{name}} != null &&{{/vendorExtensions.isValueType}}
{{name}}.Equals(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{#isContainer}}
(
{{name}} == other.{{name}} ||
{{name}} != null &&
{{^vendorExtensions.isValueType}}{{name}} != null &&
other.{{name}} != null &&
{{name}}.SequenceEqual(other.{{name}})
{{/vendorExtensions.isValueType}}{{name}}.SequenceEqual(other.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}false{{/vars}};
}
@ -111,7 +111,7 @@ namespace {{modelPackage}}
var hashCode = 41;
// Suitable nullity checks etc, of course :)
{{#vars}}
if ({{name}} != null)
{{^vendorExtensions.isValueType}}if ({{name}} != null){{/vendorExtensions.isValueType}}
hashCode = hashCode * 59 + {{name}}.GetHashCode();
{{/vars}}
return hashCode;

View File

@ -182,19 +182,19 @@
return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}}
(
this.{{name}} == input.{{name}} ||
{{^isEnum}}
{{^vendorExtensions.isValueType}}
(this.{{name}} != null &&
this.{{name}}.Equals(input.{{name}}))
{{/isEnum}}
{{#isEnum}}
{{/vendorExtensions.isValueType}}
{{#vendorExtensions.isValueType}}
this.{{name}}.Equals(input.{{name}})
{{/isEnum}}
{{/vendorExtensions.isValueType}}
){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{#isContainer}}
(
this.{{name}} == input.{{name}} ||
this.{{name}} != null &&
{{^vendorExtensions.isValueType}}this.{{name}} != null &&
input.{{name}} != null &&
this.{{name}}.SequenceEqual(input.{{name}})
{{/vendorExtensions.isValueType}}this.{{name}}.SequenceEqual(input.{{name}})
){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}};
{{/useCompareNetObjects}}
}
@ -214,13 +214,13 @@
int hashCode = 41;
{{/parent}}
{{#vars}}
{{^isEnum}}
{{^vendorExtensions.isValueType}}
if (this.{{name}} != null)
hashCode = hashCode * 59 + this.{{name}}.GetHashCode();
{{/isEnum}}
{{#isEnum}}
{{/vendorExtensions.isValueType}}
{{#vendorExtensions.isValueType}}
hashCode = hashCode * 59 + this.{{name}}.GetHashCode();
{{/isEnum}}
{{/vendorExtensions.isValueType}}
{{/vars}}
return hashCode;
}

View File

@ -7,7 +7,7 @@ Name | Type | Description | Notes
**EnumStringRequired** | **string** | |
**EnumInteger** | **int** | | [optional]
**EnumNumber** | **double** | | [optional]
**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**OuterEnum** | **OuterEnum** | | [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)

View File

@ -116,8 +116,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Code != null)
hashCode = hashCode * 59 + this.Code.GetHashCode();
hashCode = hashCode * 59 + this.Code.GetHashCode();
if (this.Type != null)
hashCode = hashCode * 59 + this.Type.GetHashCode();
if (this.Message != null)

View File

@ -106,8 +106,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
if (this.Declawed != null)
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Declawed != null)
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
return hashCode;
}
}

View File

@ -121,8 +121,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
return hashCode;

View File

@ -142,6 +142,11 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="enum_number", EmitDefaultValue=false)]
public EnumNumberEnum? EnumNumber { get; set; }
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum? OuterEnum { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EnumTest" /> class.
/// </summary>
[JsonConstructorAttribute]
@ -163,12 +168,6 @@ namespace Org.OpenAPITools.Model
this.OuterEnum = outerEnum;
}
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum OuterEnum { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
@ -228,8 +227,7 @@ namespace Org.OpenAPITools.Model
hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode();
hashCode = hashCode * 59 + this.EnumInteger.GetHashCode();
hashCode = hashCode * 59 + this.EnumNumber.GetHashCode();
if (this.OuterEnum != null)
hashCode = hashCode * 59 + this.OuterEnum.GetHashCode();
hashCode = hashCode * 59 + this.OuterEnum.GetHashCode();
return hashCode;
}
}

View File

@ -248,18 +248,12 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Integer != null)
hashCode = hashCode * 59 + this.Integer.GetHashCode();
if (this.Int32 != null)
hashCode = hashCode * 59 + this.Int32.GetHashCode();
if (this.Int64 != null)
hashCode = hashCode * 59 + this.Int64.GetHashCode();
if (this.Number != null)
hashCode = hashCode * 59 + this.Number.GetHashCode();
if (this.Float != null)
hashCode = hashCode * 59 + this.Float.GetHashCode();
if (this.Double != null)
hashCode = hashCode * 59 + this.Double.GetHashCode();
hashCode = hashCode * 59 + this.Integer.GetHashCode();
hashCode = hashCode * 59 + this.Int32.GetHashCode();
hashCode = hashCode * 59 + this.Int64.GetHashCode();
hashCode = hashCode * 59 + this.Number.GetHashCode();
hashCode = hashCode * 59 + this.Float.GetHashCode();
hashCode = hashCode * 59 + this.Double.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)

View File

@ -107,8 +107,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Class != null)
hashCode = hashCode * 59 + this.Class.GetHashCode();
return hashCode;

View File

@ -135,14 +135,11 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this._Name != null)
hashCode = hashCode * 59 + this._Name.GetHashCode();
if (this.SnakeCase != null)
hashCode = hashCode * 59 + this.SnakeCase.GetHashCode();
hashCode = hashCode * 59 + this._Name.GetHashCode();
hashCode = hashCode * 59 + this.SnakeCase.GetHashCode();
if (this.Property != null)
hashCode = hashCode * 59 + this.Property.GetHashCode();
if (this._123Number != null)
hashCode = hashCode * 59 + this._123Number.GetHashCode();
hashCode = hashCode * 59 + this._123Number.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.JustNumber != null)
hashCode = hashCode * 59 + this.JustNumber.GetHashCode();
hashCode = hashCode * 59 + this.JustNumber.GetHashCode();
return hashCode;
}
}

View File

@ -178,17 +178,13 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.PetId != null)
hashCode = hashCode * 59 + this.PetId.GetHashCode();
if (this.Quantity != null)
hashCode = hashCode * 59 + this.Quantity.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.PetId.GetHashCode();
hashCode = hashCode * 59 + this.Quantity.GetHashCode();
if (this.ShipDate != null)
hashCode = hashCode * 59 + this.ShipDate.GetHashCode();
hashCode = hashCode * 59 + this.Status.GetHashCode();
if (this.Complete != null)
hashCode = hashCode * 59 + this.Complete.GetHashCode();
hashCode = hashCode * 59 + this.Complete.GetHashCode();
return hashCode;
}
}

View File

@ -116,12 +116,10 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.MyNumber != null)
hashCode = hashCode * 59 + this.MyNumber.GetHashCode();
hashCode = hashCode * 59 + this.MyNumber.GetHashCode();
if (this.MyString != null)
hashCode = hashCode * 59 + this.MyString.GetHashCode();
if (this.MyBoolean != null)
hashCode = hashCode * 59 + this.MyBoolean.GetHashCode();
hashCode = hashCode * 59 + this.MyBoolean.GetHashCode();
return hashCode;
}
}

View File

@ -193,8 +193,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Category != null)
hashCode = hashCode * 59 + this.Category.GetHashCode();
if (this.Name != null)

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this._Return != null)
hashCode = hashCode * 59 + this._Return.GetHashCode();
hashCode = hashCode * 59 + this._Return.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.SpecialPropertyName != null)
hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode();
hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode();
return hashCode;
}
}

View File

@ -107,8 +107,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
return hashCode;

View File

@ -186,12 +186,9 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
if (this.NumberItem != null)
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
if (this.IntegerItem != null)
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
if (this.BoolItem != null)
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)
hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
return hashCode;

View File

@ -186,12 +186,9 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
if (this.NumberItem != null)
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
if (this.IntegerItem != null)
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
if (this.BoolItem != null)
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)
hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
return hashCode;

View File

@ -162,8 +162,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Username != null)
hashCode = hashCode * 59 + this.Username.GetHashCode();
if (this.FirstName != null)
@ -176,8 +175,7 @@ namespace Org.OpenAPITools.Model
hashCode = hashCode * 59 + this.Password.GetHashCode();
if (this.Phone != null)
hashCode = hashCode * 59 + this.Phone.GetHashCode();
if (this.UserStatus != null)
hashCode = hashCode * 59 + this.UserStatus.GetHashCode();
hashCode = hashCode * 59 + this.UserStatus.GetHashCode();
return hashCode;
}
}

View File

@ -352,58 +352,43 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.AttributeString != null)
hashCode = hashCode * 59 + this.AttributeString.GetHashCode();
if (this.AttributeNumber != null)
hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode();
if (this.AttributeInteger != null)
hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode();
if (this.AttributeBoolean != null)
hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode();
hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode();
hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode();
hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode();
if (this.WrappedArray != null)
hashCode = hashCode * 59 + this.WrappedArray.GetHashCode();
if (this.NameString != null)
hashCode = hashCode * 59 + this.NameString.GetHashCode();
if (this.NameNumber != null)
hashCode = hashCode * 59 + this.NameNumber.GetHashCode();
if (this.NameInteger != null)
hashCode = hashCode * 59 + this.NameInteger.GetHashCode();
if (this.NameBoolean != null)
hashCode = hashCode * 59 + this.NameBoolean.GetHashCode();
hashCode = hashCode * 59 + this.NameNumber.GetHashCode();
hashCode = hashCode * 59 + this.NameInteger.GetHashCode();
hashCode = hashCode * 59 + this.NameBoolean.GetHashCode();
if (this.NameArray != null)
hashCode = hashCode * 59 + this.NameArray.GetHashCode();
if (this.NameWrappedArray != null)
hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode();
if (this.PrefixString != null)
hashCode = hashCode * 59 + this.PrefixString.GetHashCode();
if (this.PrefixNumber != null)
hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode();
if (this.PrefixInteger != null)
hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode();
if (this.PrefixBoolean != null)
hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode();
hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode();
hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode();
if (this.PrefixArray != null)
hashCode = hashCode * 59 + this.PrefixArray.GetHashCode();
if (this.PrefixWrappedArray != null)
hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode();
if (this.NamespaceString != null)
hashCode = hashCode * 59 + this.NamespaceString.GetHashCode();
if (this.NamespaceNumber != null)
hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode();
if (this.NamespaceInteger != null)
hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode();
if (this.NamespaceBoolean != null)
hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode();
if (this.NamespaceArray != null)
hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode();
if (this.NamespaceWrappedArray != null)
hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode();
if (this.PrefixNsString != null)
hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode();
if (this.PrefixNsNumber != null)
hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode();
if (this.PrefixNsInteger != null)
hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode();
if (this.PrefixNsBoolean != null)
hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode();
if (this.PrefixNsArray != null)
hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode();
if (this.PrefixNsWrappedArray != null)

View File

@ -7,7 +7,7 @@ Name | Type | Description | Notes
**EnumStringRequired** | **string** | |
**EnumInteger** | **int** | | [optional]
**EnumNumber** | **double** | | [optional]
**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**OuterEnum** | **OuterEnum** | | [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)

View File

@ -116,8 +116,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Code != null)
hashCode = hashCode * 59 + this.Code.GetHashCode();
hashCode = hashCode * 59 + this.Code.GetHashCode();
if (this.Type != null)
hashCode = hashCode * 59 + this.Type.GetHashCode();
if (this.Message != null)

View File

@ -106,8 +106,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
if (this.Declawed != null)
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Declawed != null)
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
return hashCode;
}
}

View File

@ -121,8 +121,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
return hashCode;

View File

@ -142,6 +142,11 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="enum_number", EmitDefaultValue=false)]
public EnumNumberEnum? EnumNumber { get; set; }
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum? OuterEnum { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EnumTest" /> class.
/// </summary>
[JsonConstructorAttribute]
@ -163,12 +168,6 @@ namespace Org.OpenAPITools.Model
this.OuterEnum = outerEnum;
}
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum OuterEnum { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
@ -228,8 +227,7 @@ namespace Org.OpenAPITools.Model
hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode();
hashCode = hashCode * 59 + this.EnumInteger.GetHashCode();
hashCode = hashCode * 59 + this.EnumNumber.GetHashCode();
if (this.OuterEnum != null)
hashCode = hashCode * 59 + this.OuterEnum.GetHashCode();
hashCode = hashCode * 59 + this.OuterEnum.GetHashCode();
return hashCode;
}
}

View File

@ -248,18 +248,12 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Integer != null)
hashCode = hashCode * 59 + this.Integer.GetHashCode();
if (this.Int32 != null)
hashCode = hashCode * 59 + this.Int32.GetHashCode();
if (this.Int64 != null)
hashCode = hashCode * 59 + this.Int64.GetHashCode();
if (this.Number != null)
hashCode = hashCode * 59 + this.Number.GetHashCode();
if (this.Float != null)
hashCode = hashCode * 59 + this.Float.GetHashCode();
if (this.Double != null)
hashCode = hashCode * 59 + this.Double.GetHashCode();
hashCode = hashCode * 59 + this.Integer.GetHashCode();
hashCode = hashCode * 59 + this.Int32.GetHashCode();
hashCode = hashCode * 59 + this.Int64.GetHashCode();
hashCode = hashCode * 59 + this.Number.GetHashCode();
hashCode = hashCode * 59 + this.Float.GetHashCode();
hashCode = hashCode * 59 + this.Double.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)

View File

@ -107,8 +107,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.Class != null)
hashCode = hashCode * 59 + this.Class.GetHashCode();
return hashCode;

View File

@ -135,14 +135,11 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this._Name != null)
hashCode = hashCode * 59 + this._Name.GetHashCode();
if (this.SnakeCase != null)
hashCode = hashCode * 59 + this.SnakeCase.GetHashCode();
hashCode = hashCode * 59 + this._Name.GetHashCode();
hashCode = hashCode * 59 + this.SnakeCase.GetHashCode();
if (this.Property != null)
hashCode = hashCode * 59 + this.Property.GetHashCode();
if (this._123Number != null)
hashCode = hashCode * 59 + this._123Number.GetHashCode();
hashCode = hashCode * 59 + this._123Number.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.JustNumber != null)
hashCode = hashCode * 59 + this.JustNumber.GetHashCode();
hashCode = hashCode * 59 + this.JustNumber.GetHashCode();
return hashCode;
}
}

View File

@ -178,17 +178,13 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.PetId != null)
hashCode = hashCode * 59 + this.PetId.GetHashCode();
if (this.Quantity != null)
hashCode = hashCode * 59 + this.Quantity.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.PetId.GetHashCode();
hashCode = hashCode * 59 + this.Quantity.GetHashCode();
if (this.ShipDate != null)
hashCode = hashCode * 59 + this.ShipDate.GetHashCode();
hashCode = hashCode * 59 + this.Status.GetHashCode();
if (this.Complete != null)
hashCode = hashCode * 59 + this.Complete.GetHashCode();
hashCode = hashCode * 59 + this.Complete.GetHashCode();
return hashCode;
}
}

View File

@ -116,12 +116,10 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.MyNumber != null)
hashCode = hashCode * 59 + this.MyNumber.GetHashCode();
hashCode = hashCode * 59 + this.MyNumber.GetHashCode();
if (this.MyString != null)
hashCode = hashCode * 59 + this.MyString.GetHashCode();
if (this.MyBoolean != null)
hashCode = hashCode * 59 + this.MyBoolean.GetHashCode();
hashCode = hashCode * 59 + this.MyBoolean.GetHashCode();
return hashCode;
}
}

View File

@ -193,8 +193,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Category != null)
hashCode = hashCode * 59 + this.Category.GetHashCode();
if (this.Name != null)

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this._Return != null)
hashCode = hashCode * 59 + this._Return.GetHashCode();
hashCode = hashCode * 59 + this._Return.GetHashCode();
return hashCode;
}
}

View File

@ -98,8 +98,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.SpecialPropertyName != null)
hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode();
hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode();
return hashCode;
}
}

View File

@ -107,8 +107,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
return hashCode;

View File

@ -186,12 +186,9 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
if (this.NumberItem != null)
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
if (this.IntegerItem != null)
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
if (this.BoolItem != null)
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)
hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
return hashCode;

View File

@ -186,12 +186,9 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
if (this.NumberItem != null)
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
if (this.IntegerItem != null)
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
if (this.BoolItem != null)
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)
hashCode = hashCode * 59 + this.ArrayItem.GetHashCode();
return hashCode;

View File

@ -162,8 +162,7 @@ namespace Org.OpenAPITools.Model
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Username != null)
hashCode = hashCode * 59 + this.Username.GetHashCode();
if (this.FirstName != null)
@ -176,8 +175,7 @@ namespace Org.OpenAPITools.Model
hashCode = hashCode * 59 + this.Password.GetHashCode();
if (this.Phone != null)
hashCode = hashCode * 59 + this.Phone.GetHashCode();
if (this.UserStatus != null)
hashCode = hashCode * 59 + this.UserStatus.GetHashCode();
hashCode = hashCode * 59 + this.UserStatus.GetHashCode();
return hashCode;
}
}

View File

@ -352,58 +352,43 @@ namespace Org.OpenAPITools.Model
int hashCode = 41;
if (this.AttributeString != null)
hashCode = hashCode * 59 + this.AttributeString.GetHashCode();
if (this.AttributeNumber != null)
hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode();
if (this.AttributeInteger != null)
hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode();
if (this.AttributeBoolean != null)
hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode();
hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode();
hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode();
hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode();
if (this.WrappedArray != null)
hashCode = hashCode * 59 + this.WrappedArray.GetHashCode();
if (this.NameString != null)
hashCode = hashCode * 59 + this.NameString.GetHashCode();
if (this.NameNumber != null)
hashCode = hashCode * 59 + this.NameNumber.GetHashCode();
if (this.NameInteger != null)
hashCode = hashCode * 59 + this.NameInteger.GetHashCode();
if (this.NameBoolean != null)
hashCode = hashCode * 59 + this.NameBoolean.GetHashCode();
hashCode = hashCode * 59 + this.NameNumber.GetHashCode();
hashCode = hashCode * 59 + this.NameInteger.GetHashCode();
hashCode = hashCode * 59 + this.NameBoolean.GetHashCode();
if (this.NameArray != null)
hashCode = hashCode * 59 + this.NameArray.GetHashCode();
if (this.NameWrappedArray != null)
hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode();
if (this.PrefixString != null)
hashCode = hashCode * 59 + this.PrefixString.GetHashCode();
if (this.PrefixNumber != null)
hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode();
if (this.PrefixInteger != null)
hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode();
if (this.PrefixBoolean != null)
hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode();
hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode();
hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode();
if (this.PrefixArray != null)
hashCode = hashCode * 59 + this.PrefixArray.GetHashCode();
if (this.PrefixWrappedArray != null)
hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode();
if (this.NamespaceString != null)
hashCode = hashCode * 59 + this.NamespaceString.GetHashCode();
if (this.NamespaceNumber != null)
hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode();
if (this.NamespaceInteger != null)
hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode();
if (this.NamespaceBoolean != null)
hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode();
hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode();
if (this.NamespaceArray != null)
hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode();
if (this.NamespaceWrappedArray != null)
hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode();
if (this.PrefixNsString != null)
hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode();
if (this.PrefixNsNumber != null)
hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode();
if (this.PrefixNsInteger != null)
hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode();
if (this.PrefixNsBoolean != null)
hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode();
hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode();
if (this.PrefixNsArray != null)
hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode();
if (this.PrefixNsWrappedArray != null)

View File

@ -9,7 +9,7 @@ Name | Type | Description | Notes
**EnumStringRequired** | **string** | |
**EnumInteger** | **int?** | | [optional]
**EnumNumber** | **double?** | | [optional]
**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**OuterEnum** | **OuterEnum** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to API list]](../README.md#documentation-for-api-endpoints)

View File

@ -140,6 +140,11 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="enum_number", EmitDefaultValue=false)]
public EnumNumberEnum? EnumNumber { get; set; }
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum? OuterEnum { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EnumTest" /> class.
/// </summary>
[JsonConstructorAttribute]
@ -174,11 +179,6 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum OuterEnum { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -157,9 +157,11 @@ Class | Method | HTTP request | Description
- [Model.ArrayTest](docs/ArrayTest.md)
- [Model.Capitalization](docs/Capitalization.md)
- [Model.Cat](docs/Cat.md)
- [Model.CatAllOf](docs/CatAllOf.md)
- [Model.Category](docs/Category.md)
- [Model.ClassModel](docs/ClassModel.md)
- [Model.Dog](docs/Dog.md)
- [Model.DogAllOf](docs/DogAllOf.md)
- [Model.EnumArrays](docs/EnumArrays.md)
- [Model.EnumClass](docs/EnumClass.md)
- [Model.EnumTest](docs/EnumTest.md)

View File

@ -0,0 +1,13 @@
# Org.OpenAPITools.Model.CatAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Declawed** | **bool?** | | [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)

View File

@ -0,0 +1,13 @@
# Org.OpenAPITools.Model.DogAllOf
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Breed** | **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)

View File

@ -9,7 +9,7 @@ Name | Type | Description | Notes
**EnumStringRequired** | **string** | |
**EnumInteger** | **int?** | | [optional]
**EnumNumber** | **double?** | | [optional]
**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**OuterEnum** | **OuterEnum** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to API list]](../README.md#documentation-for-api-endpoints)

View File

@ -0,0 +1,80 @@
/*
* 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 CatAllOf
/// </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>
[TestFixture]
public class CatAllOfTests
{
// TODO uncomment below to declare an instance variable for CatAllOf
//private CatAllOf instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of CatAllOf
//instance = new CatAllOf();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of CatAllOf
/// </summary>
[Test]
public void CatAllOfInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" CatAllOf
//Assert.IsInstanceOfType<CatAllOf> (instance, "variable 'instance' is a CatAllOf");
}
/// <summary>
/// Test the property 'Declawed'
/// </summary>
[Test]
public void DeclawedTest()
{
// TODO unit test for the property 'Declawed'
}
}
}

View File

@ -0,0 +1,80 @@
/*
* 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 DogAllOf
/// </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>
[TestFixture]
public class DogAllOfTests
{
// TODO uncomment below to declare an instance variable for DogAllOf
//private DogAllOf instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of DogAllOf
//instance = new DogAllOf();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of DogAllOf
/// </summary>
[Test]
public void DogAllOfInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" DogAllOf
//Assert.IsInstanceOfType<DogAllOf> (instance, "variable 'instance' is a DogAllOf");
}
/// <summary>
/// Test the property 'Breed'
/// </summary>
[Test]
public void BreedTest()
{
// TODO unit test for the property 'Breed'
}
}
}

View File

@ -4,7 +4,7 @@ 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: \" \\
OpenAPI spec version: 1.0.0
The version of the OpenAPI document: 1.0.0
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -0,0 +1,115 @@
/*
* 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>
/// CatAllOf
/// </summary>
[DataContract]
public partial class CatAllOf : IEquatable<CatAllOf>
{
/// <summary>
/// Initializes a new instance of the <see cref="CatAllOf" /> class.
/// </summary>
/// <param name="declawed">declawed.</param>
public CatAllOf(bool? declawed = default(bool?))
{
this.Declawed = declawed;
}
/// <summary>
/// Gets or Sets Declawed
/// </summary>
[DataMember(Name="declawed", EmitDefaultValue=false)]
public bool? Declawed { get; set; }
/// <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 CatAllOf {\n");
sb.Append(" Declawed: ").Append(Declawed).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 CatAllOf);
}
/// <summary>
/// Returns true if CatAllOf instances are equal
/// </summary>
/// <param name="input">Instance of CatAllOf to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CatAllOf input)
{
if (input == null)
return false;
return
(
this.Declawed == input.Declawed ||
(this.Declawed != null &&
this.Declawed.Equals(input.Declawed))
);
}
/// <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.Declawed != null)
hashCode = hashCode * 59 + this.Declawed.GetHashCode();
return hashCode;
}
}
}
}

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -0,0 +1,115 @@
/*
* 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>
/// DogAllOf
/// </summary>
[DataContract]
public partial class DogAllOf : IEquatable<DogAllOf>
{
/// <summary>
/// Initializes a new instance of the <see cref="DogAllOf" /> class.
/// </summary>
/// <param name="breed">breed.</param>
public DogAllOf(string breed = default(string))
{
this.Breed = breed;
}
/// <summary>
/// Gets or Sets Breed
/// </summary>
[DataMember(Name="breed", EmitDefaultValue=false)]
public string Breed { get; set; }
/// <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 DogAllOf {\n");
sb.Append(" Breed: ").Append(Breed).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 DogAllOf);
}
/// <summary>
/// Returns true if DogAllOf instances are equal
/// </summary>
/// <param name="input">Instance of DogAllOf to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(DogAllOf input)
{
if (input == null)
return false;
return
(
this.Breed == input.Breed ||
(this.Breed != null &&
this.Breed.Equals(input.Breed))
);
}
/// <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.Breed != null)
hashCode = hashCode * 59 + this.Breed.GetHashCode();
return hashCode;
}
}
}
}

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@ -140,6 +140,11 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="enum_number", EmitDefaultValue=false)]
public EnumNumberEnum? EnumNumber { get; set; }
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum? OuterEnum { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EnumTest" /> class.
/// </summary>
[JsonConstructorAttribute]
@ -174,11 +179,6 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Gets or Sets OuterEnum
/// </summary>
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
public OuterEnum OuterEnum { get; set; }
/// <summary>
/// Returns the string presentation of the object

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

View File

@ -3,7 +3,7 @@
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

Some files were not shown because too many files have changed in this diff Show More