forked from loafle/openapi-generator-original
[charp-netcore] Constructor Improvements (#11502)
* refactor nrt annotation * enable nrt by default in .net6.0+ * use shorter nrt annotation * build samples * removed debugging lines * fixed model and operatoin constructors * reverted a commented line for comparison * created library modelGeneric, removed debugging lines * build samples * build all samples * avoid breaking changes * publish and build samples * added line break
This commit is contained in:
@@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|packageVersion|C# package version.| |1.0.0|
|
||||
|releaseNote|Release note, default to 'Minor update'.| |Minor update|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|sourceFolder|source folder for generated code| |src|
|
||||
|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netstandard2.1**</dt><dd>.NET Standard 2.1 compatible</dd><dt>**netcoreapp2.0**</dt><dd>.NET Core 2.0 compatible (deprecated)</dd><dt>**netcoreapp2.1**</dt><dd>.NET Core 2.1 compatible (deprecated)</dd><dt>**netcoreapp3.0**</dt><dd>.NET Core 3.0 compatible (deprecated)</dd><dt>**netcoreapp3.1**</dt><dd>.NET Core 3.1 compatible</dd><dt>**net47**</dt><dd>.NET Framework 4.7 compatible</dd><dt>**net5.0**</dt><dd>.NET 5.0 compatible</dd><dt>**net6.0**</dt><dd>.NET 6.0 compatible</dd></dl>|netstandard2.0|
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|
||||
@@ -214,6 +214,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
valueTypes = new HashSet<>(
|
||||
Arrays.asList("decimal", "bool", "int", "float", "long", "double")
|
||||
);
|
||||
|
||||
this.setSortParamsByRequiredFlag(true);
|
||||
|
||||
// do it only on newer libraries to avoid breaking changes
|
||||
// this.setSortModelPropertiesByRequiredFlag(true);
|
||||
}
|
||||
|
||||
public void setReturnICollection(boolean returnICollection) {
|
||||
@@ -396,7 +401,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
@Override
|
||||
protected ImmutableMap.Builder<String, Lambda> addMustacheLambdas() {
|
||||
return super.addMustacheLambdas()
|
||||
.put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true));
|
||||
.put("camelcase_param", new CamelCaseLambda().generator(this).escapeAsParamName(true))
|
||||
.put("required", new RequiredParameterLambda().generator(this))
|
||||
.put("optional", new OptionalParameterLambda().generator(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1167,16 +1174,18 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
additionalProperties.put("nrt", nullReferenceTypesFlag);
|
||||
|
||||
if (nullReferenceTypesFlag){
|
||||
this.nullableType.add("string");
|
||||
additionalProperties.put("nrt?", "?");
|
||||
additionalProperties.put("nrt!", "!");
|
||||
} else {
|
||||
this.nullableType.remove("string");
|
||||
additionalProperties.remove("nrt?");
|
||||
additionalProperties.remove("nrt!");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getNullableReferencesTypes(){
|
||||
return this.nullReferenceTypesFlag;
|
||||
}
|
||||
|
||||
public void setInterfacePrefix(final String interfacePrefix) {
|
||||
this.interfacePrefix = interfacePrefix;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ import com.samskivert.mustache.Mustache;
|
||||
import io.swagger.v3.oas.models.media.ArraySchema;
|
||||
import io.swagger.v3.oas.models.media.ComposedSchema;
|
||||
import io.swagger.v3.oas.models.media.Schema;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.servers.Server;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.meta.features.*;
|
||||
import org.openapitools.codegen.utils.ModelUtils;
|
||||
@@ -33,6 +35,9 @@ import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
@@ -247,10 +252,6 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC,
|
||||
this.hideGenerationTimestamp);
|
||||
|
||||
addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
|
||||
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC,
|
||||
this.sortParamsByRequiredFlag);
|
||||
|
||||
addSwitch(CodegenConstants.USE_DATETIME_OFFSET,
|
||||
CodegenConstants.USE_DATETIME_OFFSET_DESC,
|
||||
this.useDateTimeOffsetFlag);
|
||||
@@ -394,6 +395,40 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
// avoid breaking changes
|
||||
if (GENERICHOST.equals(getLibrary())){
|
||||
Comparator<CodegenProperty> comparatorByDefaultValue = new Comparator<CodegenProperty>() {
|
||||
@Override
|
||||
public int compare(CodegenProperty one, CodegenProperty another) {
|
||||
if (one.defaultValue == another.defaultValue)
|
||||
return 0;
|
||||
else if (Boolean.FALSE.equals(one.defaultValue))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
Comparator<CodegenProperty> comparatorByRequired = new Comparator<CodegenProperty>() {
|
||||
@Override
|
||||
public int compare(CodegenProperty one, CodegenProperty another) {
|
||||
if (one.required == another.required)
|
||||
return 0;
|
||||
else if (Boolean.TRUE.equals(one.required))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
Collections.sort(codegenModel.vars, comparatorByDefaultValue);
|
||||
Collections.sort(codegenModel.vars, comparatorByRequired);
|
||||
Collections.sort(codegenModel.allVars, comparatorByDefaultValue);
|
||||
Collections.sort(codegenModel.allVars, comparatorByRequired);
|
||||
Collections.sort(codegenModel.readWriteVars, comparatorByDefaultValue);
|
||||
Collections.sort(codegenModel.readWriteVars, comparatorByRequired);
|
||||
}
|
||||
|
||||
return codegenModel;
|
||||
}
|
||||
|
||||
@@ -598,6 +633,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
if (GENERICHOST.equals(getLibrary())){
|
||||
setLibrary(GENERICHOST);
|
||||
additionalProperties.put("useGenericHost", true);
|
||||
// all c# libraries should be doing this, but we only do it here to avoid breaking changes
|
||||
this.setSortModelPropertiesByRequiredFlag(true);
|
||||
} else if (RESTSHARP.equals(getLibrary())) {
|
||||
additionalProperties.put("useRestSharp", true);
|
||||
needsCustomHttpMethod = true;
|
||||
@@ -733,6 +770,44 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
addTestInstructions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenOperation fromOperation(String path,
|
||||
String httpMethod,
|
||||
Operation operation,
|
||||
List<Server> servers) {
|
||||
CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers);
|
||||
|
||||
if (!GENERICHOST.equals(getLibrary())){
|
||||
return op;
|
||||
}
|
||||
|
||||
Collections.sort(op.allParams, new Comparator<CodegenParameter>() {
|
||||
@Override
|
||||
public int compare(CodegenParameter one, CodegenParameter another) {
|
||||
if (one.defaultValue == another.defaultValue)
|
||||
return 0;
|
||||
else if (Boolean.FALSE.equals(one.defaultValue))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
Collections.sort(op.allParams, new Comparator<CodegenParameter>() {
|
||||
@Override
|
||||
public int compare(CodegenParameter one, CodegenParameter another) {
|
||||
if (one.required == another.required)
|
||||
return 0;
|
||||
else if (Boolean.TRUE.equals(one.required))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
return op;
|
||||
}
|
||||
|
||||
private void addTestInstructions(){
|
||||
if (GENERICHOST.equals(getLibrary())){
|
||||
additionalProperties.put("testInstructions",
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
* Copyright 2018 SmartBear Software
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.openapitools.codegen.templating.mustache;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import com.samskivert.mustache.Template;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.languages.AbstractCSharpCodegen;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
|
||||
/**
|
||||
* Appends trailing ? to a text fragement if not already present
|
||||
*
|
||||
* Register:
|
||||
* <pre>
|
||||
* additionalProperties.put("optional", new OptionalParameterLambda());
|
||||
* </pre>
|
||||
*
|
||||
* Use:
|
||||
* <pre>
|
||||
* {{#lambda.optional}}{{name}}{{/lambda.optional}}
|
||||
* </pre>
|
||||
*/
|
||||
public class OptionalParameterLambda implements Mustache.Lambda {
|
||||
private CodegenConfig generator = null;
|
||||
private Boolean escapeParam = false;
|
||||
|
||||
public OptionalParameterLambda() {}
|
||||
|
||||
public OptionalParameterLambda generator(final CodegenConfig generator) {
|
||||
this.generator = generator;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||
String text = fragment.execute();
|
||||
|
||||
if (this.generator instanceof AbstractCSharpCodegen){
|
||||
AbstractCSharpCodegen csharpGenerator = (AbstractCSharpCodegen) this.generator;
|
||||
if (csharpGenerator.getNullableReferencesTypes()){
|
||||
text = text.endsWith("?")
|
||||
? text
|
||||
: text + "?";
|
||||
}
|
||||
}
|
||||
|
||||
writer.write(text);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
* Copyright 2018 SmartBear Software
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.openapitools.codegen.templating.mustache;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import com.samskivert.mustache.Template;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||
|
||||
/**
|
||||
* Strips trailing ? from a text fragement
|
||||
*
|
||||
* Register:
|
||||
* <pre>
|
||||
* additionalProperties.put("required", new RequiredParameterLambda());
|
||||
* </pre>
|
||||
*
|
||||
* Use:
|
||||
* <pre>
|
||||
* {{#lambda.required}}{{name}}{{/lambda.required}}
|
||||
* </pre>
|
||||
*/
|
||||
public class RequiredParameterLambda implements Mustache.Lambda {
|
||||
private CodegenConfig generator = null;
|
||||
private Boolean escapeParam = false;
|
||||
|
||||
public RequiredParameterLambda() {}
|
||||
|
||||
public RequiredParameterLambda generator(final CodegenConfig generator) {
|
||||
this.generator = generator;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||
String text = fragment.execute();
|
||||
text = text.endsWith("?")
|
||||
? text.substring(0, text.length() - 1)
|
||||
: text;
|
||||
|
||||
writer.write(text);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,488 @@
|
||||
/// <summary>
|
||||
/// {{description}}{{^description}}{{classname}}{{/description}}
|
||||
/// </summary>
|
||||
[DataContract(Name = "{{{name}}}")]
|
||||
{{#discriminator}}
|
||||
[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
|
||||
{{#mappedModels}}
|
||||
[JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")]
|
||||
{{/mappedModels}}
|
||||
{{/discriminator}}
|
||||
{{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}}
|
||||
{
|
||||
{{#vars}}
|
||||
{{#items.isEnum}}
|
||||
{{#items}}
|
||||
{{^complexType}}
|
||||
{{>modelInnerEnum}}
|
||||
{{/complexType}}
|
||||
{{/items}}
|
||||
{{/items.isEnum}}
|
||||
{{#isEnum}}
|
||||
{{^complexType}}
|
||||
{{>modelInnerEnum}}
|
||||
{{/complexType}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
|
||||
/// <summary>
|
||||
/// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}}
|
||||
/// </summary>
|
||||
{{#description}}
|
||||
/// <value>{{.}}</value>
|
||||
{{/description}}
|
||||
{{^conditionalSerialization}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; set; }
|
||||
{{#isReadOnly}}
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
{{/conditionalSerialization}}
|
||||
{{#conditionalSerialization}}
|
||||
{{#isReadOnly}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
|
||||
{{^isReadOnly}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}}
|
||||
{
|
||||
get{ return _{{name}};}
|
||||
set
|
||||
{
|
||||
_{{name}} = value;
|
||||
_flag{{name}} = true;
|
||||
}
|
||||
}
|
||||
private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}};
|
||||
private bool _flag{{name}};
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return _flag{{name}};
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
{{/conditionalSerialization}}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
{{#hasRequired}}
|
||||
{{^hasOnlyReadOnly}}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
{{^isAdditionalPropertiesTrue}}
|
||||
protected {{classname}}() { }
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
protected {{classname}}()
|
||||
{
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
{{/hasOnlyReadOnly}}
|
||||
{{/hasRequired}}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
||||
/// </summary>
|
||||
{{#readWriteVars}}
|
||||
/// <param name="{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}">{{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}.</param>
|
||||
{{/readWriteVars}}
|
||||
{{#hasOnlyReadOnly}}
|
||||
[JsonConstructorAttribute]
|
||||
{{/hasOnlyReadOnly}}
|
||||
public {{classname}}({{#readWriteVars}}{{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^required}}{{^defaultValue}} = default{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}}
|
||||
{
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{^isReadOnly}}
|
||||
{{#required}}
|
||||
{{^conditionalSerialization}}
|
||||
{{^vendorExtensions.x-csharp-value-type}}
|
||||
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null)
|
||||
if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) {
|
||||
throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null");
|
||||
}
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{#vendorExtensions.x-csharp-value-type}}
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/conditionalSerialization}}
|
||||
{{#conditionalSerialization}}
|
||||
{{^vendorExtensions.x-csharp-value-type}}
|
||||
// to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null)
|
||||
if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) {
|
||||
throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null");
|
||||
}
|
||||
this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{#vendorExtensions.x-csharp-value-type}}
|
||||
this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/conditionalSerialization}}
|
||||
{{/required}}
|
||||
{{/isReadOnly}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{^isReadOnly}}
|
||||
{{^required}}
|
||||
{{#defaultValue}}
|
||||
{{^conditionalSerialization}}
|
||||
{{^vendorExtensions.x-csharp-value-type}}
|
||||
// use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? {{{defaultValue}}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{#vendorExtensions.x-csharp-value-type}}
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/conditionalSerialization}}
|
||||
{{/defaultValue}}
|
||||
{{^defaultValue}}
|
||||
{{^conditionalSerialization}}
|
||||
this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/conditionalSerialization}}
|
||||
{{#conditionalSerialization}}
|
||||
this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/conditionalSerialization}}
|
||||
{{/defaultValue}}
|
||||
{{/required}}
|
||||
{{/isReadOnly}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
}
|
||||
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{^isEnum}}
|
||||
/// <summary>
|
||||
/// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}}
|
||||
/// </summary>{{#description}}
|
||||
/// <value>{{.}}</value>{{/description}}
|
||||
{{^conditionalSerialization}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#isDate}}
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
{{/isDate}}
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }
|
||||
|
||||
{{#isReadOnly}}
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
{{/conditionalSerialization}}
|
||||
{{#conditionalSerialization}}
|
||||
{{#isReadOnly}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#isDate}}
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
{{/isDate}}
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{#isNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/isNullable}}{{^isNullable}}{{{dataType}}}{{/isNullable}} {{name}} { get; private set; }
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
{{^isReadOnly}}
|
||||
{{#isDate}}
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
{{/isDate}}
|
||||
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})]
|
||||
{{#deprecated}}
|
||||
[Obsolete]
|
||||
{{/deprecated}}
|
||||
public {{#required}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{/required}}{{^required}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/required}} {{name}}
|
||||
{
|
||||
get{ return _{{name}};}
|
||||
set
|
||||
{
|
||||
_{{name}} = value;
|
||||
_flag{{name}} = true;
|
||||
}
|
||||
}
|
||||
private {{{dataType}}} _{{name}};
|
||||
private bool _flag{{name}};
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as {{name}} should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerialize{{name}}()
|
||||
{
|
||||
return _flag{{name}};
|
||||
}
|
||||
{{/isReadOnly}}
|
||||
{{/conditionalSerialization}}
|
||||
{{/isEnum}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class {{classname}} {\n");
|
||||
{{#parent}}
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
sb.Append(" {{name}}: ").Append({{name}}).Append("\n");
|
||||
{{/vars}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
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 {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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)
|
||||
{
|
||||
{{#useCompareNetObjects}}
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual;
|
||||
{{/useCompareNetObjects}}
|
||||
{{^useCompareNetObjects}}
|
||||
return this.Equals(input as {{classname}});
|
||||
{{/useCompareNetObjects}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if {{classname}} instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of {{classname}} to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals({{classname}} input)
|
||||
{
|
||||
{{#useCompareNetObjects}}
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
{{/useCompareNetObjects}}
|
||||
{{^useCompareNetObjects}}
|
||||
if (input == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}}
|
||||
(
|
||||
this.{{name}} == input.{{name}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}
|
||||
(this.{{name}} != null &&
|
||||
this.{{name}}.Equals(input.{{name}}))
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
{{#vendorExtensions.x-is-value-type}}
|
||||
this.{{name}}.Equals(input.{{name}})
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}}
|
||||
(
|
||||
this.{{name}} == input.{{name}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}this.{{name}} != null &&
|
||||
input.{{name}} != null &&
|
||||
{{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
&& (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any());
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
{{/useCompareNetObjects}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
{{#parent}}
|
||||
int hashCode = base.GetHashCode();
|
||||
{{/parent}}
|
||||
{{^parent}}
|
||||
int hashCode = 41;
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
{{^vendorExtensions.x-is-value-type}}
|
||||
if (this.{{name}} != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.{{name}}.GetHashCode();
|
||||
}
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
{{#vendorExtensions.x-is-value-type}}
|
||||
hashCode = (hashCode * 59) + this.{{name}}.GetHashCode();
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
{{/vars}}
|
||||
{{#isAdditionalPropertiesTrue}}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
{{#validatable}}
|
||||
{{#discriminator}}
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> 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)
|
||||
{
|
||||
{{/discriminator}}
|
||||
{{^discriminator}}
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
{{/discriminator}}
|
||||
{{#parent}}
|
||||
{{^isArray}}
|
||||
{{^isMap}}
|
||||
foreach (var x in BaseValidate(validationContext))
|
||||
{
|
||||
yield return x;
|
||||
}
|
||||
{{/isMap}}
|
||||
{{/isArray}}
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
{{#hasValidation}}
|
||||
{{^isEnum}}
|
||||
{{#maxLength}}
|
||||
// {{{name}}} ({{{dataType}}}) maxLength
|
||||
if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}})
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" });
|
||||
}
|
||||
|
||||
{{/maxLength}}
|
||||
{{#minLength}}
|
||||
// {{{name}}} ({{{dataType}}}) minLength
|
||||
if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}})
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" });
|
||||
}
|
||||
|
||||
{{/minLength}}
|
||||
{{#maximum}}
|
||||
// {{{name}}} ({{{dataType}}}) maximum
|
||||
if (this.{{{name}}} > ({{{dataType}}}){{maximum}})
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
|
||||
}
|
||||
|
||||
{{/maximum}}
|
||||
{{#minimum}}
|
||||
// {{{name}}} ({{{dataType}}}) minimum
|
||||
if (this.{{{name}}} < ({{{dataType}}}){{minimum}})
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
|
||||
}
|
||||
|
||||
{{/minimum}}
|
||||
{{#pattern}}
|
||||
{{^isByteArray}}
|
||||
// {{{name}}} ({{{dataType}}}) pattern
|
||||
Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}});
|
||||
if (false == regex{{{name}}}.Match(this.{{{name}}}).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" });
|
||||
}
|
||||
|
||||
{{/isByteArray}}
|
||||
{{/pattern}}
|
||||
{{/isEnum}}
|
||||
{{/hasValidation}}
|
||||
{{/vars}}
|
||||
yield break;
|
||||
}
|
||||
{{/validatable}}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
<RepositoryType>git</RepositoryType>{{#releaseNote}}
|
||||
<PackageReleaseNotes>{{.}}</PackageReleaseNotes>{{/releaseNote}}{{#packageTags}}
|
||||
<PackageTags>{{{.}}}</PackageTags>{{/packageTags}}{{#nrt}}
|
||||
<Nullable>annotations</Nullable>{{/nrt}}
|
||||
<Nullable>{{#useGenericHost}}enable{{/useGenericHost}}{{^useGenericHost}}annotations{{/useGenericHost}}</Nullable>{{/nrt}}
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<RootNamespace>{{testPackageName}}</RootNamespace>
|
||||
<TargetFramework{{#multiTarget}}s{{/multiTarget}}>{{testTargetFramework}}</TargetFramework{{#multiTarget}}s{{/multiTarget}}>
|
||||
<IsPackable>false</IsPackable>{{#nrt}}
|
||||
<Nullable>annotations</Nullable>{{/nrt}}
|
||||
<Nullable>{{#useGenericHost}}enable{{/useGenericHost}}{{^useGenericHost}}annotations{{/useGenericHost}}</Nullable>{{/nrt}}
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
**Id** | **long** | | [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)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | | [optional]
|
||||
**PetType** | **string** | | [default to PetTypeEnum.ChildCat]
|
||||
**Name** | **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)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumString** | **string** | | [optional]
|
||||
**EnumStringRequired** | **string** | |
|
||||
**EnumString** | **string** | | [optional]
|
||||
**EnumInteger** | **int** | | [optional]
|
||||
**EnumIntegerOnly** | **int** | | [optional]
|
||||
**EnumNumber** | **double** | | [optional]
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Number** | **decimal** | |
|
||||
**Byte** | **byte[]** | |
|
||||
**Date** | **DateTime** | |
|
||||
**Password** | **string** | |
|
||||
**Integer** | **int** | | [optional]
|
||||
**Int32** | **int** | | [optional]
|
||||
**Int64** | **long** | | [optional]
|
||||
**Number** | **decimal** | |
|
||||
**Float** | **float** | | [optional]
|
||||
**Double** | **double** | | [optional]
|
||||
**Decimal** | **decimal** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **System.IO.Stream** | | [optional]
|
||||
**Date** | **DateTime** | |
|
||||
**DateTime** | **DateTime** | | [optional]
|
||||
**Uuid** | **Guid** | | [optional]
|
||||
**Password** | **string** | |
|
||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Cultivar** | **string** | |
|
||||
**Mealy** | **bool** | | [optional]
|
||||
**LengthCm** | **decimal** | |
|
||||
**Mealy** | **bool** | | [optional]
|
||||
**Sweet** | **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)
|
||||
|
||||
@@ -5,7 +5,7 @@ Just a string to inform instance is up and running. Make it nullable in hope to
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**NullableMessage** | [**string?**](string?.md) | | [optional]
|
||||
**NullableMessage** | **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)
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**HasBaleen** | **bool** | | [optional]
|
||||
**HasTeeth** | **bool** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
**Type** | **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)
|
||||
|
||||
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
||||
**IntegerProp** | **int?** | | [optional]
|
||||
**NumberProp** | **decimal?** | | [optional]
|
||||
**BooleanProp** | **bool?** | | [optional]
|
||||
**StringProp** | [**string?**](string?.md) | | [optional]
|
||||
**StringProp** | **string** | | [optional]
|
||||
**DateProp** | **DateTime?** | | [optional]
|
||||
**DatetimeProp** | **DateTime?** | | [optional]
|
||||
**ArrayNullableProp** | **List<Object>** | | [optional]
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Name** | **string** | |
|
||||
**PhotoUrls** | **List<string>** | |
|
||||
**Id** | **long** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**HasBaleen** | **bool** | | [optional]
|
||||
**HasTeeth** | **bool** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Type** | **string** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
**Type** | **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)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<RootNamespace>Org.OpenAPITools.Test</RootNamespace>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Nullable>annotations</Nullable>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapWithUndeclaredPropertiesAnytype3">mapWithUndeclaredPropertiesAnytype3.</param>
|
||||
/// <param name="emptyMap">an object with no declared properties and no undeclared properties, hence it's an empty map..</param>
|
||||
/// <param name="mapWithUndeclaredPropertiesString">mapWithUndeclaredPropertiesString.</param>
|
||||
public AdditionalPropertiesClass(Dictionary<string, string> mapProperty = default(Dictionary<string, string>), Dictionary<string, Dictionary<string, string>> mapOfMapProperty = default(Dictionary<string, Dictionary<string, string>>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary<string, Object> mapWithUndeclaredPropertiesAnytype3 = default(Dictionary<string, Object>), Object emptyMap = default(Object), Dictionary<string, string> mapWithUndeclaredPropertiesString = default(Dictionary<string, string>))
|
||||
public AdditionalPropertiesClass(Dictionary<string, string>? mapProperty = default, Dictionary<string, Dictionary<string, string>>? mapOfMapProperty = default, Object? anytype1 = default, Object? mapWithUndeclaredPropertiesAnytype1 = default, Object? mapWithUndeclaredPropertiesAnytype2 = default, Dictionary<string, Object>? mapWithUndeclaredPropertiesAnytype3 = default, Object? emptyMap = default, Dictionary<string, string>? mapWithUndeclaredPropertiesString = default)
|
||||
{
|
||||
this.MapProperty = mapProperty;
|
||||
this.MapOfMapProperty = mapOfMapProperty;
|
||||
@@ -60,50 +60,50 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets MapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_property", EmitDefaultValue = false)]
|
||||
public Dictionary<string, string> MapProperty { get; set; }
|
||||
public Dictionary<string, string>? MapProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapOfMapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_of_map_property", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Dictionary<string, string>> MapOfMapProperty { get; set; }
|
||||
public Dictionary<string, Dictionary<string, string>>? MapOfMapProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Anytype1
|
||||
/// </summary>
|
||||
[DataMember(Name = "anytype_1", EmitDefaultValue = true)]
|
||||
public Object Anytype1 { get; set; }
|
||||
public Object? Anytype1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype1
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)]
|
||||
public Object MapWithUndeclaredPropertiesAnytype1 { get; set; }
|
||||
public Object? MapWithUndeclaredPropertiesAnytype1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype2
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)]
|
||||
public Object MapWithUndeclaredPropertiesAnytype2 { get; set; }
|
||||
public Object? MapWithUndeclaredPropertiesAnytype2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype3
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Object> MapWithUndeclaredPropertiesAnytype3 { get; set; }
|
||||
public Dictionary<string, Object>? MapWithUndeclaredPropertiesAnytype3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// an object with no declared properties and no undeclared properties, hence it's an empty map.
|
||||
/// </summary>
|
||||
/// <value>an object with no declared properties and no undeclared properties, hence it's an empty map.</value>
|
||||
[DataMember(Name = "empty_map", EmitDefaultValue = false)]
|
||||
public Object EmptyMap { get; set; }
|
||||
public Object? EmptyMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, string> MapWithUndeclaredPropertiesString { get; set; }
|
||||
public Dictionary<string, string>? MapWithUndeclaredPropertiesString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -49,10 +49,15 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="className">className (required).</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
public Animal(string className = default(string), string color = "red")
|
||||
public Animal(string className, string? color = "red")
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
throw new ArgumentNullException("className is a required property for Animal and cannot be null");
|
||||
}
|
||||
this.ClassName = className;
|
||||
this.Color = color;
|
||||
// use default value if no "color" provided
|
||||
this.Color = color ?? "red";
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -66,7 +71,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Color
|
||||
/// </summary>
|
||||
[DataMember(Name = "color", EmitDefaultValue = false)]
|
||||
public string Color { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="code">code.</param>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="message">message.</param>
|
||||
public ApiResponse(int code = default(int), string type = default(string), string message = default(string))
|
||||
public ApiResponse(int? code = default, string? type = default, string? message = default)
|
||||
{
|
||||
this.Code = code;
|
||||
this.Type = type;
|
||||
@@ -50,19 +50,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Code
|
||||
/// </summary>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
public int Code { get; set; }
|
||||
public int? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
public string Type { get; set; }
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
public string Message { get; set; }
|
||||
public string? Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="cultivar">cultivar.</param>
|
||||
/// <param name="origin">origin.</param>
|
||||
public Apple(string cultivar = default(string), string origin = default(string))
|
||||
public Apple(string? cultivar = default, string? origin = default)
|
||||
{
|
||||
this.Cultivar = cultivar;
|
||||
this.Origin = origin;
|
||||
@@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
[DataMember(Name = "cultivar", EmitDefaultValue = false)]
|
||||
public string Cultivar { get; set; }
|
||||
public string? Cultivar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Origin
|
||||
/// </summary>
|
||||
[DataMember(Name = "origin", EmitDefaultValue = false)]
|
||||
public string Origin { get; set; }
|
||||
public string? Origin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -42,8 +42,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="cultivar">cultivar (required).</param>
|
||||
/// <param name="mealy">mealy.</param>
|
||||
public AppleReq(string cultivar = default(string), bool mealy = default(bool))
|
||||
public AppleReq(string cultivar, bool? mealy = default)
|
||||
{
|
||||
// to ensure "cultivar" is required (not null)
|
||||
if (cultivar == null) {
|
||||
throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null");
|
||||
}
|
||||
this.Cultivar = cultivar;
|
||||
this.Mealy = mealy;
|
||||
}
|
||||
@@ -58,7 +62,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Mealy
|
||||
/// </summary>
|
||||
[DataMember(Name = "mealy", EmitDefaultValue = true)]
|
||||
public bool Mealy { get; set; }
|
||||
public bool? Mealy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ArrayOfArrayOfNumberOnly" /> class.
|
||||
/// </summary>
|
||||
/// <param name="arrayArrayNumber">arrayArrayNumber.</param>
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber = default(List<List<decimal>>))
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>>? arrayArrayNumber = default)
|
||||
{
|
||||
this.ArrayArrayNumber = arrayArrayNumber;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayArrayNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)]
|
||||
public List<List<decimal>> ArrayArrayNumber { get; set; }
|
||||
public List<List<decimal>>? ArrayArrayNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ArrayOfNumberOnly" /> class.
|
||||
/// </summary>
|
||||
/// <param name="arrayNumber">arrayNumber.</param>
|
||||
public ArrayOfNumberOnly(List<decimal> arrayNumber = default(List<decimal>))
|
||||
public ArrayOfNumberOnly(List<decimal>? arrayNumber = default)
|
||||
{
|
||||
this.ArrayNumber = arrayNumber;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "ArrayNumber", EmitDefaultValue = false)]
|
||||
public List<decimal> ArrayNumber { get; set; }
|
||||
public List<decimal>? ArrayNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="arrayOfString">arrayOfString.</param>
|
||||
/// <param name="arrayArrayOfInteger">arrayArrayOfInteger.</param>
|
||||
/// <param name="arrayArrayOfModel">arrayArrayOfModel.</param>
|
||||
public ArrayTest(List<string> arrayOfString = default(List<string>), List<List<long>> arrayArrayOfInteger = default(List<List<long>>), List<List<ReadOnlyFirst>> arrayArrayOfModel = default(List<List<ReadOnlyFirst>>))
|
||||
public ArrayTest(List<string>? arrayOfString = default, List<List<long>>? arrayArrayOfInteger = default, List<List<ReadOnlyFirst>>? arrayArrayOfModel = default)
|
||||
{
|
||||
this.ArrayOfString = arrayOfString;
|
||||
this.ArrayArrayOfInteger = arrayArrayOfInteger;
|
||||
@@ -50,19 +50,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayOfString
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_of_string", EmitDefaultValue = false)]
|
||||
public List<string> ArrayOfString { get; set; }
|
||||
public List<string>? ArrayOfString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfInteger
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)]
|
||||
public List<List<long>> ArrayArrayOfInteger { get; set; }
|
||||
public List<List<long>>? ArrayArrayOfInteger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfModel
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_array_of_model", EmitDefaultValue = false)]
|
||||
public List<List<ReadOnlyFirst>> ArrayArrayOfModel { get; set; }
|
||||
public List<List<ReadOnlyFirst>>? ArrayArrayOfModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Banana" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lengthCm">lengthCm.</param>
|
||||
public Banana(decimal lengthCm = default(decimal))
|
||||
public Banana(decimal? lengthCm = default)
|
||||
{
|
||||
this.LengthCm = lengthCm;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets LengthCm
|
||||
/// </summary>
|
||||
[DataMember(Name = "lengthCm", EmitDefaultValue = false)]
|
||||
public decimal LengthCm { get; set; }
|
||||
public decimal? LengthCm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="lengthCm">lengthCm (required).</param>
|
||||
/// <param name="sweet">sweet.</param>
|
||||
public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool))
|
||||
public BananaReq(decimal lengthCm, bool? sweet = default)
|
||||
{
|
||||
this.LengthCm = lengthCm;
|
||||
this.Sweet = sweet;
|
||||
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Sweet
|
||||
/// </summary>
|
||||
[DataMember(Name = "sweet", EmitDefaultValue = true)]
|
||||
public bool Sweet { get; set; }
|
||||
public bool? Sweet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
|
||||
@@ -44,8 +44,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="BasquePig" /> class.
|
||||
/// </summary>
|
||||
/// <param name="className">className (required).</param>
|
||||
public BasquePig(string className = default(string))
|
||||
public BasquePig(string className)
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
throw new ArgumentNullException("className is a required property for BasquePig and cannot be null");
|
||||
}
|
||||
this.ClassName = className;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="capitalSnake">capitalSnake.</param>
|
||||
/// <param name="sCAETHFlowPoints">sCAETHFlowPoints.</param>
|
||||
/// <param name="aTTNAME">Name of the pet .</param>
|
||||
public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string))
|
||||
public Capitalization(string? smallCamel = default, string? capitalCamel = default, string? smallSnake = default, string? capitalSnake = default, string? sCAETHFlowPoints = default, string? aTTNAME = default)
|
||||
{
|
||||
this.SmallCamel = smallCamel;
|
||||
this.CapitalCamel = capitalCamel;
|
||||
@@ -56,38 +56,38 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets SmallCamel
|
||||
/// </summary>
|
||||
[DataMember(Name = "smallCamel", EmitDefaultValue = false)]
|
||||
public string SmallCamel { get; set; }
|
||||
public string? SmallCamel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalCamel
|
||||
/// </summary>
|
||||
[DataMember(Name = "CapitalCamel", EmitDefaultValue = false)]
|
||||
public string CapitalCamel { get; set; }
|
||||
public string? CapitalCamel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SmallSnake
|
||||
/// </summary>
|
||||
[DataMember(Name = "small_Snake", EmitDefaultValue = false)]
|
||||
public string SmallSnake { get; set; }
|
||||
public string? SmallSnake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalSnake
|
||||
/// </summary>
|
||||
[DataMember(Name = "Capital_Snake", EmitDefaultValue = false)]
|
||||
public string CapitalSnake { get; set; }
|
||||
public string? CapitalSnake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SCAETHFlowPoints
|
||||
/// </summary>
|
||||
[DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)]
|
||||
public string SCAETHFlowPoints { get; set; }
|
||||
public string? SCAETHFlowPoints { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the pet
|
||||
/// </summary>
|
||||
/// <value>Name of the pet </value>
|
||||
[DataMember(Name = "ATT_NAME", EmitDefaultValue = false)]
|
||||
public string ATT_NAME { get; set; }
|
||||
public string? ATT_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Cat" /> class.
|
||||
/// </summary>
|
||||
/// <param name="declawed">declawed.</param>
|
||||
/// <param name="className">className (required) (default to "Cat").</param>
|
||||
/// <param name="declawed">declawed.</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color)
|
||||
public Cat(string className = "Cat", bool? declawed = default, string? color = "red") : base(className, color)
|
||||
{
|
||||
this.Declawed = declawed;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Declawed
|
||||
/// </summary>
|
||||
[DataMember(Name = "declawed", EmitDefaultValue = true)]
|
||||
public bool Declawed { get; set; }
|
||||
public bool? Declawed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="CatAllOf" /> class.
|
||||
/// </summary>
|
||||
/// <param name="declawed">declawed.</param>
|
||||
public CatAllOf(bool declawed = default(bool))
|
||||
public CatAllOf(bool? declawed = default)
|
||||
{
|
||||
this.Declawed = declawed;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Declawed
|
||||
/// </summary>
|
||||
[DataMember(Name = "declawed", EmitDefaultValue = true)]
|
||||
public bool Declawed { get; set; }
|
||||
public bool? Declawed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -43,27 +43,31 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long id = default(long), string name = "default-name")
|
||||
/// <param name="id">id.</param>
|
||||
public Category(string name = "default-name", long? id = default)
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null) {
|
||||
throw new ArgumentNullException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
this.Id = id;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
@@ -78,8 +82,8 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Category {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
@@ -123,11 +127,11 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
hashCode = (hashCode * 59) + this.Id.GetHashCode();
|
||||
if (this.Name != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Name.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.Id.GetHashCode();
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChildCat" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name.</param>
|
||||
/// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param>
|
||||
public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base()
|
||||
/// <param name="name">name.</param>
|
||||
public ChildCat(PetTypeEnum petType = PetTypeEnum.ChildCat, string? name = default) : base()
|
||||
{
|
||||
this.PetType = petType;
|
||||
this.Name = name;
|
||||
@@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
@@ -95,8 +95,8 @@ namespace Org.OpenAPITools.Model
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class ChildCat {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" PetType: ").Append(PetType).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
@@ -140,11 +140,11 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.PetType.GetHashCode();
|
||||
if (this.Name != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Name.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.PetType.GetHashCode();
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="name">name.</param>
|
||||
/// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param>
|
||||
public ChildCatAllOf(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat)
|
||||
public ChildCatAllOf(string? name = default, PetTypeEnum? petType = PetTypeEnum.ChildCat)
|
||||
{
|
||||
this.Name = name;
|
||||
this.PetType = petType;
|
||||
@@ -68,7 +68,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_class">_class.</param>
|
||||
public ClassModel(string _class = default(string))
|
||||
public ClassModel(string? _class = default)
|
||||
{
|
||||
this.Class = _class;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
||||
public string Class { get; set; }
|
||||
public string? Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -45,9 +45,17 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
/// <param name="quadrilateralType">quadrilateralType (required).</param>
|
||||
public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string))
|
||||
public ComplexQuadrilateral(string shapeType, string quadrilateralType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
// to ensure "quadrilateralType" is required (not null)
|
||||
if (quadrilateralType == null) {
|
||||
throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null");
|
||||
}
|
||||
this.QuadrilateralType = quadrilateralType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -44,8 +44,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="DanishPig" /> class.
|
||||
/// </summary>
|
||||
/// <param name="className">className (required).</param>
|
||||
public DanishPig(string className = default(string))
|
||||
public DanishPig(string className)
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
throw new ArgumentNullException("className is a required property for DanishPig and cannot be null");
|
||||
}
|
||||
this.ClassName = className;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="DeprecatedObject" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name.</param>
|
||||
public DeprecatedObject(string name = default(string))
|
||||
public DeprecatedObject(string? name = default)
|
||||
{
|
||||
this.Name = name;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Dog" /> class.
|
||||
/// </summary>
|
||||
/// <param name="breed">breed.</param>
|
||||
/// <param name="className">className (required) (default to "Dog").</param>
|
||||
/// <param name="breed">breed.</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color)
|
||||
public Dog(string className = "Dog", string? breed = default, string? color = "red") : base(className, color)
|
||||
{
|
||||
this.Breed = breed;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
public string Breed { get; set; }
|
||||
public string? Breed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="DogAllOf" /> class.
|
||||
/// </summary>
|
||||
/// <param name="breed">breed.</param>
|
||||
public DogAllOf(string breed = default(string))
|
||||
public DogAllOf(string? breed = default)
|
||||
{
|
||||
this.Breed = breed;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
public string Breed { get; set; }
|
||||
public string? Breed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="shapeOrNull">shapeOrNull.</param>
|
||||
/// <param name="nullableShape">nullableShape.</param>
|
||||
/// <param name="shapes">shapes.</param>
|
||||
public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List<Shape> shapes = default(List<Shape>)) : base()
|
||||
public Drawing(Shape? mainShape = default, ShapeOrNull? shapeOrNull = default, NullableShape? nullableShape = default, List<Shape>? shapes = default) : base()
|
||||
{
|
||||
this.MainShape = mainShape;
|
||||
this.ShapeOrNull = shapeOrNull;
|
||||
@@ -51,25 +51,25 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets MainShape
|
||||
/// </summary>
|
||||
[DataMember(Name = "mainShape", EmitDefaultValue = false)]
|
||||
public Shape MainShape { get; set; }
|
||||
public Shape? MainShape { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeOrNull
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapeOrNull", EmitDefaultValue = false)]
|
||||
public ShapeOrNull ShapeOrNull { get; set; }
|
||||
public ShapeOrNull? ShapeOrNull { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets NullableShape
|
||||
/// </summary>
|
||||
[DataMember(Name = "nullableShape", EmitDefaultValue = true)]
|
||||
public NullableShape NullableShape { get; set; }
|
||||
public NullableShape? NullableShape { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Shapes
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapes", EmitDefaultValue = false)]
|
||||
public List<Shape> Shapes { get; set; }
|
||||
public List<Shape>? Shapes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
|
||||
@@ -84,13 +84,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayEnum
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_enum", EmitDefaultValue = false)]
|
||||
public List<ArrayEnumEnum> ArrayEnum { get; set; }
|
||||
public List<ArrayEnumEnum>? ArrayEnum { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EnumArrays" /> class.
|
||||
/// </summary>
|
||||
/// <param name="justSymbol">justSymbol.</param>
|
||||
/// <param name="arrayEnum">arrayEnum.</param>
|
||||
public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List<ArrayEnumEnum> arrayEnum = default(List<ArrayEnumEnum>))
|
||||
public EnumArrays(JustSymbolEnum? justSymbol = default, List<ArrayEnumEnum>? arrayEnum = default)
|
||||
{
|
||||
this.JustSymbol = justSymbol;
|
||||
this.ArrayEnum = arrayEnum;
|
||||
|
||||
@@ -32,38 +32,6 @@ namespace Org.OpenAPITools.Model
|
||||
[DataContract(Name = "Enum_Test")]
|
||||
public partial class EnumTest : IEquatable<EnumTest>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines EnumString
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumStringEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum UPPER for value: UPPER
|
||||
/// </summary>
|
||||
[EnumMember(Value = "UPPER")]
|
||||
UPPER = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Lower for value: lower
|
||||
/// </summary>
|
||||
[EnumMember(Value = "lower")]
|
||||
Lower = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Empty for value:
|
||||
/// </summary>
|
||||
[EnumMember(Value = "")]
|
||||
Empty = 3
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets EnumString
|
||||
/// </summary>
|
||||
[DataMember(Name = "enum_string", EmitDefaultValue = false)]
|
||||
public EnumStringEnum? EnumString { get; set; }
|
||||
/// <summary>
|
||||
/// Defines EnumStringRequired
|
||||
/// </summary>
|
||||
@@ -97,6 +65,38 @@ namespace Org.OpenAPITools.Model
|
||||
[DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)]
|
||||
public EnumStringRequiredEnum EnumStringRequired { get; set; }
|
||||
/// <summary>
|
||||
/// Defines EnumString
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumStringEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum UPPER for value: UPPER
|
||||
/// </summary>
|
||||
[EnumMember(Value = "UPPER")]
|
||||
UPPER = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Lower for value: lower
|
||||
/// </summary>
|
||||
[EnumMember(Value = "lower")]
|
||||
Lower = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Empty for value:
|
||||
/// </summary>
|
||||
[EnumMember(Value = "")]
|
||||
Empty = 3
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets EnumString
|
||||
/// </summary>
|
||||
[DataMember(Name = "enum_string", EmitDefaultValue = false)]
|
||||
public EnumStringEnum? EnumString { get; set; }
|
||||
/// <summary>
|
||||
/// Defines EnumInteger
|
||||
/// </summary>
|
||||
public enum EnumIntegerEnum
|
||||
@@ -203,8 +203,8 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EnumTest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="enumString">enumString.</param>
|
||||
/// <param name="enumStringRequired">enumStringRequired (required).</param>
|
||||
/// <param name="enumString">enumString.</param>
|
||||
/// <param name="enumInteger">enumInteger.</param>
|
||||
/// <param name="enumIntegerOnly">enumIntegerOnly.</param>
|
||||
/// <param name="enumNumber">enumNumber.</param>
|
||||
@@ -212,7 +212,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="outerEnumInteger">outerEnumInteger.</param>
|
||||
/// <param name="outerEnumDefaultValue">outerEnumDefaultValue.</param>
|
||||
/// <param name="outerEnumIntegerDefaultValue">outerEnumIntegerDefaultValue.</param>
|
||||
public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumIntegerOnlyEnum? enumIntegerOnly = default(EnumIntegerOnlyEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?))
|
||||
public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum? enumString = default, EnumIntegerEnum? enumInteger = default, EnumIntegerOnlyEnum? enumIntegerOnly = default, EnumNumberEnum? enumNumber = default, OuterEnum? outerEnum = default, OuterEnumInteger? outerEnumInteger = default, OuterEnumDefaultValue? outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default)
|
||||
{
|
||||
this.EnumStringRequired = enumStringRequired;
|
||||
this.EnumString = enumString;
|
||||
@@ -240,8 +240,8 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class EnumTest {\n");
|
||||
sb.Append(" EnumString: ").Append(EnumString).Append("\n");
|
||||
sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n");
|
||||
sb.Append(" EnumString: ").Append(EnumString).Append("\n");
|
||||
sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n");
|
||||
sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n");
|
||||
sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n");
|
||||
@@ -292,8 +292,8 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
hashCode = (hashCode * 59) + this.EnumString.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.EnumString.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode();
|
||||
|
||||
@@ -45,9 +45,17 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
/// <param name="triangleType">triangleType (required).</param>
|
||||
public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string))
|
||||
public EquilateralTriangle(string shapeType, string triangleType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
// to ensure "triangleType" is required (not null)
|
||||
if (triangleType == null) {
|
||||
throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null");
|
||||
}
|
||||
this.TriangleType = triangleType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="File" /> class.
|
||||
/// </summary>
|
||||
/// <param name="sourceURI">Test capitalization.</param>
|
||||
public File(string sourceURI = default(string))
|
||||
public File(string? sourceURI = default)
|
||||
{
|
||||
this.SourceURI = sourceURI;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <value>Test capitalization</value>
|
||||
[DataMember(Name = "sourceURI", EmitDefaultValue = false)]
|
||||
public string SourceURI { get; set; }
|
||||
public string? SourceURI { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="file">file.</param>
|
||||
/// <param name="files">files.</param>
|
||||
public FileSchemaTestClass(File file = default(File), List<File> files = default(List<File>))
|
||||
public FileSchemaTestClass(File? file = default, List<File>? files = default)
|
||||
{
|
||||
this.File = file;
|
||||
this.Files = files;
|
||||
@@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets File
|
||||
/// </summary>
|
||||
[DataMember(Name = "file", EmitDefaultValue = false)]
|
||||
public File File { get; set; }
|
||||
public File? File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Files
|
||||
/// </summary>
|
||||
[DataMember(Name = "files", EmitDefaultValue = false)]
|
||||
public List<File> Files { get; set; }
|
||||
public List<File>? Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,9 +36,10 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Foo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="bar">bar (default to "bar").</param>
|
||||
public Foo(string bar = "bar")
|
||||
public Foo(string? bar = "bar")
|
||||
{
|
||||
this.Bar = bar;
|
||||
// use default value if no "bar" provided
|
||||
this.Bar = bar ?? "bar";
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar { get; set; }
|
||||
public string? Bar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -43,23 +43,23 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||
/// </summary>
|
||||
/// <param name="number">number (required).</param>
|
||||
/// <param name="_byte">_byte (required).</param>
|
||||
/// <param name="date">date (required).</param>
|
||||
/// <param name="password">password (required).</param>
|
||||
/// <param name="integer">integer.</param>
|
||||
/// <param name="int32">int32.</param>
|
||||
/// <param name="int64">int64.</param>
|
||||
/// <param name="number">number (required).</param>
|
||||
/// <param name="_float">_float.</param>
|
||||
/// <param name="_double">_double.</param>
|
||||
/// <param name="_decimal">_decimal.</param>
|
||||
/// <param name="_string">_string.</param>
|
||||
/// <param name="_byte">_byte (required).</param>
|
||||
/// <param name="binary">binary.</param>
|
||||
/// <param name="date">date (required).</param>
|
||||
/// <param name="dateTime">dateTime.</param>
|
||||
/// <param name="uuid">uuid.</param>
|
||||
/// <param name="password">password (required).</param>
|
||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
||||
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
||||
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
||||
public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int? integer = default, int? int32 = default, long? int64 = default, float? _float = default, double? _double = default, decimal? _decimal = default, string? _string = default, System.IO.Stream? binary = default, DateTime? dateTime = default, Guid? uuid = default, string? patternWithDigits = default, string? patternWithDigitsAndDelimiter = default)
|
||||
{
|
||||
this.Number = number;
|
||||
// to ensure "_byte" is required (not null)
|
||||
@@ -68,6 +68,10 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
this.Byte = _byte;
|
||||
this.Date = date;
|
||||
// to ensure "password" is required (not null)
|
||||
if (password == null) {
|
||||
throw new ArgumentNullException("password is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
this.Password = password;
|
||||
this.Integer = integer;
|
||||
this.Int32 = int32;
|
||||
@@ -84,66 +88,18 @@ namespace Org.OpenAPITools.Model
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Integer
|
||||
/// </summary>
|
||||
[DataMember(Name = "integer", EmitDefaultValue = false)]
|
||||
public int Integer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Int32
|
||||
/// </summary>
|
||||
[DataMember(Name = "int32", EmitDefaultValue = false)]
|
||||
public int Int32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Int64
|
||||
/// </summary>
|
||||
[DataMember(Name = "int64", EmitDefaultValue = false)]
|
||||
public long Int64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Number
|
||||
/// </summary>
|
||||
[DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)]
|
||||
public decimal Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name = "float", EmitDefaultValue = false)]
|
||||
public float Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||
public double Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Decimal
|
||||
/// </summary>
|
||||
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||
public decimal Decimal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)]
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
/// </summary>
|
||||
[DataMember(Name = "binary", EmitDefaultValue = false)]
|
||||
public System.IO.Stream Binary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Date
|
||||
/// </summary>
|
||||
@@ -151,37 +107,85 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DateTime
|
||||
/// </summary>
|
||||
[DataMember(Name = "dateTime", EmitDefaultValue = false)]
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = false)]
|
||||
public Guid Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Integer
|
||||
/// </summary>
|
||||
[DataMember(Name = "integer", EmitDefaultValue = false)]
|
||||
public int? Integer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Int32
|
||||
/// </summary>
|
||||
[DataMember(Name = "int32", EmitDefaultValue = false)]
|
||||
public int? Int32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Int64
|
||||
/// </summary>
|
||||
[DataMember(Name = "int64", EmitDefaultValue = false)]
|
||||
public long? Int64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name = "float", EmitDefaultValue = false)]
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Decimal
|
||||
/// </summary>
|
||||
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||
public decimal? Decimal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public string? String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
/// </summary>
|
||||
[DataMember(Name = "binary", EmitDefaultValue = false)]
|
||||
public System.IO.Stream? Binary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DateTime
|
||||
/// </summary>
|
||||
[DataMember(Name = "dateTime", EmitDefaultValue = false)]
|
||||
public DateTime? DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = false)]
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A string that is a 10 digit number. Can have leading zeros.
|
||||
/// </summary>
|
||||
/// <value>A string that is a 10 digit number. Can have leading zeros.</value>
|
||||
[DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)]
|
||||
public string PatternWithDigits { get; set; }
|
||||
public string? PatternWithDigits { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
/// </summary>
|
||||
/// <value>A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</value>
|
||||
[DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)]
|
||||
public string PatternWithDigitsAndDelimiter { get; set; }
|
||||
public string? PatternWithDigitsAndDelimiter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
@@ -197,20 +201,20 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FormatTest {\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
||||
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
@@ -256,10 +260,22 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
hashCode = (hashCode * 59) + this.Number.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Byte.GetHashCode();
|
||||
}
|
||||
if (this.Date != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Date.GetHashCode();
|
||||
}
|
||||
if (this.Password != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Password.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();
|
||||
hashCode = (hashCode * 59) + this.Decimal.GetHashCode();
|
||||
@@ -267,18 +283,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.Byte != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Byte.GetHashCode();
|
||||
}
|
||||
if (this.Binary != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Binary.GetHashCode();
|
||||
}
|
||||
if (this.Date != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Date.GetHashCode();
|
||||
}
|
||||
if (this.DateTime != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.DateTime.GetHashCode();
|
||||
@@ -287,10 +295,6 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Uuid.GetHashCode();
|
||||
}
|
||||
if (this.Password != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Password.GetHashCode();
|
||||
}
|
||||
if (this.PatternWithDigits != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode();
|
||||
@@ -314,6 +318,30 @@ namespace Org.OpenAPITools.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Number (decimal) maximum
|
||||
if (this.Number > (decimal)543.2)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Number (decimal) minimum
|
||||
if (this.Number < (decimal)32.1)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
if (this.Password != null && this.Password.Length > 64)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
|
||||
}
|
||||
|
||||
// Password (string) minLength
|
||||
if (this.Password != null && this.Password.Length < 10)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||
}
|
||||
|
||||
// Integer (int) maximum
|
||||
if (this.Integer > (int)100)
|
||||
{
|
||||
@@ -338,18 +366,6 @@ namespace Org.OpenAPITools.Model
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
||||
}
|
||||
|
||||
// Number (decimal) maximum
|
||||
if (this.Number > (decimal)543.2)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Number (decimal) minimum
|
||||
if (this.Number < (decimal)32.1)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Float (float) maximum
|
||||
if (this.Float > (float)987.6)
|
||||
{
|
||||
@@ -381,18 +397,6 @@ namespace Org.OpenAPITools.Model
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
if (this.Password != null && this.Password.Length > 64)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
|
||||
}
|
||||
|
||||
// Password (string) minLength
|
||||
if (this.Password != null && this.Password.Length < 10)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||
}
|
||||
|
||||
// PatternWithDigits (string) pattern
|
||||
Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant);
|
||||
if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success)
|
||||
|
||||
@@ -48,8 +48,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="GrandparentAnimal" /> class.
|
||||
/// </summary>
|
||||
/// <param name="petType">petType (required).</param>
|
||||
public GrandparentAnimal(string petType = default(string))
|
||||
public GrandparentAnimal(string petType)
|
||||
{
|
||||
// to ensure "petType" is required (not null)
|
||||
if (petType == null) {
|
||||
throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null");
|
||||
}
|
||||
this.PetType = petType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar { get; private set; }
|
||||
public string? Bar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Bar should not be serialized given that it's read-only.
|
||||
@@ -59,7 +59,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Foo
|
||||
/// </summary>
|
||||
[DataMember(Name = "foo", EmitDefaultValue = false)]
|
||||
public string Foo { get; private set; }
|
||||
public string? Foo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Foo should not be serialized given that it's read-only.
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="HealthCheckResult" /> class.
|
||||
/// </summary>
|
||||
/// <param name="nullableMessage">nullableMessage.</param>
|
||||
public HealthCheckResult(string? nullableMessage = default(string?))
|
||||
public HealthCheckResult(string? nullableMessage = default)
|
||||
{
|
||||
this.NullableMessage = nullableMessage;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="InlineResponseDefault" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public InlineResponseDefault(Foo _string = default(Foo))
|
||||
public InlineResponseDefault(Foo? _string = default)
|
||||
{
|
||||
this.String = _string;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
public Foo? String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -42,9 +42,17 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
/// <param name="triangleType">triangleType (required).</param>
|
||||
public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string))
|
||||
public IsoscelesTriangle(string shapeType, string triangleType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
// to ensure "triangleType" is required (not null)
|
||||
if (triangleType == null) {
|
||||
throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null");
|
||||
}
|
||||
this.TriangleType = triangleType;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="List" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_123list">_123list.</param>
|
||||
public List(string _123list = default(string))
|
||||
public List(string? _123list = default)
|
||||
{
|
||||
this._123List = _123list;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets _123List
|
||||
/// </summary>
|
||||
[DataMember(Name = "123-list", EmitDefaultValue = false)]
|
||||
public string _123List { get; set; }
|
||||
public string? _123List { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets MapOfEnumString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, InnerEnum> MapOfEnumString { get; set; }
|
||||
public Dictionary<string, InnerEnum>? MapOfEnumString { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapTest" /> class.
|
||||
/// </summary>
|
||||
@@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapOfEnumString">mapOfEnumString.</param>
|
||||
/// <param name="directMap">directMap.</param>
|
||||
/// <param name="indirectMap">indirectMap.</param>
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool> directMap = default(Dictionary<string, bool>), Dictionary<string, bool> indirectMap = default(Dictionary<string, bool>))
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>>? mapMapOfString = default, Dictionary<string, InnerEnum>? mapOfEnumString = default, Dictionary<string, bool>? directMap = default, Dictionary<string, bool>? indirectMap = default)
|
||||
{
|
||||
this.MapMapOfString = mapMapOfString;
|
||||
this.MapOfEnumString = mapOfEnumString;
|
||||
@@ -79,19 +79,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets MapMapOfString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_map_of_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Dictionary<string, string>> MapMapOfString { get; set; }
|
||||
public Dictionary<string, Dictionary<string, string>>? MapMapOfString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name = "direct_map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, bool> DirectMap { get; set; }
|
||||
public Dictionary<string, bool>? DirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name = "indirect_map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, bool> IndirectMap { get; set; }
|
||||
public Dictionary<string, bool>? IndirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="uuid">uuid.</param>
|
||||
/// <param name="dateTime">dateTime.</param>
|
||||
/// <param name="map">map.</param>
|
||||
public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary<string, Animal> map = default(Dictionary<string, Animal>))
|
||||
public MixedPropertiesAndAdditionalPropertiesClass(Guid? uuid = default, DateTime? dateTime = default, Dictionary<string, Animal>? map = default)
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.DateTime = dateTime;
|
||||
@@ -50,19 +50,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = false)]
|
||||
public Guid Uuid { get; set; }
|
||||
public Guid? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DateTime
|
||||
/// </summary>
|
||||
[DataMember(Name = "dateTime", EmitDefaultValue = false)]
|
||||
public DateTime DateTime { get; set; }
|
||||
public DateTime? DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Map
|
||||
/// </summary>
|
||||
[DataMember(Name = "map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Animal> Map { get; set; }
|
||||
public Dictionary<string, Animal>? Map { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="name">name.</param>
|
||||
/// <param name="_class">_class.</param>
|
||||
public Model200Response(int name = default(int), string _class = default(string))
|
||||
public Model200Response(int? name = default, string? _class = default)
|
||||
{
|
||||
this.Name = name;
|
||||
this.Class = _class;
|
||||
@@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public int Name { get; set; }
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name = "class", EmitDefaultValue = false)]
|
||||
public string Class { get; set; }
|
||||
public string? Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_client">_client.</param>
|
||||
public ModelClient(string _client = default(string))
|
||||
public ModelClient(string? _client = default)
|
||||
{
|
||||
this._Client = _client;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets _Client
|
||||
/// </summary>
|
||||
[DataMember(Name = "client", EmitDefaultValue = false)]
|
||||
public string _Client { get; set; }
|
||||
public string? _Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="property">property.</param>
|
||||
public Name(int name = default(int), string property = default(string))
|
||||
public Name(int name, string? property = default)
|
||||
{
|
||||
this._Name = name;
|
||||
this.Property = property;
|
||||
@@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets SnakeCase
|
||||
/// </summary>
|
||||
[DataMember(Name = "snake_case", EmitDefaultValue = false)]
|
||||
public int SnakeCase { get; private set; }
|
||||
public int? SnakeCase { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as SnakeCase should not be serialized given that it's read-only.
|
||||
@@ -76,13 +76,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Property
|
||||
/// </summary>
|
||||
[DataMember(Name = "property", EmitDefaultValue = false)]
|
||||
public string Property { get; set; }
|
||||
public string? Property { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _123Number
|
||||
/// </summary>
|
||||
[DataMember(Name = "123Number", EmitDefaultValue = false)]
|
||||
public int _123Number { get; private set; }
|
||||
public int? _123Number { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as _123Number should not be serialized given that it's read-only.
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="objectNullableProp">objectNullableProp.</param>
|
||||
/// <param name="objectAndItemsNullableProp">objectAndItemsNullableProp.</param>
|
||||
/// <param name="objectItemsNullable">objectItemsNullable.</param>
|
||||
public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string? stringProp = default(string?), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List<Object> arrayNullableProp = default(List<Object>), List<Object> arrayAndItemsNullableProp = default(List<Object>), List<Object> arrayItemsNullable = default(List<Object>), Dictionary<string, Object> objectNullableProp = default(Dictionary<string, Object>), Dictionary<string, Object> objectAndItemsNullableProp = default(Dictionary<string, Object>), Dictionary<string, Object> objectItemsNullable = default(Dictionary<string, Object>)) : base()
|
||||
public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string? stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List<Object>? arrayNullableProp = default, List<Object>? arrayAndItemsNullableProp = default, List<Object>? arrayItemsNullable = default, Dictionary<string, Object>? objectNullableProp = default, Dictionary<string, Object>? objectAndItemsNullableProp = default, Dictionary<string, Object>? objectItemsNullable = default) : base()
|
||||
{
|
||||
this.IntegerProp = integerProp;
|
||||
this.NumberProp = numberProp;
|
||||
@@ -104,37 +104,37 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayNullableProp
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)]
|
||||
public List<Object> ArrayNullableProp { get; set; }
|
||||
public List<Object>? ArrayNullableProp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayAndItemsNullableProp
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)]
|
||||
public List<Object> ArrayAndItemsNullableProp { get; set; }
|
||||
public List<Object>? ArrayAndItemsNullableProp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayItemsNullable
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_items_nullable", EmitDefaultValue = false)]
|
||||
public List<Object> ArrayItemsNullable { get; set; }
|
||||
public List<Object>? ArrayItemsNullable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ObjectNullableProp
|
||||
/// </summary>
|
||||
[DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)]
|
||||
public Dictionary<string, Object> ObjectNullableProp { get; set; }
|
||||
public Dictionary<string, Object>? ObjectNullableProp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ObjectAndItemsNullableProp
|
||||
/// </summary>
|
||||
[DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)]
|
||||
public Dictionary<string, Object> ObjectAndItemsNullableProp { get; set; }
|
||||
public Dictionary<string, Object>? ObjectAndItemsNullableProp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ObjectItemsNullable
|
||||
/// </summary>
|
||||
[DataMember(Name = "object_items_nullable", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Object> ObjectItemsNullable { get; set; }
|
||||
public Dictionary<string, Object>? ObjectItemsNullable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="NumberOnly" /> class.
|
||||
/// </summary>
|
||||
/// <param name="justNumber">justNumber.</param>
|
||||
public NumberOnly(decimal justNumber = default(decimal))
|
||||
public NumberOnly(decimal? justNumber = default)
|
||||
{
|
||||
this.JustNumber = justNumber;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets JustNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "JustNumber", EmitDefaultValue = false)]
|
||||
public decimal JustNumber { get; set; }
|
||||
public decimal? JustNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="deprecatedRef">deprecatedRef.</param>
|
||||
/// <param name="bars">bars.</param>
|
||||
public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List<string> bars = default(List<string>))
|
||||
public ObjectWithDeprecatedFields(string? uuid = default, decimal? id = default, DeprecatedObject? deprecatedRef = default, List<string>? bars = default)
|
||||
{
|
||||
this.Uuid = uuid;
|
||||
this.Id = id;
|
||||
@@ -52,28 +52,28 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = false)]
|
||||
public string Uuid { get; set; }
|
||||
public string? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
[Obsolete]
|
||||
public decimal Id { get; set; }
|
||||
public decimal? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DeprecatedRef
|
||||
/// </summary>
|
||||
[DataMember(Name = "deprecatedRef", EmitDefaultValue = false)]
|
||||
[Obsolete]
|
||||
public DeprecatedObject DeprecatedRef { get; set; }
|
||||
public DeprecatedObject? DeprecatedRef { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bars
|
||||
/// </summary>
|
||||
[DataMember(Name = "bars", EmitDefaultValue = false)]
|
||||
[Obsolete]
|
||||
public List<string> Bars { get; set; }
|
||||
public List<string>? Bars { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="shipDate">shipDate.</param>
|
||||
/// <param name="status">Order Status.</param>
|
||||
/// <param name="complete">complete (default to false).</param>
|
||||
public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false)
|
||||
public Order(long? id = default, long? petId = default, int? quantity = default, DateTime? shipDate = default, StatusEnum? status = default, bool? complete = false)
|
||||
{
|
||||
this.Id = id;
|
||||
this.PetId = petId;
|
||||
@@ -90,31 +90,31 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long Id { get; set; }
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PetId
|
||||
/// </summary>
|
||||
[DataMember(Name = "petId", EmitDefaultValue = false)]
|
||||
public long PetId { get; set; }
|
||||
public long? PetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Quantity
|
||||
/// </summary>
|
||||
[DataMember(Name = "quantity", EmitDefaultValue = false)]
|
||||
public int Quantity { get; set; }
|
||||
public int? Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShipDate
|
||||
/// </summary>
|
||||
[DataMember(Name = "shipDate", EmitDefaultValue = false)]
|
||||
public DateTime ShipDate { get; set; }
|
||||
public DateTime? ShipDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Complete
|
||||
/// </summary>
|
||||
[DataMember(Name = "complete", EmitDefaultValue = true)]
|
||||
public bool Complete { get; set; }
|
||||
public bool? Complete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="myNumber">myNumber.</param>
|
||||
/// <param name="myString">myString.</param>
|
||||
/// <param name="myBoolean">myBoolean.</param>
|
||||
public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool))
|
||||
public OuterComposite(decimal? myNumber = default, string? myString = default, bool? myBoolean = default)
|
||||
{
|
||||
this.MyNumber = myNumber;
|
||||
this.MyString = myString;
|
||||
@@ -50,19 +50,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets MyNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "my_number", EmitDefaultValue = false)]
|
||||
public decimal MyNumber { get; set; }
|
||||
public decimal? MyNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MyString
|
||||
/// </summary>
|
||||
[DataMember(Name = "my_string", EmitDefaultValue = false)]
|
||||
public string MyString { get; set; }
|
||||
public string? MyString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MyBoolean
|
||||
/// </summary>
|
||||
[DataMember(Name = "my_boolean", EmitDefaultValue = true)]
|
||||
public bool MyBoolean { get; set; }
|
||||
public bool? MyBoolean { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -77,14 +77,18 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Pet" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="category">category.</param>
|
||||
/// <param name="name">name (required).</param>
|
||||
/// <param name="photoUrls">photoUrls (required).</param>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="category">category.</param>
|
||||
/// <param name="tags">tags.</param>
|
||||
/// <param name="status">pet status in the store.</param>
|
||||
public Pet(long id = default(long), Category category = default(Category), string name = default(string), List<string> photoUrls = default(List<string>), List<Tag> tags = default(List<Tag>), StatusEnum? status = default(StatusEnum?))
|
||||
public Pet(string name, List<string> photoUrls, long? id = default, Category? category = default, List<Tag>? tags = default, StatusEnum? status = default)
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null) {
|
||||
throw new ArgumentNullException("name is a required property for Pet and cannot be null");
|
||||
}
|
||||
this.Name = name;
|
||||
// to ensure "photoUrls" is required (not null)
|
||||
if (photoUrls == null) {
|
||||
@@ -98,18 +102,6 @@ namespace Org.OpenAPITools.Model
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
public Category Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
@@ -122,11 +114,23 @@ namespace Org.OpenAPITools.Model
|
||||
[DataMember(Name = "photoUrls", IsRequired = true, EmitDefaultValue = false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
public Category? Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name = "tags", EmitDefaultValue = false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
public List<Tag>? Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
@@ -142,10 +146,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Pet {\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Category: ").Append(Category).Append("\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n");
|
||||
sb.Append(" Id: ").Append(Id).Append("\n");
|
||||
sb.Append(" Category: ").Append(Category).Append("\n");
|
||||
sb.Append(" Tags: ").Append(Tags).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
@@ -191,11 +195,6 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
hashCode = (hashCode * 59) + this.Id.GetHashCode();
|
||||
if (this.Category != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Category.GetHashCode();
|
||||
}
|
||||
if (this.Name != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Name.GetHashCode();
|
||||
@@ -204,6 +203,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.Id.GetHashCode();
|
||||
if (this.Category != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Category.GetHashCode();
|
||||
}
|
||||
if (this.Tags != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Tags.GetHashCode();
|
||||
|
||||
@@ -44,8 +44,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="QuadrilateralInterface" /> class.
|
||||
/// </summary>
|
||||
/// <param name="quadrilateralType">quadrilateralType (required).</param>
|
||||
public QuadrilateralInterface(string quadrilateralType = default(string))
|
||||
public QuadrilateralInterface(string quadrilateralType)
|
||||
{
|
||||
// to ensure "quadrilateralType" is required (not null)
|
||||
if (quadrilateralType == null) {
|
||||
throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null");
|
||||
}
|
||||
this.QuadrilateralType = quadrilateralType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ReadOnlyFirst" /> class.
|
||||
/// </summary>
|
||||
/// <param name="baz">baz.</param>
|
||||
public ReadOnlyFirst(string baz = default(string))
|
||||
public ReadOnlyFirst(string? baz = default)
|
||||
{
|
||||
this.Baz = baz;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar { get; private set; }
|
||||
public string? Bar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as Bar should not be serialized given that it's read-only.
|
||||
@@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Baz
|
||||
/// </summary>
|
||||
[DataMember(Name = "baz", EmitDefaultValue = false)]
|
||||
public string Baz { get; set; }
|
||||
public string? Baz { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_return">_return.</param>
|
||||
public Return(int _return = default(int))
|
||||
public Return(int? _return = default)
|
||||
{
|
||||
this._Return = _return;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name = "return", EmitDefaultValue = false)]
|
||||
public int _Return { get; set; }
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -45,9 +45,17 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
/// <param name="triangleType">triangleType (required).</param>
|
||||
public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string))
|
||||
public ScaleneTriangle(string shapeType, string triangleType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
// to ensure "triangleType" is required (not null)
|
||||
if (triangleType == null) {
|
||||
throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null");
|
||||
}
|
||||
this.TriangleType = triangleType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -44,8 +44,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ShapeInterface" /> class.
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
public ShapeInterface(string shapeType = default(string))
|
||||
public ShapeInterface(string shapeType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -45,9 +45,17 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="shapeType">shapeType (required).</param>
|
||||
/// <param name="quadrilateralType">quadrilateralType (required).</param>
|
||||
public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string))
|
||||
public SimpleQuadrilateral(string shapeType, string quadrilateralType)
|
||||
{
|
||||
// to ensure "shapeType" is required (not null)
|
||||
if (shapeType == null) {
|
||||
throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null");
|
||||
}
|
||||
this.ShapeType = shapeType;
|
||||
// to ensure "quadrilateralType" is required (not null)
|
||||
if (quadrilateralType == null) {
|
||||
throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null");
|
||||
}
|
||||
this.QuadrilateralType = quadrilateralType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="specialPropertyName">specialPropertyName.</param>
|
||||
/// <param name="specialModelName">specialModelName.</param>
|
||||
public SpecialModelName(long specialPropertyName = default(long), string specialModelName = default(string))
|
||||
public SpecialModelName(long? specialPropertyName = default, string? specialModelName = default)
|
||||
{
|
||||
this.SpecialPropertyName = specialPropertyName;
|
||||
this._SpecialModelName = specialModelName;
|
||||
@@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets SpecialPropertyName
|
||||
/// </summary>
|
||||
[DataMember(Name = "$special[property.name]", EmitDefaultValue = false)]
|
||||
public long SpecialPropertyName { get; set; }
|
||||
public long? SpecialPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _SpecialModelName
|
||||
/// </summary>
|
||||
[DataMember(Name = "_special_model.name_", EmitDefaultValue = false)]
|
||||
public string _SpecialModelName { get; set; }
|
||||
public string? _SpecialModelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Tag(long id = default(long), string name = default(string))
|
||||
public Tag(long? id = default, string? name = default)
|
||||
{
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
@@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long Id { get; set; }
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -44,8 +44,12 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="TriangleInterface" /> class.
|
||||
/// </summary>
|
||||
/// <param name="triangleType">triangleType (required).</param>
|
||||
public TriangleInterface(string triangleType = default(string))
|
||||
public TriangleInterface(string triangleType)
|
||||
{
|
||||
// to ensure "triangleType" is required (not null)
|
||||
if (triangleType == null) {
|
||||
throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null");
|
||||
}
|
||||
this.TriangleType = triangleType;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="objectWithNoDeclaredPropsNullable">test code generation for nullable objects. Value must be a map of strings to values or the 'null' value..</param>
|
||||
/// <param name="anyTypeProp">test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389.</param>
|
||||
/// <param name="anyTypePropNullable">test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values..</param>
|
||||
public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object))
|
||||
public User(long? id = default, string? username = default, string? firstName = default, string? lastName = default, string? email = default, string? password = default, string? phone = default, int? userStatus = default, Object? objectWithNoDeclaredProps = default, Object? objectWithNoDeclaredPropsNullable = default, Object? anyTypeProp = default, Object? anyTypePropNullable = default)
|
||||
{
|
||||
this.Id = id;
|
||||
this.Username = username;
|
||||
@@ -68,78 +68,78 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
[DataMember(Name = "id", EmitDefaultValue = false)]
|
||||
public long Id { get; set; }
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Username
|
||||
/// </summary>
|
||||
[DataMember(Name = "username", EmitDefaultValue = false)]
|
||||
public string Username { get; set; }
|
||||
public string? Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets FirstName
|
||||
/// </summary>
|
||||
[DataMember(Name = "firstName", EmitDefaultValue = false)]
|
||||
public string FirstName { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[DataMember(Name = "lastName", EmitDefaultValue = false)]
|
||||
public string LastName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name = "email", EmitDefaultValue = false)]
|
||||
public string Email { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name = "password", EmitDefaultValue = false)]
|
||||
public string Password { get; set; }
|
||||
public string? Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Phone
|
||||
/// </summary>
|
||||
[DataMember(Name = "phone", EmitDefaultValue = false)]
|
||||
public string Phone { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User Status
|
||||
/// </summary>
|
||||
/// <value>User Status</value>
|
||||
[DataMember(Name = "userStatus", EmitDefaultValue = false)]
|
||||
public int UserStatus { get; set; }
|
||||
public int? UserStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.
|
||||
/// </summary>
|
||||
/// <value>test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.</value>
|
||||
[DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)]
|
||||
public Object ObjectWithNoDeclaredProps { get; set; }
|
||||
public Object? ObjectWithNoDeclaredProps { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.
|
||||
/// </summary>
|
||||
/// <value>test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.</value>
|
||||
[DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)]
|
||||
public Object ObjectWithNoDeclaredPropsNullable { get; set; }
|
||||
public Object? ObjectWithNoDeclaredPropsNullable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389
|
||||
/// </summary>
|
||||
/// <value>test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389</value>
|
||||
[DataMember(Name = "anyTypeProp", EmitDefaultValue = true)]
|
||||
public Object AnyTypeProp { get; set; }
|
||||
public Object? AnyTypeProp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.
|
||||
/// </summary>
|
||||
/// <value>test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.</value>
|
||||
[DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)]
|
||||
public Object AnyTypePropNullable { get; set; }
|
||||
public Object? AnyTypePropNullable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -43,34 +43,38 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Whale" /> class.
|
||||
/// </summary>
|
||||
/// <param name="className">className (required).</param>
|
||||
/// <param name="hasBaleen">hasBaleen.</param>
|
||||
/// <param name="hasTeeth">hasTeeth.</param>
|
||||
/// <param name="className">className (required).</param>
|
||||
public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string))
|
||||
public Whale(string className, bool? hasBaleen = default, bool? hasTeeth = default)
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
throw new ArgumentNullException("className is a required property for Whale and cannot be null");
|
||||
}
|
||||
this.ClassName = className;
|
||||
this.HasBaleen = hasBaleen;
|
||||
this.HasTeeth = hasTeeth;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
[DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)]
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets HasBaleen
|
||||
/// </summary>
|
||||
[DataMember(Name = "hasBaleen", EmitDefaultValue = true)]
|
||||
public bool HasBaleen { get; set; }
|
||||
public bool? HasBaleen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets HasTeeth
|
||||
/// </summary>
|
||||
[DataMember(Name = "hasTeeth", EmitDefaultValue = true)]
|
||||
public bool HasTeeth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
[DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)]
|
||||
public string ClassName { get; set; }
|
||||
public bool? HasTeeth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
@@ -86,9 +90,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Whale {\n");
|
||||
sb.Append(" ClassName: ").Append(ClassName).Append("\n");
|
||||
sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n");
|
||||
sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n");
|
||||
sb.Append(" ClassName: ").Append(ClassName).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
@@ -132,12 +136,12 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode();
|
||||
if (this.ClassName != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.ClassName.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode();
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
|
||||
@@ -75,10 +75,14 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Zebra" /> class.
|
||||
/// </summary>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="className">className (required).</param>
|
||||
public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base()
|
||||
/// <param name="type">type.</param>
|
||||
public Zebra(string className, TypeEnum? type = default) : base()
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
throw new ArgumentNullException("className is a required property for Zebra and cannot be null");
|
||||
}
|
||||
this.ClassName = className;
|
||||
this.Type = type;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
@@ -105,8 +109,8 @@ namespace Org.OpenAPITools.Model
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class Zebra {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" ClassName: ").Append(ClassName).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
@@ -150,11 +154,11 @@ namespace Org.OpenAPITools.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.Type.GetHashCode();
|
||||
if (this.ClassName != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.ClassName.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.Type.GetHashCode();
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<RepositoryUrl>https://github.com/GIT_USER_ID/GIT_REPO_ID.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageReleaseNotes>Minor update</PackageReleaseNotes>
|
||||
<Nullable>annotations</Nullable>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
**Id** | **long** | | [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)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | | [optional]
|
||||
**PetType** | **string** | | [default to PetTypeEnum.ChildCat]
|
||||
**Name** | **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)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumString** | **string** | | [optional]
|
||||
**EnumStringRequired** | **string** | |
|
||||
**EnumString** | **string** | | [optional]
|
||||
**EnumInteger** | **int** | | [optional]
|
||||
**EnumIntegerOnly** | **int** | | [optional]
|
||||
**EnumNumber** | **double** | | [optional]
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Number** | **decimal** | |
|
||||
**Byte** | **byte[]** | |
|
||||
**Date** | **DateTime** | |
|
||||
**Password** | **string** | |
|
||||
**Integer** | **int** | | [optional]
|
||||
**Int32** | **int** | | [optional]
|
||||
**Int64** | **long** | | [optional]
|
||||
**Number** | **decimal** | |
|
||||
**Float** | **float** | | [optional]
|
||||
**Double** | **double** | | [optional]
|
||||
**Decimal** | **decimal** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **System.IO.Stream** | | [optional]
|
||||
**Date** | **DateTime** | |
|
||||
**DateTime** | **DateTime** | | [optional]
|
||||
**Uuid** | **Guid** | | [optional]
|
||||
**Password** | **string** | |
|
||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Cultivar** | **string** | |
|
||||
**Mealy** | **bool** | | [optional]
|
||||
**LengthCm** | **decimal** | |
|
||||
**Mealy** | **bool** | | [optional]
|
||||
**Sweet** | **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)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**HasBaleen** | **bool** | | [optional]
|
||||
**HasTeeth** | **bool** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
**Type** | **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)
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Name** | **string** | |
|
||||
**PhotoUrls** | **List<string>** | |
|
||||
**Id** | **long** | | [optional]
|
||||
**Category** | [**Category**](Category.md) | | [optional]
|
||||
**Tags** | [**List<Tag>**](Tag.md) | | [optional]
|
||||
**Status** | **string** | pet status in the store | [optional]
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**HasBaleen** | **bool** | | [optional]
|
||||
**HasTeeth** | **bool** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Type** | **string** | | [optional]
|
||||
**ClassName** | **string** | |
|
||||
**Type** | **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)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapWithUndeclaredPropertiesAnytype3">mapWithUndeclaredPropertiesAnytype3.</param>
|
||||
/// <param name="emptyMap">an object with no declared properties and no undeclared properties, hence it's an empty map..</param>
|
||||
/// <param name="mapWithUndeclaredPropertiesString">mapWithUndeclaredPropertiesString.</param>
|
||||
public AdditionalPropertiesClass(Dictionary<string, string> mapProperty = default(Dictionary<string, string>), Dictionary<string, Dictionary<string, string>> mapOfMapProperty = default(Dictionary<string, Dictionary<string, string>>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary<string, Object> mapWithUndeclaredPropertiesAnytype3 = default(Dictionary<string, Object>), Object emptyMap = default(Object), Dictionary<string, string> mapWithUndeclaredPropertiesString = default(Dictionary<string, string>))
|
||||
public AdditionalPropertiesClass(Dictionary<string, string> mapProperty = default, Dictionary<string, Dictionary<string, string>> mapOfMapProperty = default, Object anytype1 = default, Object mapWithUndeclaredPropertiesAnytype1 = default, Object mapWithUndeclaredPropertiesAnytype2 = default, Dictionary<string, Object> mapWithUndeclaredPropertiesAnytype3 = default, Object emptyMap = default, Dictionary<string, string> mapWithUndeclaredPropertiesString = default)
|
||||
{
|
||||
this.MapProperty = mapProperty;
|
||||
this.MapOfMapProperty = mapOfMapProperty;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="className">className (required).</param>
|
||||
/// <param name="color">color (default to "red").</param>
|
||||
public Animal(string className = default(string), string color = "red")
|
||||
public Animal(string className, string color = "red")
|
||||
{
|
||||
// to ensure "className" is required (not null)
|
||||
if (className == null) {
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="code">code.</param>
|
||||
/// <param name="type">type.</param>
|
||||
/// <param name="message">message.</param>
|
||||
public ApiResponse(int code = default(int), string type = default(string), string message = default(string))
|
||||
public ApiResponse(int code = default, string type = default, string message = default)
|
||||
{
|
||||
this.Code = code;
|
||||
this.Type = type;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="cultivar">cultivar.</param>
|
||||
/// <param name="origin">origin.</param>
|
||||
public Apple(string cultivar = default(string), string origin = default(string))
|
||||
public Apple(string cultivar = default, string origin = default)
|
||||
{
|
||||
this.Cultivar = cultivar;
|
||||
this.Origin = origin;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="cultivar">cultivar (required).</param>
|
||||
/// <param name="mealy">mealy.</param>
|
||||
public AppleReq(string cultivar = default(string), bool mealy = default(bool))
|
||||
public AppleReq(string cultivar, bool mealy = default)
|
||||
{
|
||||
// to ensure "cultivar" is required (not null)
|
||||
if (cultivar == null) {
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ArrayOfArrayOfNumberOnly" /> class.
|
||||
/// </summary>
|
||||
/// <param name="arrayArrayNumber">arrayArrayNumber.</param>
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber = default(List<List<decimal>>))
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber = default)
|
||||
{
|
||||
this.ArrayArrayNumber = arrayArrayNumber;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="ArrayOfNumberOnly" /> class.
|
||||
/// </summary>
|
||||
/// <param name="arrayNumber">arrayNumber.</param>
|
||||
public ArrayOfNumberOnly(List<decimal> arrayNumber = default(List<decimal>))
|
||||
public ArrayOfNumberOnly(List<decimal> arrayNumber = default)
|
||||
{
|
||||
this.ArrayNumber = arrayNumber;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="arrayOfString">arrayOfString.</param>
|
||||
/// <param name="arrayArrayOfInteger">arrayArrayOfInteger.</param>
|
||||
/// <param name="arrayArrayOfModel">arrayArrayOfModel.</param>
|
||||
public ArrayTest(List<string> arrayOfString = default(List<string>), List<List<long>> arrayArrayOfInteger = default(List<List<long>>), List<List<ReadOnlyFirst>> arrayArrayOfModel = default(List<List<ReadOnlyFirst>>))
|
||||
public ArrayTest(List<string> arrayOfString = default, List<List<long>> arrayArrayOfInteger = default, List<List<ReadOnlyFirst>> arrayArrayOfModel = default)
|
||||
{
|
||||
this.ArrayOfString = arrayOfString;
|
||||
this.ArrayArrayOfInteger = arrayArrayOfInteger;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Banana" /> class.
|
||||
/// </summary>
|
||||
/// <param name="lengthCm">lengthCm.</param>
|
||||
public Banana(decimal lengthCm = default(decimal))
|
||||
public Banana(decimal lengthCm = default)
|
||||
{
|
||||
this.LengthCm = lengthCm;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="lengthCm">lengthCm (required).</param>
|
||||
/// <param name="sweet">sweet.</param>
|
||||
public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool))
|
||||
public BananaReq(decimal lengthCm, bool sweet = default)
|
||||
{
|
||||
this.LengthCm = lengthCm;
|
||||
this.Sweet = sweet;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user