forked from loafle/openapi-generator-original
[csharp] Fixes incorrect property name (#18136)
* moved camel case lambda * renamed camel case lambda * reverted unintended change * fixed wrong property names * restored accidental file deletion * build samples
This commit is contained in:
parent
669651fcb2
commit
da1187fc8d
@ -85,7 +85,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
protected String enumValueSuffix = "Enum";
|
protected String enumValueSuffix = "Enum";
|
||||||
|
|
||||||
protected String sourceFolder = "src";
|
protected String sourceFolder = "src";
|
||||||
protected String invalidNamePrefix = "var";
|
protected static final String invalidParameterNamePrefix = "var";
|
||||||
|
protected static final String invalidPropertyNamePrefix = "Var";
|
||||||
protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.PascalCase;
|
protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.PascalCase;
|
||||||
|
|
||||||
// TODO: Add option for test folder output location. Nice to allow e.g. ./test instead of ./src.
|
// TODO: Add option for test folder output location. Nice to allow e.g. ./test instead of ./src.
|
||||||
@ -461,7 +462,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
.put("pasteOnce", new PasteLambda(copyLambda, true, true, true, true))
|
.put("pasteOnce", new PasteLambda(copyLambda, true, true, true, true))
|
||||||
.put("pasteLine", new PasteLambda(copyLambda, true, true, false, false))
|
.put("pasteLine", new PasteLambda(copyLambda, true, true, false, false))
|
||||||
.put("uniqueLines", new UniqueLambda("\n", false))
|
.put("uniqueLines", new UniqueLambda("\n", false))
|
||||||
.put("unique", new UniqueLambda("\n", true));
|
.put("unique", new UniqueLambda("\n", true))
|
||||||
|
.put("camel_case", new CamelCaseLambda())
|
||||||
|
.put("escape_reserved_word", new EscapeKeywordLambda((val) -> this.escapeKeyword(val)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -664,18 +667,13 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String patchPropertyName(CodegenModel model, String value) {
|
private String patchPropertyName(CodegenModel model, String value) {
|
||||||
// the casing will be wrong if we just set the name to escapeReservedWord
|
String name = escapeReservedWord(model, value);
|
||||||
// if we try to fix it with camelize, underscores get stripped out
|
|
||||||
// so test if the name was escaped and then replace var with Var
|
if (name.startsWith(AbstractCSharpCodegen.invalidParameterNamePrefix)) {
|
||||||
String tmpPropertyName = escapeReservedWord(model, value);
|
name = AbstractCSharpCodegen.invalidPropertyNamePrefix + name.substring(AbstractCSharpCodegen.invalidParameterNamePrefix.length());
|
||||||
if (!value.equals(tmpPropertyName) || value.startsWith(this.invalidNamePrefix)) {
|
|
||||||
value = tmpPropertyName;
|
|
||||||
String firstCharacter = value.substring(0, 1);
|
|
||||||
value = value.substring(1);
|
|
||||||
value = firstCharacter.toUpperCase(Locale.ROOT) + value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void patchPropertyVendorExtensions(CodegenProperty property) {
|
private void patchPropertyVendorExtensions(CodegenProperty property) {
|
||||||
@ -700,7 +698,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
|
|
||||||
patchPropertyVendorExtensions(property);
|
patchPropertyVendorExtensions(property);
|
||||||
|
|
||||||
String tmpPropertyName = escapeReservedWord(model, property.name);
|
|
||||||
property.name = patchPropertyName(model, property.name);
|
property.name = patchPropertyName(model, property.name);
|
||||||
|
|
||||||
String[] nestedTypes = { "List", "Collection", "ICollection", "Dictionary" };
|
String[] nestedTypes = { "List", "Collection", "ICollection", "Dictionary" };
|
||||||
@ -1308,23 +1305,24 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
public String escapeReservedWord(CodegenModel model, String name) {
|
public String escapeReservedWord(CodegenModel model, String name) {
|
||||||
name = this.escapeReservedWord(name);
|
name = this.escapeReservedWord(name);
|
||||||
|
|
||||||
return name.equalsIgnoreCase(model.getClassname())
|
return name.equals(model.getClassname())
|
||||||
? this.invalidNamePrefix + camelize(name)
|
? AbstractCSharpCodegen.invalidParameterNamePrefix + camelize(name)
|
||||||
: name;
|
: name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String escapeReservedWord(String name) {
|
public String escapeReservedWord(String name) {
|
||||||
if (reservedWords().contains(name) ||
|
if (isReservedWord(name) ||
|
||||||
reservedWords().contains(name.toLowerCase(Locale.ROOT)) ||
|
|
||||||
reservedWords().contains(camelize(sanitizeName(name))) ||
|
|
||||||
isReservedWord(name) ||
|
|
||||||
name.matches("^\\d.*")) {
|
name.matches("^\\d.*")) {
|
||||||
name = this.invalidNamePrefix + camelize(name);
|
name = AbstractCSharpCodegen.invalidParameterNamePrefix + camelize(name);
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String escapeKeyword(String value) {
|
||||||
|
return isReservedWord(value) ? "@" + value : value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the example value of the property
|
* Return the example value of the property
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||||
|
*
|
||||||
|
* 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.utils.CamelizeOption;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Writer;
|
||||||
|
|
||||||
|
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts text in a fragment to camelCase.
|
||||||
|
*
|
||||||
|
* Register:
|
||||||
|
* <pre>
|
||||||
|
* additionalProperties.put("camelcase", new CamelCaseLambda());
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Use:
|
||||||
|
* <pre>
|
||||||
|
* {{#camelcase}}{{name}}{{/camelcase}}
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class CamelCaseLambda implements Mustache.Lambda {
|
||||||
|
public CamelCaseLambda() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||||
|
String text = fragment.execute();
|
||||||
|
text = camelize(text, CamelizeOption.LOWERCASE_FIRST_CHAR);
|
||||||
|
writer.write(text);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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 java.io.IOException;
|
||||||
|
import java.io.Writer;
|
||||||
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts text in a fragment to escape_keyword.
|
||||||
|
*
|
||||||
|
* Register:
|
||||||
|
* <pre>
|
||||||
|
* additionalProperties.put("escape_keyword", new EscapeKeywordLambda((val) -> this.escapeKeyword(val))));
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Use:
|
||||||
|
* <pre>
|
||||||
|
* {{#escape_keyword}}{{name}}{{/escape_keyword}}
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class EscapeKeywordLambda implements Mustache.Lambda {
|
||||||
|
private UnaryOperator<String> callback;
|
||||||
|
|
||||||
|
public EscapeKeywordLambda(final UnaryOperator<String> callback) {
|
||||||
|
this.callback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
|
||||||
|
String text = fragment.execute();
|
||||||
|
|
||||||
|
text = this.callback.apply(text);
|
||||||
|
|
||||||
|
writer.write(text);
|
||||||
|
}
|
||||||
|
}
|
@ -166,8 +166,8 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ConfigureApiWithAClientTest()
|
public void ConfigureApiWithAClientTest()
|
||||||
{
|
{
|
||||||
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
{{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||||
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
|
Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}}
|
||||||
|
|
||||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||||
}
|
}
|
||||||
@ -178,8 +178,8 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ConfigureApiWithoutAClientTest()
|
public void ConfigureApiWithoutAClientTest()
|
||||||
{
|
{
|
||||||
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
{{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||||
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
|
Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}}
|
||||||
|
|
||||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||||
}
|
}
|
||||||
@ -190,8 +190,8 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void AddApiWithAClientTest()
|
public void AddApiWithAClientTest()
|
||||||
{
|
{
|
||||||
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
{{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||||
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
|
Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}}
|
||||||
|
|
||||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||||
}
|
}
|
||||||
@ -202,8 +202,8 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void AddApiWithoutAClientTest()
|
public void AddApiWithoutAClientTest()
|
||||||
{
|
{
|
||||||
{{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
{{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||||
Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}}
|
Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}}
|
||||||
|
|
||||||
{{/-last}}{{/apis}}{{/apiInfo}}
|
{{/-last}}{{/apis}}{{/apiInfo}}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
/// <exception cref="JsonException"></exception>
|
/// <exception cref="JsonException"></exception>
|
||||||
public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
|
{{#lambda.trimTrailingWithNewLine}}
|
||||||
{{#lambda.trimLineBreaks}}
|
{{#lambda.trimLineBreaks}}
|
||||||
int currentDepth = utf8JsonReader.CurrentDepth;
|
int currentDepth = utf8JsonReader.CurrentDepth;
|
||||||
|
|
||||||
@ -291,22 +292,24 @@
|
|||||||
{{^composedSchemas.oneOf}}
|
{{^composedSchemas.oneOf}}
|
||||||
{{^required}}
|
{{^required}}
|
||||||
{{#model.composedSchemas.anyOf}}
|
{{#model.composedSchemas.anyOf}}
|
||||||
Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}} == null
|
Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null
|
||||||
? default
|
? default
|
||||||
: new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}});
|
: new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}});
|
||||||
{{/model.composedSchemas.anyOf}}
|
{{/model.composedSchemas.anyOf}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
|
|
||||||
{{/-last}}
|
{{/-last}}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{^isNullable}}{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/allVars}}{{/lambda.joinWithComma}});
|
return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{^isNullable}}{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||||
{{/composedSchemas.oneOf}}
|
{{/composedSchemas.oneOf}}
|
||||||
{{^model.discriminator}}
|
{{^model.discriminator}}
|
||||||
{{#composedSchemas}}
|
{{#composedSchemas}}
|
||||||
{{#oneOf}}
|
{{#oneOf}}
|
||||||
|
{{^vendorExtensions.x-duplicated-data-type}}
|
||||||
if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null)
|
if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null)
|
||||||
return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/allVars}}{{/lambda.joinWithComma}});
|
return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||||
|
|
||||||
|
{{/vendorExtensions.x-duplicated-data-type}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
throw new JsonException();
|
throw new JsonException();
|
||||||
{{/-last}}
|
{{/-last}}
|
||||||
@ -315,6 +318,7 @@
|
|||||||
{{/model.discriminator}}
|
{{/model.discriminator}}
|
||||||
{{/vendorExtensions.x-duplicated-data-type}}
|
{{/vendorExtensions.x-duplicated-data-type}}
|
||||||
{{/lambda.trimLineBreaks}}
|
{{/lambda.trimLineBreaks}}
|
||||||
|
{{/lambda.trimTrailingWithNewLine}}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -331,22 +335,24 @@
|
|||||||
|
|
||||||
{{#model.discriminator}}
|
{{#model.discriminator}}
|
||||||
{{#model.hasDiscriminatorWithNonEmptyMapping}}
|
{{#model.hasDiscriminatorWithNonEmptyMapping}}
|
||||||
{{#mappedModels}}
|
{{#composedSchemas.oneOf}}
|
||||||
if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{model.classname}} != null) {
|
{{^vendorExtensions.x-duplicated-data-type}}
|
||||||
{{model.classname}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{model.classname}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{model.classname}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{model.classname}}.GetType()));
|
if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) {
|
||||||
{{#lambda.camelcase_sanitize_param}}{{model.classname}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(ref writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{model.classname}}, jsonSerializerOptions);
|
{{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType()));
|
||||||
|
{{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(ref writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/mappedModels}}
|
{{/vendorExtensions.x-duplicated-data-type}}
|
||||||
|
{{/composedSchemas.oneOf}}
|
||||||
{{/model.hasDiscriminatorWithNonEmptyMapping}}
|
{{/model.hasDiscriminatorWithNonEmptyMapping}}
|
||||||
{{/model.discriminator}}
|
{{/model.discriminator}}
|
||||||
{{^model.discriminator}}
|
{{^model.discriminator}}
|
||||||
{{#composedSchemas}}
|
{{#composedSchemas}}
|
||||||
{{#anyOf}}
|
{{#anyOf}}
|
||||||
if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{datatypeWithEnum}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{datatypeWithEnum}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}})
|
if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}})
|
||||||
{
|
{
|
||||||
{{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{datatypeWithEnum}}{{^required}}Option.Value{{/required}}.GetType()));
|
{{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType()));
|
||||||
{{datatypeWithEnum}}JsonConverter.WriteProperties(ref writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{datatypeWithEnum}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions);
|
{{datatypeWithEnum}}JsonConverter.WriteProperties(ref writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/anyOf}}
|
{{/anyOf}}
|
||||||
|
@ -1 +1 @@
|
|||||||
{{#model.allVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#defaultValue}} = {{^required}}default{{/required}}{{#required}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{.}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/required}}{{/defaultValue}}{{^defaultValue}}{{#lambda.first}}{{#isNullable}} = default {{/isNullable}}{{^required}} = default {{/required}}{{/lambda.first}}{{/defaultValue}} {{/model.allVars}}
|
{{#model.allVars}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}{{#defaultValue}} = {{^required}}default{{/required}}{{#required}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{.}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/required}}{{/defaultValue}}{{^defaultValue}}{{#lambda.first}}{{#isNullable}} = default {{/isNullable}}{{^required}} = default {{/required}}{{/lambda.first}}{{/defaultValue}} {{/model.allVars}}
|
||||||
|
@ -8,26 +8,26 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="{{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}}"></param>
|
/// <param name="{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}"></param>
|
||||||
{{#composedSchemas.anyOf}}
|
{{#composedSchemas.anyOf}}
|
||||||
/// <param name="{{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}}"></param>
|
/// <param name="{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}"></param>
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
{{#allVars}}
|
{{#allVars}}
|
||||||
/// <param name="{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}">{{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}</param>
|
/// <param name="{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}">{{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}</param>
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
{{#model.vendorExtensions.x-model-is-mutatable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutatable}}{{^model.vendorExtensions.x-model-is-mutatable}}internal{{/model.vendorExtensions.x-model-is-mutatable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_sanitize_param}}{{parent}}{{/lambda.camelcase_sanitize_param}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}}
|
{{#model.vendorExtensions.x-model-is-mutatable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutatable}}{{^model.vendorExtensions.x-model-is-mutatable}}internal{{/model.vendorExtensions.x-model-is-mutatable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}}
|
||||||
{
|
{
|
||||||
{{#composedSchemas.anyOf}}
|
{{#composedSchemas.anyOf}}
|
||||||
{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}};
|
{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
{{name}} = {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}};
|
{{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{#allVars}}
|
{{#allVars}}
|
||||||
{{^isInherited}}
|
{{^isInherited}}
|
||||||
{{name}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};
|
{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
{{#isInherited}}
|
{{#isInherited}}
|
||||||
{{#isNew}}
|
{{#isNew}}
|
||||||
{{name}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};
|
{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/isNew}}
|
{{/isNew}}
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
@ -41,26 +41,26 @@
|
|||||||
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
/// Initializes a new instance of the <see cref="{{classname}}" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
{{#composedSchemas.anyOf}}
|
{{#composedSchemas.anyOf}}
|
||||||
/// <param name="{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}"></param>
|
/// <param name="{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}"></param>
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
{{#allVars}}
|
{{#allVars}}
|
||||||
/// <param name="{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}">{{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}</param>
|
/// <param name="{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}">{{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}</param>
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
{{^composedSchemas.anyOf}}
|
{{^composedSchemas.anyOf}}
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
{{#model.vendorExtensions.x-model-is-mutatable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutatable}}{{^model.vendorExtensions.x-model-is-mutatable}}internal{{/model.vendorExtensions.x-model-is-mutatable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{name}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.camelcase_sanitize_param}}{{baseType}}{{/lambda.camelcase_sanitize_param}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}}
|
{{#model.vendorExtensions.x-model-is-mutatable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutatable}}{{^model.vendorExtensions.x-model-is-mutatable}}internal{{/model.vendorExtensions.x-model-is-mutatable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{baseType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}}
|
||||||
{
|
{
|
||||||
{{#composedSchemas.anyOf}}
|
{{#composedSchemas.anyOf}}
|
||||||
{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};
|
{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
{{#allVars}}
|
{{#allVars}}
|
||||||
{{^isInherited}}
|
{{^isInherited}}
|
||||||
{{name}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};
|
{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
{{#isInherited}}
|
{{#isInherited}}
|
||||||
{{#isNew}}
|
{{#isNew}}
|
||||||
{{name}}{{^required}}Option{{/required}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}};
|
{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}};
|
||||||
{{/isNew}}
|
{{/isNew}}
|
||||||
{{/isInherited}}
|
{{/isInherited}}
|
||||||
{{/allVars}}
|
{{/allVars}}
|
||||||
@ -118,11 +118,11 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}}
|
public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}}
|
||||||
|
|
||||||
{{/required}}
|
{{/required}}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{/description}}
|
/// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}}
|
||||||
/// </summary>{{#description}}
|
/// </summary>{{#description}}
|
||||||
/// <value>{{.}}</value>{{/description}}
|
/// <value>{{.}}</value>{{/description}}
|
||||||
{{#example}}
|
{{#example}}
|
||||||
@ -131,7 +131,7 @@
|
|||||||
{{#deprecated}}
|
{{#deprecated}}
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
{{/deprecated}}
|
{{/deprecated}}
|
||||||
public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}}
|
public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}}
|
||||||
|
|
||||||
{{/vendorExtensions.x-duplicated-data-type}}
|
{{/vendorExtensions.x-duplicated-data-type}}
|
||||||
{{/composedSchemas.anyOf}}
|
{{/composedSchemas.anyOf}}
|
||||||
|
@ -1555,6 +1555,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- lock
|
||||||
|
- abstract
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Number** | **decimal** | | [optional]
|
**Number** | **decimal** | | [optional]
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
public NumberPropertiesOnly(decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double))
|
public NumberPropertiesOnly(decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double))
|
||||||
{
|
{
|
||||||
this.Number = number;
|
this.Number = number;
|
||||||
this.VarFloat = varFloat;
|
this.Float = varFloat;
|
||||||
this.VarDouble = varDouble;
|
this.Double = varDouble;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -52,16 +52,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
public decimal Number { get; set; }
|
public decimal Number { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "float", EmitDefaultValue = false)]
|
[DataMember(Name = "float", EmitDefaultValue = false)]
|
||||||
public float VarFloat { get; set; }
|
public float Float { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||||
public double VarDouble { get; set; }
|
public double Double { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the string presentation of the object
|
/// Returns the string presentation of the object
|
||||||
@ -72,8 +72,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class NumberPropertiesOnly {\n");
|
sb.Append("class NumberPropertiesOnly {\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
@ -114,12 +114,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
this.Number.Equals(input.Number)
|
this.Number.Equals(input.Number)
|
||||||
) &&
|
) &&
|
||||||
(
|
(
|
||||||
this.VarFloat == input.VarFloat ||
|
this.Float == input.Float ||
|
||||||
this.VarFloat.Equals(input.VarFloat)
|
this.Float.Equals(input.Float)
|
||||||
) &&
|
) &&
|
||||||
(
|
(
|
||||||
this.VarDouble == input.VarDouble ||
|
this.Double == input.Double ||
|
||||||
this.VarDouble.Equals(input.VarDouble)
|
this.Double.Equals(input.Double)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
hashCode = (hashCode * 59) + this.Number.GetHashCode();
|
hashCode = (hashCode * 59) + this.Number.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.VarFloat.GetHashCode();
|
hashCode = (hashCode * 59) + this.Float.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.VarDouble.GetHashCode();
|
hashCode = (hashCode * 59) + this.Double.GetHashCode();
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,16 +146,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <returns>Validation Result</returns>
|
/// <returns>Validation Result</returns>
|
||||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDouble > (double)50.2)
|
if (this.Double > (double)50.2)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 50.2.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 50.2.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDouble < (double)0.8)
|
if (this.Double < (double)0.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 0.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 0.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
yield break;
|
yield break;
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ Name | Type | Description | Notes
|
|||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
**Date** | **DateTime** | |
|
**Date** | **DateTime** | |
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
|
@ -6,7 +6,7 @@ Model for testing model name starting with number
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [optional]
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ Model for testing reserved words
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -38,37 +38,37 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="varClass">varClass.</param>
|
/// <param name="varClass">varClass.</param>
|
||||||
public ClassModel(string varClass = default(string))
|
public ClassModel(string varClass = default(string))
|
||||||
{
|
{
|
||||||
this._VarClass = varClass;
|
this._Class = varClass;
|
||||||
if (this.VarClass != null)
|
if (this.Class != null)
|
||||||
{
|
{
|
||||||
this._flagVarClass = true;
|
this._flagClass = true;
|
||||||
}
|
}
|
||||||
this.AdditionalProperties = new Dictionary<string, object>();
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
||||||
public string VarClass
|
public string Class
|
||||||
{
|
{
|
||||||
get{ return _VarClass;}
|
get{ return _Class;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarClass = value;
|
_Class = value;
|
||||||
_flagVarClass = true;
|
_flagClass = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string _VarClass;
|
private string _Class;
|
||||||
private bool _flagVarClass;
|
private bool _flagClass;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarClass should not be serialized given that it's read-only.
|
/// Returns false as Class should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarClass()
|
public bool ShouldSerializeClass()
|
||||||
{
|
{
|
||||||
return _flagVarClass;
|
return _flagClass;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -128,9 +128,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
unchecked // Overflow is fine, just wrap
|
unchecked // Overflow is fine, just wrap
|
||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
if (this.VarClass != null)
|
if (this.Class != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarClass.GetHashCode();
|
hashCode = (hashCode * 59) + this.Class.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.AdditionalProperties != null)
|
if (this.AdditionalProperties != null)
|
||||||
{
|
{
|
||||||
|
@ -38,37 +38,37 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="varString">varString.</param>
|
/// <param name="varString">varString.</param>
|
||||||
public FooGetDefaultResponse(Foo varString = default(Foo))
|
public FooGetDefaultResponse(Foo varString = default(Foo))
|
||||||
{
|
{
|
||||||
this._VarString = varString;
|
this._String = varString;
|
||||||
if (this.VarString != null)
|
if (this.String != null)
|
||||||
{
|
{
|
||||||
this._flagVarString = true;
|
this._flagString = true;
|
||||||
}
|
}
|
||||||
this.AdditionalProperties = new Dictionary<string, object>();
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||||
public Foo VarString
|
public Foo String
|
||||||
{
|
{
|
||||||
get{ return _VarString;}
|
get{ return _String;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarString = value;
|
_String = value;
|
||||||
_flagVarString = true;
|
_flagString = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Foo _VarString;
|
private Foo _String;
|
||||||
private bool _flagVarString;
|
private bool _flagString;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarString should not be serialized given that it's read-only.
|
/// Returns false as String should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarString()
|
public bool ShouldSerializeString()
|
||||||
{
|
{
|
||||||
return _flagVarString;
|
return _flagString;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FooGetDefaultResponse {\n");
|
sb.Append("class FooGetDefaultResponse {\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -128,9 +128,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
unchecked // Overflow is fine, just wrap
|
unchecked // Overflow is fine, just wrap
|
||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
if (this.VarString != null)
|
if (this.String != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarString.GetHashCode();
|
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.AdditionalProperties != null)
|
if (this.AdditionalProperties != null)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null");
|
throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null");
|
||||||
}
|
}
|
||||||
this._VarByte = varByte;
|
this._Byte = varByte;
|
||||||
this._Date = date;
|
this._Date = date;
|
||||||
// to ensure "password" is required (not null)
|
// to ensure "password" is required (not null)
|
||||||
if (password == null)
|
if (password == null)
|
||||||
@ -103,25 +103,25 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
this._flagUnsignedLong = true;
|
this._flagUnsignedLong = true;
|
||||||
}
|
}
|
||||||
this._VarFloat = varFloat;
|
this._Float = varFloat;
|
||||||
if (this.VarFloat != null)
|
if (this.Float != null)
|
||||||
{
|
{
|
||||||
this._flagVarFloat = true;
|
this._flagFloat = true;
|
||||||
}
|
}
|
||||||
this._VarDouble = varDouble;
|
this._Double = varDouble;
|
||||||
if (this.VarDouble != null)
|
if (this.Double != null)
|
||||||
{
|
{
|
||||||
this._flagVarDouble = true;
|
this._flagDouble = true;
|
||||||
}
|
}
|
||||||
this._VarDecimal = varDecimal;
|
this._Decimal = varDecimal;
|
||||||
if (this.VarDecimal != null)
|
if (this.Decimal != null)
|
||||||
{
|
{
|
||||||
this._flagVarDecimal = true;
|
this._flagDecimal = true;
|
||||||
}
|
}
|
||||||
this._VarString = varString;
|
this._String = varString;
|
||||||
if (this.VarString != null)
|
if (this.String != null)
|
||||||
{
|
{
|
||||||
this._flagVarString = true;
|
this._flagString = true;
|
||||||
}
|
}
|
||||||
this._Binary = binary;
|
this._Binary = binary;
|
||||||
if (this.Binary != null)
|
if (this.Binary != null)
|
||||||
@ -301,124 +301,124 @@ namespace Org.OpenAPITools.Model
|
|||||||
return _flagNumber;
|
return _flagNumber;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "float", EmitDefaultValue = false)]
|
[DataMember(Name = "float", EmitDefaultValue = false)]
|
||||||
public float VarFloat
|
public float Float
|
||||||
{
|
{
|
||||||
get{ return _VarFloat;}
|
get{ return _Float;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarFloat = value;
|
_Float = value;
|
||||||
_flagVarFloat = true;
|
_flagFloat = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private float _VarFloat;
|
private float _Float;
|
||||||
private bool _flagVarFloat;
|
private bool _flagFloat;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarFloat should not be serialized given that it's read-only.
|
/// Returns false as Float should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarFloat()
|
public bool ShouldSerializeFloat()
|
||||||
{
|
{
|
||||||
return _flagVarFloat;
|
return _flagFloat;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||||
public double VarDouble
|
public double Double
|
||||||
{
|
{
|
||||||
get{ return _VarDouble;}
|
get{ return _Double;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarDouble = value;
|
_Double = value;
|
||||||
_flagVarDouble = true;
|
_flagDouble = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private double _VarDouble;
|
private double _Double;
|
||||||
private bool _flagVarDouble;
|
private bool _flagDouble;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarDouble should not be serialized given that it's read-only.
|
/// Returns false as Double should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarDouble()
|
public bool ShouldSerializeDouble()
|
||||||
{
|
{
|
||||||
return _flagVarDouble;
|
return _flagDouble;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDecimal
|
/// Gets or Sets Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||||
public decimal VarDecimal
|
public decimal Decimal
|
||||||
{
|
{
|
||||||
get{ return _VarDecimal;}
|
get{ return _Decimal;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarDecimal = value;
|
_Decimal = value;
|
||||||
_flagVarDecimal = true;
|
_flagDecimal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private decimal _VarDecimal;
|
private decimal _Decimal;
|
||||||
private bool _flagVarDecimal;
|
private bool _flagDecimal;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarDecimal should not be serialized given that it's read-only.
|
/// Returns false as Decimal should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarDecimal()
|
public bool ShouldSerializeDecimal()
|
||||||
{
|
{
|
||||||
return _flagVarDecimal;
|
return _flagDecimal;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||||
public string VarString
|
public string String
|
||||||
{
|
{
|
||||||
get{ return _VarString;}
|
get{ return _String;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarString = value;
|
_String = value;
|
||||||
_flagVarString = true;
|
_flagString = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string _VarString;
|
private string _String;
|
||||||
private bool _flagVarString;
|
private bool _flagString;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarString should not be serialized given that it's read-only.
|
/// Returns false as String should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarString()
|
public bool ShouldSerializeString()
|
||||||
{
|
{
|
||||||
return _flagVarString;
|
return _flagString;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarByte
|
/// Gets or Sets Byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = true)]
|
[DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = true)]
|
||||||
public byte[] VarByte
|
public byte[] Byte
|
||||||
{
|
{
|
||||||
get{ return _VarByte;}
|
get{ return _Byte;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarByte = value;
|
_Byte = value;
|
||||||
_flagVarByte = true;
|
_flagByte = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private byte[] _VarByte;
|
private byte[] _Byte;
|
||||||
private bool _flagVarByte;
|
private bool _flagByte;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarByte should not be serialized given that it's read-only.
|
/// Returns false as Byte should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarByte()
|
public bool ShouldSerializeByte()
|
||||||
{
|
{
|
||||||
return _flagVarByte;
|
return _flagByte;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Binary
|
/// Gets or Sets Binary
|
||||||
@ -639,11 +639,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||||
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n");
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" VarByte: ").Append(VarByte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||||
@ -701,16 +701,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
hashCode = (hashCode * 59) + this.Int64.GetHashCode();
|
hashCode = (hashCode * 59) + this.Int64.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode();
|
hashCode = (hashCode * 59) + this.UnsignedLong.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.Number.GetHashCode();
|
hashCode = (hashCode * 59) + this.Number.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.VarFloat.GetHashCode();
|
hashCode = (hashCode * 59) + this.Float.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.VarDouble.GetHashCode();
|
hashCode = (hashCode * 59) + this.Double.GetHashCode();
|
||||||
hashCode = (hashCode * 59) + this.VarDecimal.GetHashCode();
|
hashCode = (hashCode * 59) + this.Decimal.GetHashCode();
|
||||||
if (this.VarString != null)
|
if (this.String != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarString.GetHashCode();
|
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.VarByte != null)
|
if (this.Byte != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarByte.GetHashCode();
|
hashCode = (hashCode * 59) + this.Byte.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.Binary != null)
|
if (this.Binary != null)
|
||||||
{
|
{
|
||||||
@ -807,36 +807,36 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) maximum
|
// Float (float) maximum
|
||||||
if (this.VarFloat > (float)987.6)
|
if (this.Float > (float)987.6)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) minimum
|
// Float (float) minimum
|
||||||
if (this.VarFloat < (float)54.3)
|
if (this.Float < (float)54.3)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDouble > (double)123.4)
|
if (this.Double > (double)123.4)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDouble < (double)67.8)
|
if (this.Double < (double)67.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.VarString != null) {
|
if (this.String != null) {
|
||||||
// VarString (string) pattern
|
// String (string) pattern
|
||||||
Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
if (!regexVarString.Match(this.VarString).Success)
|
if (!regexString.Match(this.String).Success)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,10 +44,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
this._flagName = true;
|
this._flagName = true;
|
||||||
}
|
}
|
||||||
this._VarClass = varClass;
|
this._Class = varClass;
|
||||||
if (this.VarClass != null)
|
if (this.Class != null)
|
||||||
{
|
{
|
||||||
this._flagVarClass = true;
|
this._flagClass = true;
|
||||||
}
|
}
|
||||||
this.AdditionalProperties = new Dictionary<string, object>();
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
@ -77,28 +77,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
return _flagName;
|
return _flagName;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "class", EmitDefaultValue = false)]
|
[DataMember(Name = "class", EmitDefaultValue = false)]
|
||||||
public string VarClass
|
public string Class
|
||||||
{
|
{
|
||||||
get{ return _VarClass;}
|
get{ return _Class;}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VarClass = value;
|
_Class = value;
|
||||||
_flagVarClass = true;
|
_flagClass = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string _VarClass;
|
private string _Class;
|
||||||
private bool _flagVarClass;
|
private bool _flagClass;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns false as VarClass should not be serialized given that it's read-only.
|
/// Returns false as Class should not be serialized given that it's read-only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>false (boolean)</returns>
|
/// <returns>false (boolean)</returns>
|
||||||
public bool ShouldSerializeVarClass()
|
public bool ShouldSerializeClass()
|
||||||
{
|
{
|
||||||
return _flagVarClass;
|
return _flagClass;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Model200Response {\n");
|
sb.Append("class Model200Response {\n");
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -160,9 +160,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
hashCode = (hashCode * 59) + this.Name.GetHashCode();
|
hashCode = (hashCode * 59) + this.Name.GetHashCode();
|
||||||
if (this.VarClass != null)
|
if (this.Class != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarClass.GetHashCode();
|
hashCode = (hashCode * 59) + this.Class.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.AdditionalProperties != null)
|
if (this.AdditionalProperties != null)
|
||||||
{
|
{
|
||||||
|
@ -35,14 +35,42 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varReturn">varReturn.</param>
|
[JsonConstructorAttribute]
|
||||||
public Return(int varReturn = default(int))
|
protected Return()
|
||||||
{
|
{
|
||||||
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="varReturn">varReturn.</param>
|
||||||
|
/// <param name="varLock">varLock (required).</param>
|
||||||
|
/// <param name="varAbstract">varAbstract (required).</param>
|
||||||
|
/// <param name="varUnsafe">varUnsafe.</param>
|
||||||
|
public Return(int varReturn = default(int), string varLock = default(string), string varAbstract = default(string), string varUnsafe = default(string))
|
||||||
|
{
|
||||||
|
// to ensure "varLock" is required (not null)
|
||||||
|
if (varLock == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("varLock is a required property for Return and cannot be null");
|
||||||
|
}
|
||||||
|
this._Lock = varLock;
|
||||||
|
// to ensure "varAbstract" is required (not null)
|
||||||
|
if (varAbstract == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("varAbstract is a required property for Return and cannot be null");
|
||||||
|
}
|
||||||
|
this._Abstract = varAbstract;
|
||||||
this._VarReturn = varReturn;
|
this._VarReturn = varReturn;
|
||||||
if (this.VarReturn != null)
|
if (this.VarReturn != null)
|
||||||
{
|
{
|
||||||
this._flagVarReturn = true;
|
this._flagVarReturn = true;
|
||||||
}
|
}
|
||||||
|
this._Unsafe = varUnsafe;
|
||||||
|
if (this.Unsafe != null)
|
||||||
|
{
|
||||||
|
this._flagUnsafe = true;
|
||||||
|
}
|
||||||
this.AdditionalProperties = new Dictionary<string, object>();
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +99,78 @@ namespace Org.OpenAPITools.Model
|
|||||||
return _flagVarReturn;
|
return _flagVarReturn;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Gets or Sets Lock
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "lock", IsRequired = true, EmitDefaultValue = true)]
|
||||||
|
public string Lock
|
||||||
|
{
|
||||||
|
get{ return _Lock;}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Lock = value;
|
||||||
|
_flagLock = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _Lock;
|
||||||
|
private bool _flagLock;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns false as Lock should not be serialized given that it's read-only.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>false (boolean)</returns>
|
||||||
|
public bool ShouldSerializeLock()
|
||||||
|
{
|
||||||
|
return _flagLock;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Abstract
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "abstract", IsRequired = true, EmitDefaultValue = true)]
|
||||||
|
public string Abstract
|
||||||
|
{
|
||||||
|
get{ return _Abstract;}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Abstract = value;
|
||||||
|
_flagAbstract = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _Abstract;
|
||||||
|
private bool _flagAbstract;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns false as Abstract should not be serialized given that it's read-only.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>false (boolean)</returns>
|
||||||
|
public bool ShouldSerializeAbstract()
|
||||||
|
{
|
||||||
|
return _flagAbstract;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "unsafe", EmitDefaultValue = false)]
|
||||||
|
public string Unsafe
|
||||||
|
{
|
||||||
|
get{ return _Unsafe;}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Unsafe = value;
|
||||||
|
_flagUnsafe = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string _Unsafe;
|
||||||
|
private bool _flagUnsafe;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns false as Unsafe should not be serialized given that it's read-only.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>false (boolean)</returns>
|
||||||
|
public bool ShouldSerializeUnsafe()
|
||||||
|
{
|
||||||
|
return _flagUnsafe;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonExtensionData]
|
[JsonExtensionData]
|
||||||
@ -85,6 +185,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Return {\n");
|
sb.Append("class Return {\n");
|
||||||
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
||||||
|
sb.Append(" Lock: ").Append(Lock).Append("\n");
|
||||||
|
sb.Append(" Abstract: ").Append(Abstract).Append("\n");
|
||||||
|
sb.Append(" Unsafe: ").Append(Unsafe).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -129,6 +232,18 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
hashCode = (hashCode * 59) + this.VarReturn.GetHashCode();
|
hashCode = (hashCode * 59) + this.VarReturn.GetHashCode();
|
||||||
|
if (this.Lock != null)
|
||||||
|
{
|
||||||
|
hashCode = (hashCode * 59) + this.Lock.GetHashCode();
|
||||||
|
}
|
||||||
|
if (this.Abstract != null)
|
||||||
|
{
|
||||||
|
hashCode = (hashCode * 59) + this.Abstract.GetHashCode();
|
||||||
|
}
|
||||||
|
if (this.Unsafe != null)
|
||||||
|
{
|
||||||
|
hashCode = (hashCode * 59) + this.Unsafe.GetHashCode();
|
||||||
|
}
|
||||||
if (this.AdditionalProperties != null)
|
if (this.AdditionalProperties != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[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,22 +4,22 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Date** | **DateOnly** | |
|
**Date** | **DateOnly** | |
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Password** | **string** | |
|
**Password** | **string** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Int32** | **int** | | [optional]
|
**Int32** | **int** | | [optional]
|
||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**Integer** | **int** | | [optional]
|
**Integer** | **int** | | [optional]
|
||||||
**PatternWithBackslash** | **string** | None | [optional]
|
**PatternWithBackslash** | **string** | None | [optional]
|
||||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
**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]
|
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**UnsignedInteger** | **uint** | | [optional]
|
**UnsignedInteger** | **uint** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Uuid** | **Guid** | | [optional]
|
**Uuid** | **Guid** | | [optional]
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model name starting with number
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **string** | | [optional]
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [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)
|
[[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,10 @@ Model for testing reserved words
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||||
|
|
||||||
|
@ -35,28 +35,28 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public ClassModel(Option<string?> varClass = default)
|
public ClassModel(Option<string?> @class = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarClassOption { get; private set; }
|
public Option<string?> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("_class")]
|
[JsonPropertyName("_class")]
|
||||||
public string? VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string? Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -72,7 +72,7 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -167,11 +167,11 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (classModel.VarClassOption.IsSet && classModel.VarClass == null)
|
if (classModel.ClassOption.IsSet && classModel.Class == null)
|
||||||
throw new ArgumentNullException(nameof(classModel.VarClass), "Property is required for class ClassModel.");
|
throw new ArgumentNullException(nameof(classModel.Class), "Property is required for class ClassModel.");
|
||||||
|
|
||||||
if (classModel.VarClassOption.IsSet)
|
if (classModel.ClassOption.IsSet)
|
||||||
writer.WriteString("_class", classModel.VarClass);
|
writer.WriteString("_class", classModel.Class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,28 +35,28 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FooGetDefaultResponse(Option<Foo?> varString = default)
|
public FooGetDefaultResponse(Option<Foo?> @string = default)
|
||||||
{
|
{
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<Foo?> VarStringOption { get; private set; }
|
public Option<Foo?> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public Foo? VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public Foo? String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -72,7 +72,7 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FooGetDefaultResponse {\n");
|
sb.Append("class FooGetDefaultResponse {\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -168,13 +168,13 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet && fooGetDefaultResponse.VarString == null)
|
if (fooGetDefaultResponse.StringOption.IsSet && fooGetDefaultResponse.String == null)
|
||||||
throw new ArgumentNullException(nameof(fooGetDefaultResponse.VarString), "Property is required for class FooGetDefaultResponse.");
|
throw new ArgumentNullException(nameof(fooGetDefaultResponse.String), "Property is required for class FooGetDefaultResponse.");
|
||||||
|
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet)
|
if (fooGetDefaultResponse.StringOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("string");
|
writer.WritePropertyName("string");
|
||||||
JsonSerializer.Serialize(writer, fooGetDefaultResponse.VarString, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, fooGetDefaultResponse.String, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,44 +35,44 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varByte">varByte</param>
|
/// <param name="byte">byte</param>
|
||||||
/// <param name="date">date</param>
|
/// <param name="date">date</param>
|
||||||
/// <param name="number">number</param>
|
/// <param name="number">number</param>
|
||||||
/// <param name="password">password</param>
|
/// <param name="password">password</param>
|
||||||
/// <param name="binary">binary</param>
|
/// <param name="binary">binary</param>
|
||||||
/// <param name="dateTime">dateTime</param>
|
/// <param name="dateTime">dateTime</param>
|
||||||
/// <param name="varDecimal">varDecimal</param>
|
/// <param name="decimal">decimal</param>
|
||||||
/// <param name="varDouble">varDouble</param>
|
/// <param name="double">double</param>
|
||||||
/// <param name="varFloat">varFloat</param>
|
/// <param name="float">float</param>
|
||||||
/// <param name="int32">int32</param>
|
/// <param name="int32">int32</param>
|
||||||
/// <param name="int64">int64</param>
|
/// <param name="int64">int64</param>
|
||||||
/// <param name="integer">integer</param>
|
/// <param name="integer">integer</param>
|
||||||
/// <param name="patternWithBackslash">None</param>
|
/// <param name="patternWithBackslash">None</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros.</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>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</param>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
/// <param name="unsignedInteger">unsignedInteger</param>
|
/// <param name="unsignedInteger">unsignedInteger</param>
|
||||||
/// <param name="unsignedLong">unsignedLong</param>
|
/// <param name="unsignedLong">unsignedLong</param>
|
||||||
/// <param name="uuid">uuid</param>
|
/// <param name="uuid">uuid</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FormatTest(byte[] varByte, DateOnly date, decimal number, string password, Option<System.IO.Stream?> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> varDecimal = default, Option<double?> varDouble = default, Option<float?> varFloat = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string?> patternWithBackslash = default, Option<string?> patternWithDigits = default, Option<string?> patternWithDigitsAndDelimiter = default, Option<string?> varString = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option<System.IO.Stream?> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> @decimal = default, Option<double?> @double = default, Option<float?> @float = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string?> patternWithBackslash = default, Option<string?> patternWithDigits = default, Option<string?> patternWithDigitsAndDelimiter = default, Option<string?> @string = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
||||||
{
|
{
|
||||||
VarByte = varByte;
|
Byte = @byte;
|
||||||
Date = date;
|
Date = date;
|
||||||
Number = number;
|
Number = number;
|
||||||
Password = password;
|
Password = password;
|
||||||
BinaryOption = binary;
|
BinaryOption = binary;
|
||||||
DateTimeOption = dateTime;
|
DateTimeOption = dateTime;
|
||||||
VarDecimalOption = varDecimal;
|
DecimalOption = @decimal;
|
||||||
VarDoubleOption = varDouble;
|
DoubleOption = @double;
|
||||||
VarFloatOption = varFloat;
|
FloatOption = @float;
|
||||||
Int32Option = int32;
|
Int32Option = int32;
|
||||||
Int64Option = int64;
|
Int64Option = int64;
|
||||||
IntegerOption = integer;
|
IntegerOption = integer;
|
||||||
PatternWithBackslashOption = patternWithBackslash;
|
PatternWithBackslashOption = patternWithBackslash;
|
||||||
PatternWithDigitsOption = patternWithDigits;
|
PatternWithDigitsOption = patternWithDigits;
|
||||||
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
UnsignedIntegerOption = unsignedInteger;
|
UnsignedIntegerOption = unsignedInteger;
|
||||||
UnsignedLongOption = unsignedLong;
|
UnsignedLongOption = unsignedLong;
|
||||||
UuidOption = uuid;
|
UuidOption = uuid;
|
||||||
@ -82,10 +82,10 @@ namespace UseSourceGeneration.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarByte
|
/// Gets or Sets Byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("byte")]
|
[JsonPropertyName("byte")]
|
||||||
public byte[] VarByte { get; set; }
|
public byte[] Byte { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Date
|
/// Gets or Sets Date
|
||||||
@ -134,43 +134,43 @@ namespace UseSourceGeneration.Model
|
|||||||
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDecimal
|
/// Used to track the state of Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<decimal?> VarDecimalOption { get; private set; }
|
public Option<decimal?> DecimalOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDecimal
|
/// Gets or Sets Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("decimal")]
|
[JsonPropertyName("decimal")]
|
||||||
public decimal? VarDecimal { get { return this. VarDecimalOption; } set { this.VarDecimalOption = new(value); } }
|
public decimal? Decimal { get { return this. DecimalOption; } set { this.DecimalOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDouble
|
/// Used to track the state of Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<double?> VarDoubleOption { get; private set; }
|
public Option<double?> DoubleOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("double")]
|
[JsonPropertyName("double")]
|
||||||
public double? VarDouble { get { return this. VarDoubleOption; } set { this.VarDoubleOption = new(value); } }
|
public double? Double { get { return this. DoubleOption; } set { this.DoubleOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarFloat
|
/// Used to track the state of Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<float?> VarFloatOption { get; private set; }
|
public Option<float?> FloatOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("float")]
|
[JsonPropertyName("float")]
|
||||||
public float? VarFloat { get { return this. VarFloatOption; } set { this.VarFloatOption = new(value); } }
|
public float? Float { get { return this. FloatOption; } set { this.FloatOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Int32
|
/// Used to track the state of Int32
|
||||||
@ -254,17 +254,17 @@ namespace UseSourceGeneration.Model
|
|||||||
public string? PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
public string? PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarStringOption { get; private set; }
|
public Option<string?> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public string? VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public string? String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of UnsignedInteger
|
/// Used to track the state of UnsignedInteger
|
||||||
@ -320,22 +320,22 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FormatTest {\n");
|
sb.Append("class FormatTest {\n");
|
||||||
sb.Append(" VarByte: ").Append(VarByte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||||
sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n");
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||||
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
||||||
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
||||||
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
||||||
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
||||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||||
@ -375,28 +375,28 @@ namespace UseSourceGeneration.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value > (double)123.4)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value > (double)123.4)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value < (double)67.8)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value < (double)67.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) maximum
|
// Float (float) maximum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value > (float)987.6)
|
if (this.FloatOption.IsSet && this.FloatOption.Value > (float)987.6)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) minimum
|
// Float (float) minimum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value < (float)54.3)
|
if (this.FloatOption.IsSet && this.FloatOption.Value < (float)54.3)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
@ -453,13 +453,13 @@ namespace UseSourceGeneration.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null) {
|
if (this.StringOption.Value != null) {
|
||||||
// VarString (string) pattern
|
// String (string) pattern
|
||||||
Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null &&!regexVarString.Match(this.VarStringOption.Value).Success)
|
if (this.StringOption.Value != null &&!regexString.Match(this.StringOption.Value).Success)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -719,8 +719,8 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (formatTest.VarByte == null)
|
if (formatTest.Byte == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarByte), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Byte), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.Password == null)
|
if (formatTest.Password == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
||||||
@ -737,11 +737,11 @@ namespace UseSourceGeneration.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet && formatTest.VarString == null)
|
if (formatTest.StringOption.IsSet && formatTest.String == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarString), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.String), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
writer.WritePropertyName("byte");
|
writer.WritePropertyName("byte");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarByte, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions);
|
||||||
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
||||||
|
|
||||||
writer.WriteNumber("number", formatTest.Number);
|
writer.WriteNumber("number", formatTest.Number);
|
||||||
@ -756,16 +756,16 @@ namespace UseSourceGeneration.Model
|
|||||||
if (formatTest.DateTimeOption.IsSet)
|
if (formatTest.DateTimeOption.IsSet)
|
||||||
writer.WriteString("dateTime", formatTest.DateTimeOption.Value!.Value.ToString(DateTimeFormat));
|
writer.WriteString("dateTime", formatTest.DateTimeOption.Value!.Value.ToString(DateTimeFormat));
|
||||||
|
|
||||||
if (formatTest.VarDecimalOption.IsSet)
|
if (formatTest.DecimalOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("decimal");
|
writer.WritePropertyName("decimal");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarDecimal, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Decimal, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
if (formatTest.VarDoubleOption.IsSet)
|
if (formatTest.DoubleOption.IsSet)
|
||||||
writer.WriteNumber("double", formatTest.VarDoubleOption.Value!.Value);
|
writer.WriteNumber("double", formatTest.DoubleOption.Value!.Value);
|
||||||
|
|
||||||
if (formatTest.VarFloatOption.IsSet)
|
if (formatTest.FloatOption.IsSet)
|
||||||
writer.WriteNumber("float", formatTest.VarFloatOption.Value!.Value);
|
writer.WriteNumber("float", formatTest.FloatOption.Value!.Value);
|
||||||
|
|
||||||
if (formatTest.Int32Option.IsSet)
|
if (formatTest.Int32Option.IsSet)
|
||||||
writer.WriteNumber("int32", formatTest.Int32Option.Value!.Value);
|
writer.WriteNumber("int32", formatTest.Int32Option.Value!.Value);
|
||||||
@ -785,8 +785,8 @@ namespace UseSourceGeneration.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
||||||
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet)
|
if (formatTest.StringOption.IsSet)
|
||||||
writer.WriteString("string", formatTest.VarString);
|
writer.WriteString("string", formatTest.String);
|
||||||
|
|
||||||
if (formatTest.UnsignedIntegerOption.IsSet)
|
if (formatTest.UnsignedIntegerOption.IsSet)
|
||||||
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value!.Value);
|
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value!.Value);
|
||||||
|
@ -248,11 +248,6 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (mammal.Pig != null) {
|
|
||||||
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
|
||||||
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mammal.Whale != null) {
|
if (mammal.Whale != null) {
|
||||||
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
||||||
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
||||||
@ -263,6 +258,11 @@ namespace UseSourceGeneration.Model
|
|||||||
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mammal.Pig != null) {
|
||||||
|
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
||||||
|
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -35,12 +35,12 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
/// <param name="name">name</param>
|
/// <param name="name">name</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Model200Response(Option<string?> varClass = default, Option<int?> name = default)
|
public Model200Response(Option<string?> @class = default, Option<int?> name = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
NameOption = name;
|
NameOption = name;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
@ -48,17 +48,17 @@ namespace UseSourceGeneration.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarClassOption { get; private set; }
|
public Option<string?> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("class")]
|
[JsonPropertyName("class")]
|
||||||
public string? VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string? Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Name
|
/// Used to track the state of Name
|
||||||
@ -87,7 +87,7 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Model200Response {\n");
|
sb.Append("class Model200Response {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
@ -191,11 +191,11 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (model200Response.VarClassOption.IsSet && model200Response.VarClass == null)
|
if (model200Response.ClassOption.IsSet && model200Response.Class == null)
|
||||||
throw new ArgumentNullException(nameof(model200Response.VarClass), "Property is required for class Model200Response.");
|
throw new ArgumentNullException(nameof(model200Response.Class), "Property is required for class Model200Response.");
|
||||||
|
|
||||||
if (model200Response.VarClassOption.IsSet)
|
if (model200Response.ClassOption.IsSet)
|
||||||
writer.WriteString("class", model200Response.VarClass);
|
writer.WriteString("class", model200Response.Class);
|
||||||
|
|
||||||
if (model200Response.NameOption.IsSet)
|
if (model200Response.NameOption.IsSet)
|
||||||
writer.WriteNumber("name", model200Response.NameOption.Value!.Value);
|
writer.WriteNumber("name", model200Response.NameOption.Value!.Value);
|
||||||
|
@ -222,16 +222,16 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (nullableShape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nullableShape.Triangle != null) {
|
if (nullableShape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nullableShape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -124,9 +124,6 @@ namespace UseSourceGeneration.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varString != null)
|
|
||||||
return new OneOfString(varString);
|
|
||||||
|
|
||||||
if (varString != null)
|
if (varString != null)
|
||||||
return new OneOfString(varString);
|
return new OneOfString(varString);
|
||||||
|
|
||||||
|
@ -55,10 +55,10 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varObject"></param>
|
/// <param name="object"></param>
|
||||||
internal PolymorphicProperty(Object varObject)
|
internal PolymorphicProperty(Object @object)
|
||||||
{
|
{
|
||||||
VarObject = varObject;
|
Object = @object;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,9 +85,9 @@ namespace UseSourceGeneration.Model
|
|||||||
public string? VarString { get; set; }
|
public string? VarString { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarObject
|
/// Gets or Sets Object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Object? VarObject { get; set; }
|
public Object? Object { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets List
|
/// Gets or Sets List
|
||||||
@ -168,8 +168,8 @@ namespace UseSourceGeneration.Model
|
|||||||
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
OpenAPIClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderVarObject = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderVarObject, jsonSerializerOptions, out varObject);
|
OpenAPIClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<List<string>?>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
OpenAPIClientUtils.TryDeserialize<List<string>?>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
||||||
|
@ -222,16 +222,16 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (quadrilateral.ComplexQuadrilateral != null) {
|
|
||||||
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
|
||||||
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quadrilateral.SimpleQuadrilateral != null) {
|
if (quadrilateral.SimpleQuadrilateral != null) {
|
||||||
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
||||||
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quadrilateral.ComplexQuadrilateral != null) {
|
||||||
|
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
||||||
|
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -35,16 +35,34 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="lock">lock</param>
|
||||||
|
/// <param name="abstract">abstract</param>
|
||||||
/// <param name="varReturn">varReturn</param>
|
/// <param name="varReturn">varReturn</param>
|
||||||
|
/// <param name="unsafe">unsafe</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Return(Option<int?> varReturn = default)
|
public Return(string @lock, string? @abstract = default, Option<int?> varReturn = default, Option<string?> @unsafe = default)
|
||||||
{
|
{
|
||||||
|
Lock = @lock;
|
||||||
|
Abstract = @abstract;
|
||||||
VarReturnOption = varReturn;
|
VarReturnOption = varReturn;
|
||||||
|
UnsafeOption = @unsafe;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Lock
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("lock")]
|
||||||
|
public string Lock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Abstract
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("abstract")]
|
||||||
|
public string? Abstract { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarReturn
|
/// Used to track the state of VarReturn
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -58,6 +76,19 @@ namespace UseSourceGeneration.Model
|
|||||||
[JsonPropertyName("return")]
|
[JsonPropertyName("return")]
|
||||||
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to track the state of Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
public Option<string?> UnsafeOption { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("unsafe")]
|
||||||
|
public string? Unsafe { get { return this. UnsafeOption; } set { this.UnsafeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -72,7 +103,10 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Return {\n");
|
sb.Append("class Return {\n");
|
||||||
|
sb.Append(" Lock: ").Append(Lock).Append("\n");
|
||||||
|
sb.Append(" Abstract: ").Append(Abstract).Append("\n");
|
||||||
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
||||||
|
sb.Append(" Unsafe: ").Append(Unsafe).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -111,7 +145,10 @@ namespace UseSourceGeneration.Model
|
|||||||
|
|
||||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||||
|
|
||||||
|
Option<string?> varLock = default;
|
||||||
|
Option<string?> varAbstract = default;
|
||||||
Option<int?> varReturn = default;
|
Option<int?> varReturn = default;
|
||||||
|
Option<string?> varUnsafe = default;
|
||||||
|
|
||||||
while (utf8JsonReader.Read())
|
while (utf8JsonReader.Read())
|
||||||
{
|
{
|
||||||
@ -128,20 +165,41 @@ namespace UseSourceGeneration.Model
|
|||||||
|
|
||||||
switch (localVarJsonPropertyName)
|
switch (localVarJsonPropertyName)
|
||||||
{
|
{
|
||||||
|
case "lock":
|
||||||
|
varLock = new Option<string?>(utf8JsonReader.GetString()!);
|
||||||
|
break;
|
||||||
|
case "abstract":
|
||||||
|
varAbstract = new Option<string?>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
case "return":
|
case "return":
|
||||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||||
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
||||||
break;
|
break;
|
||||||
|
case "unsafe":
|
||||||
|
varUnsafe = new Option<string?>(utf8JsonReader.GetString()!);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!varLock.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varLock));
|
||||||
|
|
||||||
|
if (!varAbstract.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varAbstract));
|
||||||
|
|
||||||
|
if (varLock.IsSet && varLock.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
if (varReturn.IsSet && varReturn.Value == null)
|
if (varReturn.IsSet && varReturn.Value == null)
|
||||||
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
return new Return(varReturn);
|
if (varUnsafe.IsSet && varUnsafe.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
|
return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -168,8 +226,24 @@ namespace UseSourceGeneration.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
|
if (varReturn.Lock == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Lock), "Property is required for class Return.");
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet && varReturn.Unsafe == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Unsafe), "Property is required for class Return.");
|
||||||
|
|
||||||
|
writer.WriteString("lock", varReturn.Lock);
|
||||||
|
|
||||||
|
if (varReturn.Abstract != null)
|
||||||
|
writer.WriteString("abstract", varReturn.Abstract);
|
||||||
|
else
|
||||||
|
writer.WriteNull("abstract");
|
||||||
|
|
||||||
if (varReturn.VarReturnOption.IsSet)
|
if (varReturn.VarReturnOption.IsSet)
|
||||||
writer.WriteNumber("return", varReturn.VarReturnOption.Value!.Value);
|
writer.WriteNumber("return", varReturn.VarReturnOption.Value!.Value);
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet)
|
||||||
|
writer.WriteString("unsafe", varReturn.Unsafe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,16 +222,16 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shape.Triangle != null) {
|
if (shape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -222,16 +222,16 @@ namespace UseSourceGeneration.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shapeOrNull.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shapeOrNull.Triangle != null) {
|
if (shapeOrNull.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shapeOrNull.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[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,22 +4,22 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Date** | **DateOnly** | |
|
**Date** | **DateOnly** | |
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Password** | **string** | |
|
**Password** | **string** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Int32** | **int** | | [optional]
|
**Int32** | **int** | | [optional]
|
||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**Integer** | **int** | | [optional]
|
**Integer** | **int** | | [optional]
|
||||||
**PatternWithBackslash** | **string** | None | [optional]
|
**PatternWithBackslash** | **string** | None | [optional]
|
||||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
**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]
|
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**UnsignedInteger** | **uint** | | [optional]
|
**UnsignedInteger** | **uint** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Uuid** | **Guid** | | [optional]
|
**Uuid** | **Guid** | | [optional]
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model name starting with number
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **string** | | [optional]
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [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)
|
[[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,10 @@ Model for testing reserved words
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||||
|
|
||||||
|
@ -34,28 +34,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public ClassModel(Option<string?> varClass = default)
|
public ClassModel(Option<string?> @class = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarClassOption { get; private set; }
|
public Option<string?> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("_class")]
|
[JsonPropertyName("_class")]
|
||||||
public string? VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string? Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -71,7 +71,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -166,11 +166,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (classModel.VarClassOption.IsSet && classModel.VarClass == null)
|
if (classModel.ClassOption.IsSet && classModel.Class == null)
|
||||||
throw new ArgumentNullException(nameof(classModel.VarClass), "Property is required for class ClassModel.");
|
throw new ArgumentNullException(nameof(classModel.Class), "Property is required for class ClassModel.");
|
||||||
|
|
||||||
if (classModel.VarClassOption.IsSet)
|
if (classModel.ClassOption.IsSet)
|
||||||
writer.WriteString("_class", classModel.VarClass);
|
writer.WriteString("_class", classModel.Class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,28 +34,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FooGetDefaultResponse(Option<Foo?> varString = default)
|
public FooGetDefaultResponse(Option<Foo?> @string = default)
|
||||||
{
|
{
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<Foo?> VarStringOption { get; private set; }
|
public Option<Foo?> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public Foo? VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public Foo? String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -71,7 +71,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FooGetDefaultResponse {\n");
|
sb.Append("class FooGetDefaultResponse {\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -167,13 +167,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet && fooGetDefaultResponse.VarString == null)
|
if (fooGetDefaultResponse.StringOption.IsSet && fooGetDefaultResponse.String == null)
|
||||||
throw new ArgumentNullException(nameof(fooGetDefaultResponse.VarString), "Property is required for class FooGetDefaultResponse.");
|
throw new ArgumentNullException(nameof(fooGetDefaultResponse.String), "Property is required for class FooGetDefaultResponse.");
|
||||||
|
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet)
|
if (fooGetDefaultResponse.StringOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("string");
|
writer.WritePropertyName("string");
|
||||||
JsonSerializer.Serialize(writer, fooGetDefaultResponse.VarString, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, fooGetDefaultResponse.String, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,44 +34,44 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varByte">varByte</param>
|
/// <param name="byte">byte</param>
|
||||||
/// <param name="date">date</param>
|
/// <param name="date">date</param>
|
||||||
/// <param name="number">number</param>
|
/// <param name="number">number</param>
|
||||||
/// <param name="password">password</param>
|
/// <param name="password">password</param>
|
||||||
/// <param name="binary">binary</param>
|
/// <param name="binary">binary</param>
|
||||||
/// <param name="dateTime">dateTime</param>
|
/// <param name="dateTime">dateTime</param>
|
||||||
/// <param name="varDecimal">varDecimal</param>
|
/// <param name="decimal">decimal</param>
|
||||||
/// <param name="varDouble">varDouble</param>
|
/// <param name="double">double</param>
|
||||||
/// <param name="varFloat">varFloat</param>
|
/// <param name="float">float</param>
|
||||||
/// <param name="int32">int32</param>
|
/// <param name="int32">int32</param>
|
||||||
/// <param name="int64">int64</param>
|
/// <param name="int64">int64</param>
|
||||||
/// <param name="integer">integer</param>
|
/// <param name="integer">integer</param>
|
||||||
/// <param name="patternWithBackslash">None</param>
|
/// <param name="patternWithBackslash">None</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros.</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>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</param>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
/// <param name="unsignedInteger">unsignedInteger</param>
|
/// <param name="unsignedInteger">unsignedInteger</param>
|
||||||
/// <param name="unsignedLong">unsignedLong</param>
|
/// <param name="unsignedLong">unsignedLong</param>
|
||||||
/// <param name="uuid">uuid</param>
|
/// <param name="uuid">uuid</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FormatTest(byte[] varByte, DateOnly date, decimal number, string password, Option<System.IO.Stream?> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> varDecimal = default, Option<double?> varDouble = default, Option<float?> varFloat = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string?> patternWithBackslash = default, Option<string?> patternWithDigits = default, Option<string?> patternWithDigitsAndDelimiter = default, Option<string?> varString = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option<System.IO.Stream?> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> @decimal = default, Option<double?> @double = default, Option<float?> @float = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string?> patternWithBackslash = default, Option<string?> patternWithDigits = default, Option<string?> patternWithDigitsAndDelimiter = default, Option<string?> @string = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
||||||
{
|
{
|
||||||
VarByte = varByte;
|
Byte = @byte;
|
||||||
Date = date;
|
Date = date;
|
||||||
Number = number;
|
Number = number;
|
||||||
Password = password;
|
Password = password;
|
||||||
BinaryOption = binary;
|
BinaryOption = binary;
|
||||||
DateTimeOption = dateTime;
|
DateTimeOption = dateTime;
|
||||||
VarDecimalOption = varDecimal;
|
DecimalOption = @decimal;
|
||||||
VarDoubleOption = varDouble;
|
DoubleOption = @double;
|
||||||
VarFloatOption = varFloat;
|
FloatOption = @float;
|
||||||
Int32Option = int32;
|
Int32Option = int32;
|
||||||
Int64Option = int64;
|
Int64Option = int64;
|
||||||
IntegerOption = integer;
|
IntegerOption = integer;
|
||||||
PatternWithBackslashOption = patternWithBackslash;
|
PatternWithBackslashOption = patternWithBackslash;
|
||||||
PatternWithDigitsOption = patternWithDigits;
|
PatternWithDigitsOption = patternWithDigits;
|
||||||
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
UnsignedIntegerOption = unsignedInteger;
|
UnsignedIntegerOption = unsignedInteger;
|
||||||
UnsignedLongOption = unsignedLong;
|
UnsignedLongOption = unsignedLong;
|
||||||
UuidOption = uuid;
|
UuidOption = uuid;
|
||||||
@ -81,10 +81,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarByte
|
/// Gets or Sets Byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("byte")]
|
[JsonPropertyName("byte")]
|
||||||
public byte[] VarByte { get; set; }
|
public byte[] Byte { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Date
|
/// Gets or Sets Date
|
||||||
@ -133,43 +133,43 @@ namespace Org.OpenAPITools.Model
|
|||||||
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDecimal
|
/// Used to track the state of Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<decimal?> VarDecimalOption { get; private set; }
|
public Option<decimal?> DecimalOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDecimal
|
/// Gets or Sets Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("decimal")]
|
[JsonPropertyName("decimal")]
|
||||||
public decimal? VarDecimal { get { return this. VarDecimalOption; } set { this.VarDecimalOption = new(value); } }
|
public decimal? Decimal { get { return this. DecimalOption; } set { this.DecimalOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDouble
|
/// Used to track the state of Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<double?> VarDoubleOption { get; private set; }
|
public Option<double?> DoubleOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("double")]
|
[JsonPropertyName("double")]
|
||||||
public double? VarDouble { get { return this. VarDoubleOption; } set { this.VarDoubleOption = new(value); } }
|
public double? Double { get { return this. DoubleOption; } set { this.DoubleOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarFloat
|
/// Used to track the state of Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<float?> VarFloatOption { get; private set; }
|
public Option<float?> FloatOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("float")]
|
[JsonPropertyName("float")]
|
||||||
public float? VarFloat { get { return this. VarFloatOption; } set { this.VarFloatOption = new(value); } }
|
public float? Float { get { return this. FloatOption; } set { this.FloatOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Int32
|
/// Used to track the state of Int32
|
||||||
@ -253,17 +253,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string? PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
public string? PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarStringOption { get; private set; }
|
public Option<string?> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public string? VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public string? String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of UnsignedInteger
|
/// Used to track the state of UnsignedInteger
|
||||||
@ -319,22 +319,22 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FormatTest {\n");
|
sb.Append("class FormatTest {\n");
|
||||||
sb.Append(" VarByte: ").Append(VarByte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||||
sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n");
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||||
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
||||||
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
||||||
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
||||||
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
||||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||||
@ -374,28 +374,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value > (double)123.4)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value > (double)123.4)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value < (double)67.8)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value < (double)67.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) maximum
|
// Float (float) maximum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value > (float)987.6)
|
if (this.FloatOption.IsSet && this.FloatOption.Value > (float)987.6)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) minimum
|
// Float (float) minimum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value < (float)54.3)
|
if (this.FloatOption.IsSet && this.FloatOption.Value < (float)54.3)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
@ -452,13 +452,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null) {
|
if (this.StringOption.Value != null) {
|
||||||
// VarString (string) pattern
|
// String (string) pattern
|
||||||
Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null &&!regexVarString.Match(this.VarStringOption.Value).Success)
|
if (this.StringOption.Value != null &&!regexString.Match(this.StringOption.Value).Success)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -718,8 +718,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (formatTest.VarByte == null)
|
if (formatTest.Byte == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarByte), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Byte), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.Password == null)
|
if (formatTest.Password == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
||||||
@ -736,11 +736,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet && formatTest.VarString == null)
|
if (formatTest.StringOption.IsSet && formatTest.String == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarString), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.String), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
writer.WritePropertyName("byte");
|
writer.WritePropertyName("byte");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarByte, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions);
|
||||||
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
||||||
|
|
||||||
writer.WriteNumber("number", formatTest.Number);
|
writer.WriteNumber("number", formatTest.Number);
|
||||||
@ -755,16 +755,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.DateTimeOption.IsSet)
|
if (formatTest.DateTimeOption.IsSet)
|
||||||
writer.WriteString("dateTime", formatTest.DateTimeOption.Value!.Value.ToString(DateTimeFormat));
|
writer.WriteString("dateTime", formatTest.DateTimeOption.Value!.Value.ToString(DateTimeFormat));
|
||||||
|
|
||||||
if (formatTest.VarDecimalOption.IsSet)
|
if (formatTest.DecimalOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("decimal");
|
writer.WritePropertyName("decimal");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarDecimal, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Decimal, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
if (formatTest.VarDoubleOption.IsSet)
|
if (formatTest.DoubleOption.IsSet)
|
||||||
writer.WriteNumber("double", formatTest.VarDoubleOption.Value!.Value);
|
writer.WriteNumber("double", formatTest.DoubleOption.Value!.Value);
|
||||||
|
|
||||||
if (formatTest.VarFloatOption.IsSet)
|
if (formatTest.FloatOption.IsSet)
|
||||||
writer.WriteNumber("float", formatTest.VarFloatOption.Value!.Value);
|
writer.WriteNumber("float", formatTest.FloatOption.Value!.Value);
|
||||||
|
|
||||||
if (formatTest.Int32Option.IsSet)
|
if (formatTest.Int32Option.IsSet)
|
||||||
writer.WriteNumber("int32", formatTest.Int32Option.Value!.Value);
|
writer.WriteNumber("int32", formatTest.Int32Option.Value!.Value);
|
||||||
@ -784,8 +784,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
||||||
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet)
|
if (formatTest.StringOption.IsSet)
|
||||||
writer.WriteString("string", formatTest.VarString);
|
writer.WriteString("string", formatTest.String);
|
||||||
|
|
||||||
if (formatTest.UnsignedIntegerOption.IsSet)
|
if (formatTest.UnsignedIntegerOption.IsSet)
|
||||||
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value!.Value);
|
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value!.Value);
|
||||||
|
@ -247,11 +247,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (mammal.Pig != null) {
|
|
||||||
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
|
||||||
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mammal.Whale != null) {
|
if (mammal.Whale != null) {
|
||||||
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
||||||
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
||||||
@ -262,6 +257,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mammal.Pig != null) {
|
||||||
|
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
||||||
|
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
/// <param name="name">name</param>
|
/// <param name="name">name</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Model200Response(Option<string?> varClass = default, Option<int?> name = default)
|
public Model200Response(Option<string?> @class = default, Option<int?> name = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
NameOption = name;
|
NameOption = name;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
@ -47,17 +47,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string?> VarClassOption { get; private set; }
|
public Option<string?> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("class")]
|
[JsonPropertyName("class")]
|
||||||
public string? VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string? Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Name
|
/// Used to track the state of Name
|
||||||
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Model200Response {\n");
|
sb.Append("class Model200Response {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
@ -190,11 +190,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (model200Response.VarClassOption.IsSet && model200Response.VarClass == null)
|
if (model200Response.ClassOption.IsSet && model200Response.Class == null)
|
||||||
throw new ArgumentNullException(nameof(model200Response.VarClass), "Property is required for class Model200Response.");
|
throw new ArgumentNullException(nameof(model200Response.Class), "Property is required for class Model200Response.");
|
||||||
|
|
||||||
if (model200Response.VarClassOption.IsSet)
|
if (model200Response.ClassOption.IsSet)
|
||||||
writer.WriteString("class", model200Response.VarClass);
|
writer.WriteString("class", model200Response.Class);
|
||||||
|
|
||||||
if (model200Response.NameOption.IsSet)
|
if (model200Response.NameOption.IsSet)
|
||||||
writer.WriteNumber("name", model200Response.NameOption.Value!.Value);
|
writer.WriteNumber("name", model200Response.NameOption.Value!.Value);
|
||||||
|
@ -221,16 +221,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (nullableShape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nullableShape.Triangle != null) {
|
if (nullableShape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nullableShape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -123,9 +123,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varString != null)
|
|
||||||
return new OneOfString(varString);
|
|
||||||
|
|
||||||
if (varString != null)
|
if (varString != null)
|
||||||
return new OneOfString(varString);
|
return new OneOfString(varString);
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varObject"></param>
|
/// <param name="object"></param>
|
||||||
internal PolymorphicProperty(Object varObject)
|
internal PolymorphicProperty(Object @object)
|
||||||
{
|
{
|
||||||
VarObject = varObject;
|
Object = @object;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,9 +84,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string? VarString { get; set; }
|
public string? VarString { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarObject
|
/// Gets or Sets Object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Object? VarObject { get; set; }
|
public Object? Object { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets List
|
/// Gets or Sets List
|
||||||
@ -167,8 +167,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
OpenAPIClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderVarObject = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderVarObject, jsonSerializerOptions, out varObject);
|
OpenAPIClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<List<string>?>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
OpenAPIClientUtils.TryDeserialize<List<string>?>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
||||||
|
@ -221,16 +221,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (quadrilateral.ComplexQuadrilateral != null) {
|
|
||||||
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
|
||||||
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quadrilateral.SimpleQuadrilateral != null) {
|
if (quadrilateral.SimpleQuadrilateral != null) {
|
||||||
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
||||||
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quadrilateral.ComplexQuadrilateral != null) {
|
||||||
|
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
||||||
|
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -34,16 +34,34 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="lock">lock</param>
|
||||||
|
/// <param name="abstract">abstract</param>
|
||||||
/// <param name="varReturn">varReturn</param>
|
/// <param name="varReturn">varReturn</param>
|
||||||
|
/// <param name="unsafe">unsafe</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Return(Option<int?> varReturn = default)
|
public Return(string @lock, string? @abstract = default, Option<int?> varReturn = default, Option<string?> @unsafe = default)
|
||||||
{
|
{
|
||||||
|
Lock = @lock;
|
||||||
|
Abstract = @abstract;
|
||||||
VarReturnOption = varReturn;
|
VarReturnOption = varReturn;
|
||||||
|
UnsafeOption = @unsafe;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Lock
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("lock")]
|
||||||
|
public string Lock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Abstract
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("abstract")]
|
||||||
|
public string? Abstract { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarReturn
|
/// Used to track the state of VarReturn
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -57,6 +75,19 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonPropertyName("return")]
|
[JsonPropertyName("return")]
|
||||||
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to track the state of Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
public Option<string?> UnsafeOption { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("unsafe")]
|
||||||
|
public string? Unsafe { get { return this. UnsafeOption; } set { this.UnsafeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -71,7 +102,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Return {\n");
|
sb.Append("class Return {\n");
|
||||||
|
sb.Append(" Lock: ").Append(Lock).Append("\n");
|
||||||
|
sb.Append(" Abstract: ").Append(Abstract).Append("\n");
|
||||||
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
||||||
|
sb.Append(" Unsafe: ").Append(Unsafe).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -110,7 +144,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||||
|
|
||||||
|
Option<string?> varLock = default;
|
||||||
|
Option<string?> varAbstract = default;
|
||||||
Option<int?> varReturn = default;
|
Option<int?> varReturn = default;
|
||||||
|
Option<string?> varUnsafe = default;
|
||||||
|
|
||||||
while (utf8JsonReader.Read())
|
while (utf8JsonReader.Read())
|
||||||
{
|
{
|
||||||
@ -127,20 +164,41 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
switch (localVarJsonPropertyName)
|
switch (localVarJsonPropertyName)
|
||||||
{
|
{
|
||||||
|
case "lock":
|
||||||
|
varLock = new Option<string?>(utf8JsonReader.GetString()!);
|
||||||
|
break;
|
||||||
|
case "abstract":
|
||||||
|
varAbstract = new Option<string?>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
case "return":
|
case "return":
|
||||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||||
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
||||||
break;
|
break;
|
||||||
|
case "unsafe":
|
||||||
|
varUnsafe = new Option<string?>(utf8JsonReader.GetString()!);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!varLock.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varLock));
|
||||||
|
|
||||||
|
if (!varAbstract.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varAbstract));
|
||||||
|
|
||||||
|
if (varLock.IsSet && varLock.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
if (varReturn.IsSet && varReturn.Value == null)
|
if (varReturn.IsSet && varReturn.Value == null)
|
||||||
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
return new Return(varReturn);
|
if (varUnsafe.IsSet && varUnsafe.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
|
return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -167,8 +225,24 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
|
if (varReturn.Lock == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Lock), "Property is required for class Return.");
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet && varReturn.Unsafe == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Unsafe), "Property is required for class Return.");
|
||||||
|
|
||||||
|
writer.WriteString("lock", varReturn.Lock);
|
||||||
|
|
||||||
|
if (varReturn.Abstract != null)
|
||||||
|
writer.WriteString("abstract", varReturn.Abstract);
|
||||||
|
else
|
||||||
|
writer.WriteNull("abstract");
|
||||||
|
|
||||||
if (varReturn.VarReturnOption.IsSet)
|
if (varReturn.VarReturnOption.IsSet)
|
||||||
writer.WriteNumber("return", varReturn.VarReturnOption.Value!.Value);
|
writer.WriteNumber("return", varReturn.VarReturnOption.Value!.Value);
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet)
|
||||||
|
writer.WriteString("unsafe", varReturn.Unsafe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,16 +221,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shape.Triangle != null) {
|
if (shape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -221,16 +221,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shapeOrNull.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shapeOrNull.Triangle != null) {
|
if (shapeOrNull.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shapeOrNull.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[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,22 +4,22 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Date** | **DateOnly** | |
|
**Date** | **DateOnly** | |
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Password** | **string** | |
|
**Password** | **string** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Int32** | **int** | | [optional]
|
**Int32** | **int** | | [optional]
|
||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**Integer** | **int** | | [optional]
|
**Integer** | **int** | | [optional]
|
||||||
**PatternWithBackslash** | **string** | None | [optional]
|
**PatternWithBackslash** | **string** | None | [optional]
|
||||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
**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]
|
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**UnsignedInteger** | **uint** | | [optional]
|
**UnsignedInteger** | **uint** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Uuid** | **Guid** | | [optional]
|
**Uuid** | **Guid** | | [optional]
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model name starting with number
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **string** | | [optional]
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [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)
|
[[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,10 @@ Model for testing reserved words
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||||
|
|
||||||
|
@ -32,28 +32,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public ClassModel(Option<string> varClass = default)
|
public ClassModel(Option<string> @class = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarClassOption { get; private set; }
|
public Option<string> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("_class")]
|
[JsonPropertyName("_class")]
|
||||||
public string VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -164,11 +164,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (classModel.VarClassOption.IsSet && classModel.VarClass == null)
|
if (classModel.ClassOption.IsSet && classModel.Class == null)
|
||||||
throw new ArgumentNullException(nameof(classModel.VarClass), "Property is required for class ClassModel.");
|
throw new ArgumentNullException(nameof(classModel.Class), "Property is required for class ClassModel.");
|
||||||
|
|
||||||
if (classModel.VarClassOption.IsSet)
|
if (classModel.ClassOption.IsSet)
|
||||||
writer.WriteString("_class", classModel.VarClass);
|
writer.WriteString("_class", classModel.Class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,28 +32,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FooGetDefaultResponse(Option<Foo> varString = default)
|
public FooGetDefaultResponse(Option<Foo> @string = default)
|
||||||
{
|
{
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<Foo> VarStringOption { get; private set; }
|
public Option<Foo> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public Foo VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public Foo String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FooGetDefaultResponse {\n");
|
sb.Append("class FooGetDefaultResponse {\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -165,13 +165,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet && fooGetDefaultResponse.VarString == null)
|
if (fooGetDefaultResponse.StringOption.IsSet && fooGetDefaultResponse.String == null)
|
||||||
throw new ArgumentNullException(nameof(fooGetDefaultResponse.VarString), "Property is required for class FooGetDefaultResponse.");
|
throw new ArgumentNullException(nameof(fooGetDefaultResponse.String), "Property is required for class FooGetDefaultResponse.");
|
||||||
|
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet)
|
if (fooGetDefaultResponse.StringOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("string");
|
writer.WritePropertyName("string");
|
||||||
JsonSerializer.Serialize(writer, fooGetDefaultResponse.VarString, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, fooGetDefaultResponse.String, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,44 +32,44 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varByte">varByte</param>
|
/// <param name="byte">byte</param>
|
||||||
/// <param name="date">date</param>
|
/// <param name="date">date</param>
|
||||||
/// <param name="number">number</param>
|
/// <param name="number">number</param>
|
||||||
/// <param name="password">password</param>
|
/// <param name="password">password</param>
|
||||||
/// <param name="binary">binary</param>
|
/// <param name="binary">binary</param>
|
||||||
/// <param name="dateTime">dateTime</param>
|
/// <param name="dateTime">dateTime</param>
|
||||||
/// <param name="varDecimal">varDecimal</param>
|
/// <param name="decimal">decimal</param>
|
||||||
/// <param name="varDouble">varDouble</param>
|
/// <param name="double">double</param>
|
||||||
/// <param name="varFloat">varFloat</param>
|
/// <param name="float">float</param>
|
||||||
/// <param name="int32">int32</param>
|
/// <param name="int32">int32</param>
|
||||||
/// <param name="int64">int64</param>
|
/// <param name="int64">int64</param>
|
||||||
/// <param name="integer">integer</param>
|
/// <param name="integer">integer</param>
|
||||||
/// <param name="patternWithBackslash">None</param>
|
/// <param name="patternWithBackslash">None</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros.</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>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</param>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
/// <param name="unsignedInteger">unsignedInteger</param>
|
/// <param name="unsignedInteger">unsignedInteger</param>
|
||||||
/// <param name="unsignedLong">unsignedLong</param>
|
/// <param name="unsignedLong">unsignedLong</param>
|
||||||
/// <param name="uuid">uuid</param>
|
/// <param name="uuid">uuid</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FormatTest(byte[] varByte, DateOnly date, decimal number, string password, Option<System.IO.Stream> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> varDecimal = default, Option<double?> varDouble = default, Option<float?> varFloat = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string> patternWithBackslash = default, Option<string> patternWithDigits = default, Option<string> patternWithDigitsAndDelimiter = default, Option<string> varString = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
public FormatTest(byte[] @byte, DateOnly date, decimal number, string password, Option<System.IO.Stream> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> @decimal = default, Option<double?> @double = default, Option<float?> @float = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string> patternWithBackslash = default, Option<string> patternWithDigits = default, Option<string> patternWithDigitsAndDelimiter = default, Option<string> @string = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
||||||
{
|
{
|
||||||
VarByte = varByte;
|
Byte = @byte;
|
||||||
Date = date;
|
Date = date;
|
||||||
Number = number;
|
Number = number;
|
||||||
Password = password;
|
Password = password;
|
||||||
BinaryOption = binary;
|
BinaryOption = binary;
|
||||||
DateTimeOption = dateTime;
|
DateTimeOption = dateTime;
|
||||||
VarDecimalOption = varDecimal;
|
DecimalOption = @decimal;
|
||||||
VarDoubleOption = varDouble;
|
DoubleOption = @double;
|
||||||
VarFloatOption = varFloat;
|
FloatOption = @float;
|
||||||
Int32Option = int32;
|
Int32Option = int32;
|
||||||
Int64Option = int64;
|
Int64Option = int64;
|
||||||
IntegerOption = integer;
|
IntegerOption = integer;
|
||||||
PatternWithBackslashOption = patternWithBackslash;
|
PatternWithBackslashOption = patternWithBackslash;
|
||||||
PatternWithDigitsOption = patternWithDigits;
|
PatternWithDigitsOption = patternWithDigits;
|
||||||
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
UnsignedIntegerOption = unsignedInteger;
|
UnsignedIntegerOption = unsignedInteger;
|
||||||
UnsignedLongOption = unsignedLong;
|
UnsignedLongOption = unsignedLong;
|
||||||
UuidOption = uuid;
|
UuidOption = uuid;
|
||||||
@ -79,10 +79,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarByte
|
/// Gets or Sets Byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("byte")]
|
[JsonPropertyName("byte")]
|
||||||
public byte[] VarByte { get; set; }
|
public byte[] Byte { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Date
|
/// Gets or Sets Date
|
||||||
@ -131,43 +131,43 @@ namespace Org.OpenAPITools.Model
|
|||||||
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDecimal
|
/// Used to track the state of Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<decimal?> VarDecimalOption { get; private set; }
|
public Option<decimal?> DecimalOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDecimal
|
/// Gets or Sets Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("decimal")]
|
[JsonPropertyName("decimal")]
|
||||||
public decimal? VarDecimal { get { return this. VarDecimalOption; } set { this.VarDecimalOption = new(value); } }
|
public decimal? Decimal { get { return this. DecimalOption; } set { this.DecimalOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDouble
|
/// Used to track the state of Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<double?> VarDoubleOption { get; private set; }
|
public Option<double?> DoubleOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("double")]
|
[JsonPropertyName("double")]
|
||||||
public double? VarDouble { get { return this. VarDoubleOption; } set { this.VarDoubleOption = new(value); } }
|
public double? Double { get { return this. DoubleOption; } set { this.DoubleOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarFloat
|
/// Used to track the state of Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<float?> VarFloatOption { get; private set; }
|
public Option<float?> FloatOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("float")]
|
[JsonPropertyName("float")]
|
||||||
public float? VarFloat { get { return this. VarFloatOption; } set { this.VarFloatOption = new(value); } }
|
public float? Float { get { return this. FloatOption; } set { this.FloatOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Int32
|
/// Used to track the state of Int32
|
||||||
@ -251,17 +251,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
public string PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarStringOption { get; private set; }
|
public Option<string> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public string VarString { get { return this. VarStringOption; } set { this.VarStringOption = new(value); } }
|
public string String { get { return this. StringOption; } set { this.StringOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of UnsignedInteger
|
/// Used to track the state of UnsignedInteger
|
||||||
@ -317,22 +317,22 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FormatTest {\n");
|
sb.Append("class FormatTest {\n");
|
||||||
sb.Append(" VarByte: ").Append(VarByte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||||
sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n");
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||||
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
||||||
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
||||||
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
||||||
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
||||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||||
@ -372,28 +372,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value > (double)123.4)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value > (double)123.4)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value < (double)67.8)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value < (double)67.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) maximum
|
// Float (float) maximum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value > (float)987.6)
|
if (this.FloatOption.IsSet && this.FloatOption.Value > (float)987.6)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) minimum
|
// Float (float) minimum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value < (float)54.3)
|
if (this.FloatOption.IsSet && this.FloatOption.Value < (float)54.3)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
@ -450,13 +450,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null) {
|
if (this.StringOption.Value != null) {
|
||||||
// VarString (string) pattern
|
// String (string) pattern
|
||||||
Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null &&!regexVarString.Match(this.VarStringOption.Value).Success)
|
if (this.StringOption.Value != null &&!regexString.Match(this.StringOption.Value).Success)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -716,8 +716,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (formatTest.VarByte == null)
|
if (formatTest.Byte == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarByte), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Byte), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.Password == null)
|
if (formatTest.Password == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
||||||
@ -734,11 +734,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet && formatTest.VarString == null)
|
if (formatTest.StringOption.IsSet && formatTest.String == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarString), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.String), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
writer.WritePropertyName("byte");
|
writer.WritePropertyName("byte");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarByte, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions);
|
||||||
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
||||||
|
|
||||||
writer.WriteNumber("number", formatTest.Number);
|
writer.WriteNumber("number", formatTest.Number);
|
||||||
@ -753,16 +753,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.DateTimeOption.IsSet)
|
if (formatTest.DateTimeOption.IsSet)
|
||||||
writer.WriteString("dateTime", formatTest.DateTimeOption.Value.Value.ToString(DateTimeFormat));
|
writer.WriteString("dateTime", formatTest.DateTimeOption.Value.Value.ToString(DateTimeFormat));
|
||||||
|
|
||||||
if (formatTest.VarDecimalOption.IsSet)
|
if (formatTest.DecimalOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("decimal");
|
writer.WritePropertyName("decimal");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarDecimal, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Decimal, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
if (formatTest.VarDoubleOption.IsSet)
|
if (formatTest.DoubleOption.IsSet)
|
||||||
writer.WriteNumber("double", formatTest.VarDoubleOption.Value.Value);
|
writer.WriteNumber("double", formatTest.DoubleOption.Value.Value);
|
||||||
|
|
||||||
if (formatTest.VarFloatOption.IsSet)
|
if (formatTest.FloatOption.IsSet)
|
||||||
writer.WriteNumber("float", formatTest.VarFloatOption.Value.Value);
|
writer.WriteNumber("float", formatTest.FloatOption.Value.Value);
|
||||||
|
|
||||||
if (formatTest.Int32Option.IsSet)
|
if (formatTest.Int32Option.IsSet)
|
||||||
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
|
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
|
||||||
@ -782,8 +782,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
||||||
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet)
|
if (formatTest.StringOption.IsSet)
|
||||||
writer.WriteString("string", formatTest.VarString);
|
writer.WriteString("string", formatTest.String);
|
||||||
|
|
||||||
if (formatTest.UnsignedIntegerOption.IsSet)
|
if (formatTest.UnsignedIntegerOption.IsSet)
|
||||||
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value.Value);
|
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value.Value);
|
||||||
|
@ -245,11 +245,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (mammal.Pig != null) {
|
|
||||||
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
|
||||||
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mammal.Whale != null) {
|
if (mammal.Whale != null) {
|
||||||
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
||||||
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
||||||
@ -260,6 +255,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mammal.Pig != null) {
|
||||||
|
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
||||||
|
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
/// <param name="name">name</param>
|
/// <param name="name">name</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Model200Response(Option<string> varClass = default, Option<int?> name = default)
|
public Model200Response(Option<string> @class = default, Option<int?> name = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
NameOption = name;
|
NameOption = name;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
@ -45,17 +45,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarClassOption { get; private set; }
|
public Option<string> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("class")]
|
[JsonPropertyName("class")]
|
||||||
public string VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new(value); } }
|
public string Class { get { return this. ClassOption; } set { this.ClassOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Name
|
/// Used to track the state of Name
|
||||||
@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Model200Response {\n");
|
sb.Append("class Model200Response {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
@ -188,11 +188,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (model200Response.VarClassOption.IsSet && model200Response.VarClass == null)
|
if (model200Response.ClassOption.IsSet && model200Response.Class == null)
|
||||||
throw new ArgumentNullException(nameof(model200Response.VarClass), "Property is required for class Model200Response.");
|
throw new ArgumentNullException(nameof(model200Response.Class), "Property is required for class Model200Response.");
|
||||||
|
|
||||||
if (model200Response.VarClassOption.IsSet)
|
if (model200Response.ClassOption.IsSet)
|
||||||
writer.WriteString("class", model200Response.VarClass);
|
writer.WriteString("class", model200Response.Class);
|
||||||
|
|
||||||
if (model200Response.NameOption.IsSet)
|
if (model200Response.NameOption.IsSet)
|
||||||
writer.WriteNumber("name", model200Response.NameOption.Value.Value);
|
writer.WriteNumber("name", model200Response.NameOption.Value.Value);
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (nullableShape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nullableShape.Triangle != null) {
|
if (nullableShape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nullableShape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varString != null)
|
|
||||||
return new OneOfString(varString);
|
|
||||||
|
|
||||||
if (varString != null)
|
if (varString != null)
|
||||||
return new OneOfString(varString);
|
return new OneOfString(varString);
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varObject"></param>
|
/// <param name="object"></param>
|
||||||
internal PolymorphicProperty(Object varObject)
|
internal PolymorphicProperty(Object @object)
|
||||||
{
|
{
|
||||||
VarObject = varObject;
|
Object = @object;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,9 +82,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string VarString { get; set; }
|
public string VarString { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarObject
|
/// Gets or Sets Object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Object VarObject { get; set; }
|
public Object Object { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets List
|
/// Gets or Sets List
|
||||||
@ -165,8 +165,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
OpenAPIClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderVarObject = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<Object>(ref utf8JsonReaderVarObject, jsonSerializerOptions, out varObject);
|
OpenAPIClientUtils.TryDeserialize<Object>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<List<string>>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
OpenAPIClientUtils.TryDeserialize<List<string>>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (quadrilateral.ComplexQuadrilateral != null) {
|
|
||||||
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
|
||||||
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quadrilateral.SimpleQuadrilateral != null) {
|
if (quadrilateral.SimpleQuadrilateral != null) {
|
||||||
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
||||||
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quadrilateral.ComplexQuadrilateral != null) {
|
||||||
|
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
||||||
|
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -32,16 +32,34 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="lock">lock</param>
|
||||||
|
/// <param name="abstract">abstract</param>
|
||||||
/// <param name="varReturn">varReturn</param>
|
/// <param name="varReturn">varReturn</param>
|
||||||
|
/// <param name="unsafe">unsafe</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Return(Option<int?> varReturn = default)
|
public Return(string @lock, string @abstract = default, Option<int?> varReturn = default, Option<string> @unsafe = default)
|
||||||
{
|
{
|
||||||
|
Lock = @lock;
|
||||||
|
Abstract = @abstract;
|
||||||
VarReturnOption = varReturn;
|
VarReturnOption = varReturn;
|
||||||
|
UnsafeOption = @unsafe;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Lock
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("lock")]
|
||||||
|
public string Lock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Abstract
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("abstract")]
|
||||||
|
public string Abstract { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarReturn
|
/// Used to track the state of VarReturn
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,6 +73,19 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonPropertyName("return")]
|
[JsonPropertyName("return")]
|
||||||
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new(value); } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to track the state of Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
public Option<string> UnsafeOption { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("unsafe")]
|
||||||
|
public string Unsafe { get { return this. UnsafeOption; } set { this.UnsafeOption = new(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -69,7 +100,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Return {\n");
|
sb.Append("class Return {\n");
|
||||||
|
sb.Append(" Lock: ").Append(Lock).Append("\n");
|
||||||
|
sb.Append(" Abstract: ").Append(Abstract).Append("\n");
|
||||||
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
||||||
|
sb.Append(" Unsafe: ").Append(Unsafe).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -108,7 +142,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||||
|
|
||||||
|
Option<string> varLock = default;
|
||||||
|
Option<string> varAbstract = default;
|
||||||
Option<int?> varReturn = default;
|
Option<int?> varReturn = default;
|
||||||
|
Option<string> varUnsafe = default;
|
||||||
|
|
||||||
while (utf8JsonReader.Read())
|
while (utf8JsonReader.Read())
|
||||||
{
|
{
|
||||||
@ -125,20 +162,41 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
switch (localVarJsonPropertyName)
|
switch (localVarJsonPropertyName)
|
||||||
{
|
{
|
||||||
|
case "lock":
|
||||||
|
varLock = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
|
case "abstract":
|
||||||
|
varAbstract = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
case "return":
|
case "return":
|
||||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||||
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
||||||
break;
|
break;
|
||||||
|
case "unsafe":
|
||||||
|
varUnsafe = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!varLock.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varLock));
|
||||||
|
|
||||||
|
if (!varAbstract.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varAbstract));
|
||||||
|
|
||||||
|
if (varLock.IsSet && varLock.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
if (varReturn.IsSet && varReturn.Value == null)
|
if (varReturn.IsSet && varReturn.Value == null)
|
||||||
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
return new Return(varReturn);
|
if (varUnsafe.IsSet && varUnsafe.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
|
return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -165,8 +223,24 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
|
if (varReturn.Lock == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Lock), "Property is required for class Return.");
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet && varReturn.Unsafe == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Unsafe), "Property is required for class Return.");
|
||||||
|
|
||||||
|
writer.WriteString("lock", varReturn.Lock);
|
||||||
|
|
||||||
|
if (varReturn.Abstract != null)
|
||||||
|
writer.WriteString("abstract", varReturn.Abstract);
|
||||||
|
else
|
||||||
|
writer.WriteNull("abstract");
|
||||||
|
|
||||||
if (varReturn.VarReturnOption.IsSet)
|
if (varReturn.VarReturnOption.IsSet)
|
||||||
writer.WriteNumber("return", varReturn.VarReturnOption.Value.Value);
|
writer.WriteNumber("return", varReturn.VarReturnOption.Value.Value);
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet)
|
||||||
|
writer.WriteString("unsafe", varReturn.Unsafe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shape.Triangle != null) {
|
if (shape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shapeOrNull.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shapeOrNull.Triangle != null) {
|
if (shapeOrNull.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shapeOrNull.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[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,22 +4,22 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Date** | **DateTime** | |
|
**Date** | **DateTime** | |
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Password** | **string** | |
|
**Password** | **string** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Int32** | **int** | | [optional]
|
**Int32** | **int** | | [optional]
|
||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**Integer** | **int** | | [optional]
|
**Integer** | **int** | | [optional]
|
||||||
**PatternWithBackslash** | **string** | None | [optional]
|
**PatternWithBackslash** | **string** | None | [optional]
|
||||||
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
**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]
|
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**UnsignedInteger** | **uint** | | [optional]
|
**UnsignedInteger** | **uint** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Uuid** | **Guid** | | [optional]
|
**Uuid** | **Guid** | | [optional]
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model name starting with number
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **string** | | [optional]
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [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)
|
[[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,10 @@ Model for testing reserved words
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||||
|
|
||||||
|
@ -32,28 +32,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public ClassModel(Option<string> varClass = default)
|
public ClassModel(Option<string> @class = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarClassOption { get; private set; }
|
public Option<string> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("_class")]
|
[JsonPropertyName("_class")]
|
||||||
public string VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new Option<string>(value); } }
|
public string Class { get { return this. ClassOption; } set { this.ClassOption = new Option<string>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -164,11 +164,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (classModel.VarClassOption.IsSet && classModel.VarClass == null)
|
if (classModel.ClassOption.IsSet && classModel.Class == null)
|
||||||
throw new ArgumentNullException(nameof(classModel.VarClass), "Property is required for class ClassModel.");
|
throw new ArgumentNullException(nameof(classModel.Class), "Property is required for class ClassModel.");
|
||||||
|
|
||||||
if (classModel.VarClassOption.IsSet)
|
if (classModel.ClassOption.IsSet)
|
||||||
writer.WriteString("_class", classModel.VarClass);
|
writer.WriteString("_class", classModel.Class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,28 +32,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FooGetDefaultResponse(Option<Foo> varString = default)
|
public FooGetDefaultResponse(Option<Foo> @string = default)
|
||||||
{
|
{
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<Foo> VarStringOption { get; private set; }
|
public Option<Foo> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public Foo VarString { get { return this. VarStringOption; } set { this.VarStringOption = new Option<Foo>(value); } }
|
public Foo String { get { return this. StringOption; } set { this.StringOption = new Option<Foo>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FooGetDefaultResponse {\n");
|
sb.Append("class FooGetDefaultResponse {\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -165,13 +165,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet && fooGetDefaultResponse.VarString == null)
|
if (fooGetDefaultResponse.StringOption.IsSet && fooGetDefaultResponse.String == null)
|
||||||
throw new ArgumentNullException(nameof(fooGetDefaultResponse.VarString), "Property is required for class FooGetDefaultResponse.");
|
throw new ArgumentNullException(nameof(fooGetDefaultResponse.String), "Property is required for class FooGetDefaultResponse.");
|
||||||
|
|
||||||
if (fooGetDefaultResponse.VarStringOption.IsSet)
|
if (fooGetDefaultResponse.StringOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("string");
|
writer.WritePropertyName("string");
|
||||||
JsonSerializer.Serialize(writer, fooGetDefaultResponse.VarString, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, fooGetDefaultResponse.String, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,44 +32,44 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
/// Initializes a new instance of the <see cref="FormatTest" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varByte">varByte</param>
|
/// <param name="byte">byte</param>
|
||||||
/// <param name="date">date</param>
|
/// <param name="date">date</param>
|
||||||
/// <param name="number">number</param>
|
/// <param name="number">number</param>
|
||||||
/// <param name="password">password</param>
|
/// <param name="password">password</param>
|
||||||
/// <param name="binary">binary</param>
|
/// <param name="binary">binary</param>
|
||||||
/// <param name="dateTime">dateTime</param>
|
/// <param name="dateTime">dateTime</param>
|
||||||
/// <param name="varDecimal">varDecimal</param>
|
/// <param name="decimal">decimal</param>
|
||||||
/// <param name="varDouble">varDouble</param>
|
/// <param name="double">double</param>
|
||||||
/// <param name="varFloat">varFloat</param>
|
/// <param name="float">float</param>
|
||||||
/// <param name="int32">int32</param>
|
/// <param name="int32">int32</param>
|
||||||
/// <param name="int64">int64</param>
|
/// <param name="int64">int64</param>
|
||||||
/// <param name="integer">integer</param>
|
/// <param name="integer">integer</param>
|
||||||
/// <param name="patternWithBackslash">None</param>
|
/// <param name="patternWithBackslash">None</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros.</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>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</param>
|
||||||
/// <param name="varString">varString</param>
|
/// <param name="string">string</param>
|
||||||
/// <param name="unsignedInteger">unsignedInteger</param>
|
/// <param name="unsignedInteger">unsignedInteger</param>
|
||||||
/// <param name="unsignedLong">unsignedLong</param>
|
/// <param name="unsignedLong">unsignedLong</param>
|
||||||
/// <param name="uuid">uuid</param>
|
/// <param name="uuid">uuid</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public FormatTest(byte[] varByte, DateTime date, decimal number, string password, Option<System.IO.Stream> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> varDecimal = default, Option<double?> varDouble = default, Option<float?> varFloat = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string> patternWithBackslash = default, Option<string> patternWithDigits = default, Option<string> patternWithDigitsAndDelimiter = default, Option<string> varString = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option<System.IO.Stream> binary = default, Option<DateTime?> dateTime = default, Option<decimal?> @decimal = default, Option<double?> @double = default, Option<float?> @float = default, Option<int?> int32 = default, Option<long?> int64 = default, Option<int?> integer = default, Option<string> patternWithBackslash = default, Option<string> patternWithDigits = default, Option<string> patternWithDigitsAndDelimiter = default, Option<string> @string = default, Option<uint?> unsignedInteger = default, Option<ulong?> unsignedLong = default, Option<Guid?> uuid = default)
|
||||||
{
|
{
|
||||||
VarByte = varByte;
|
Byte = @byte;
|
||||||
Date = date;
|
Date = date;
|
||||||
Number = number;
|
Number = number;
|
||||||
Password = password;
|
Password = password;
|
||||||
BinaryOption = binary;
|
BinaryOption = binary;
|
||||||
DateTimeOption = dateTime;
|
DateTimeOption = dateTime;
|
||||||
VarDecimalOption = varDecimal;
|
DecimalOption = @decimal;
|
||||||
VarDoubleOption = varDouble;
|
DoubleOption = @double;
|
||||||
VarFloatOption = varFloat;
|
FloatOption = @float;
|
||||||
Int32Option = int32;
|
Int32Option = int32;
|
||||||
Int64Option = int64;
|
Int64Option = int64;
|
||||||
IntegerOption = integer;
|
IntegerOption = integer;
|
||||||
PatternWithBackslashOption = patternWithBackslash;
|
PatternWithBackslashOption = patternWithBackslash;
|
||||||
PatternWithDigitsOption = patternWithDigits;
|
PatternWithDigitsOption = patternWithDigits;
|
||||||
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
|
||||||
VarStringOption = varString;
|
StringOption = @string;
|
||||||
UnsignedIntegerOption = unsignedInteger;
|
UnsignedIntegerOption = unsignedInteger;
|
||||||
UnsignedLongOption = unsignedLong;
|
UnsignedLongOption = unsignedLong;
|
||||||
UuidOption = uuid;
|
UuidOption = uuid;
|
||||||
@ -79,10 +79,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarByte
|
/// Gets or Sets Byte
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("byte")]
|
[JsonPropertyName("byte")]
|
||||||
public byte[] VarByte { get; set; }
|
public byte[] Byte { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets Date
|
/// Gets or Sets Date
|
||||||
@ -131,43 +131,43 @@ namespace Org.OpenAPITools.Model
|
|||||||
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new Option<DateTime?>(value); } }
|
public DateTime? DateTime { get { return this. DateTimeOption; } set { this.DateTimeOption = new Option<DateTime?>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDecimal
|
/// Used to track the state of Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<decimal?> VarDecimalOption { get; private set; }
|
public Option<decimal?> DecimalOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDecimal
|
/// Gets or Sets Decimal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("decimal")]
|
[JsonPropertyName("decimal")]
|
||||||
public decimal? VarDecimal { get { return this. VarDecimalOption; } set { this.VarDecimalOption = new Option<decimal?>(value); } }
|
public decimal? Decimal { get { return this. DecimalOption; } set { this.DecimalOption = new Option<decimal?>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarDouble
|
/// Used to track the state of Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<double?> VarDoubleOption { get; private set; }
|
public Option<double?> DoubleOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarDouble
|
/// Gets or Sets Double
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("double")]
|
[JsonPropertyName("double")]
|
||||||
public double? VarDouble { get { return this. VarDoubleOption; } set { this.VarDoubleOption = new Option<double?>(value); } }
|
public double? Double { get { return this. DoubleOption; } set { this.DoubleOption = new Option<double?>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarFloat
|
/// Used to track the state of Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<float?> VarFloatOption { get; private set; }
|
public Option<float?> FloatOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarFloat
|
/// Gets or Sets Float
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("float")]
|
[JsonPropertyName("float")]
|
||||||
public float? VarFloat { get { return this. VarFloatOption; } set { this.VarFloatOption = new Option<float?>(value); } }
|
public float? Float { get { return this. FloatOption; } set { this.FloatOption = new Option<float?>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Int32
|
/// Used to track the state of Int32
|
||||||
@ -251,17 +251,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new Option<string>(value); } }
|
public string PatternWithDigitsAndDelimiter { get { return this. PatternWithDigitsAndDelimiterOption; } set { this.PatternWithDigitsAndDelimiterOption = new Option<string>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarString
|
/// Used to track the state of String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarStringOption { get; private set; }
|
public Option<string> StringOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarString
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("string")]
|
[JsonPropertyName("string")]
|
||||||
public string VarString { get { return this. VarStringOption; } set { this.VarStringOption = new Option<string>(value); } }
|
public string String { get { return this. StringOption; } set { this.StringOption = new Option<string>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of UnsignedInteger
|
/// Used to track the state of UnsignedInteger
|
||||||
@ -317,22 +317,22 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class FormatTest {\n");
|
sb.Append("class FormatTest {\n");
|
||||||
sb.Append(" VarByte: ").Append(VarByte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||||
sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n");
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" VarDouble: ").Append(VarDouble).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
sb.Append(" VarFloat: ").Append(VarFloat).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||||
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
|
||||||
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
|
||||||
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
|
||||||
sb.Append(" VarString: ").Append(VarString).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
|
||||||
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
|
||||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||||
@ -372,28 +372,28 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) maximum
|
// Double (double) maximum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value > (double)123.4)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value > (double)123.4)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarDouble (double) minimum
|
// Double (double) minimum
|
||||||
if (this.VarDoubleOption.IsSet && this.VarDoubleOption.Value < (double)67.8)
|
if (this.DoubleOption.IsSet && this.DoubleOption.Value < (double)67.8)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) maximum
|
// Float (float) maximum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value > (float)987.6)
|
if (this.FloatOption.IsSet && this.FloatOption.Value > (float)987.6)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// VarFloat (float) minimum
|
// Float (float) minimum
|
||||||
if (this.VarFloatOption.IsSet && this.VarFloatOption.Value < (float)54.3)
|
if (this.FloatOption.IsSet && this.FloatOption.Value < (float)54.3)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
@ -450,13 +450,13 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null) {
|
if (this.StringOption.Value != null) {
|
||||||
// VarString (string) pattern
|
// String (string) pattern
|
||||||
Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
if (this.VarStringOption.Value != null &&!regexVarString.Match(this.VarStringOption.Value).Success)
|
if (this.StringOption.Value != null &&!regexString.Match(this.StringOption.Value).Success)
|
||||||
{
|
{
|
||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -716,8 +716,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (formatTest.VarByte == null)
|
if (formatTest.Byte == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarByte), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Byte), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.Password == null)
|
if (formatTest.Password == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.Password), "Property is required for class FormatTest.");
|
||||||
@ -734,11 +734,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet && formatTest.PatternWithDigitsAndDelimiter == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.PatternWithDigitsAndDelimiter), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet && formatTest.VarString == null)
|
if (formatTest.StringOption.IsSet && formatTest.String == null)
|
||||||
throw new ArgumentNullException(nameof(formatTest.VarString), "Property is required for class FormatTest.");
|
throw new ArgumentNullException(nameof(formatTest.String), "Property is required for class FormatTest.");
|
||||||
|
|
||||||
writer.WritePropertyName("byte");
|
writer.WritePropertyName("byte");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarByte, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Byte, jsonSerializerOptions);
|
||||||
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
writer.WriteString("date", formatTest.Date.ToString(DateFormat));
|
||||||
|
|
||||||
writer.WriteNumber("number", formatTest.Number);
|
writer.WriteNumber("number", formatTest.Number);
|
||||||
@ -753,16 +753,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.DateTimeOption.IsSet)
|
if (formatTest.DateTimeOption.IsSet)
|
||||||
writer.WriteString("dateTime", formatTest.DateTimeOption.Value.Value.ToString(DateTimeFormat));
|
writer.WriteString("dateTime", formatTest.DateTimeOption.Value.Value.ToString(DateTimeFormat));
|
||||||
|
|
||||||
if (formatTest.VarDecimalOption.IsSet)
|
if (formatTest.DecimalOption.IsSet)
|
||||||
{
|
{
|
||||||
writer.WritePropertyName("decimal");
|
writer.WritePropertyName("decimal");
|
||||||
JsonSerializer.Serialize(writer, formatTest.VarDecimal, jsonSerializerOptions);
|
JsonSerializer.Serialize(writer, formatTest.Decimal, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
if (formatTest.VarDoubleOption.IsSet)
|
if (formatTest.DoubleOption.IsSet)
|
||||||
writer.WriteNumber("double", formatTest.VarDoubleOption.Value.Value);
|
writer.WriteNumber("double", formatTest.DoubleOption.Value.Value);
|
||||||
|
|
||||||
if (formatTest.VarFloatOption.IsSet)
|
if (formatTest.FloatOption.IsSet)
|
||||||
writer.WriteNumber("float", formatTest.VarFloatOption.Value.Value);
|
writer.WriteNumber("float", formatTest.FloatOption.Value.Value);
|
||||||
|
|
||||||
if (formatTest.Int32Option.IsSet)
|
if (formatTest.Int32Option.IsSet)
|
||||||
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
|
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
|
||||||
@ -782,8 +782,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
if (formatTest.PatternWithDigitsAndDelimiterOption.IsSet)
|
||||||
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter);
|
||||||
|
|
||||||
if (formatTest.VarStringOption.IsSet)
|
if (formatTest.StringOption.IsSet)
|
||||||
writer.WriteString("string", formatTest.VarString);
|
writer.WriteString("string", formatTest.String);
|
||||||
|
|
||||||
if (formatTest.UnsignedIntegerOption.IsSet)
|
if (formatTest.UnsignedIntegerOption.IsSet)
|
||||||
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value.Value);
|
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.Value.Value);
|
||||||
|
@ -245,11 +245,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (mammal.Pig != null) {
|
|
||||||
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
|
||||||
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mammal.Whale != null) {
|
if (mammal.Whale != null) {
|
||||||
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
WhaleJsonConverter whaleJsonConverter = (WhaleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Whale.GetType()));
|
||||||
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
whaleJsonConverter.WriteProperties(ref writer, mammal.Whale, jsonSerializerOptions);
|
||||||
@ -260,6 +255,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
zebraJsonConverter.WriteProperties(ref writer, mammal.Zebra, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mammal.Pig != null) {
|
||||||
|
PigJsonConverter pigJsonConverter = (PigJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(mammal.Pig.GetType()));
|
||||||
|
pigJsonConverter.WriteProperties(ref writer, mammal.Pig, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
WriteProperties(ref writer, mammal, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varClass">varClass</param>
|
/// <param name="class">class</param>
|
||||||
/// <param name="name">name</param>
|
/// <param name="name">name</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Model200Response(Option<string> varClass = default, Option<int?> name = default)
|
public Model200Response(Option<string> @class = default, Option<int?> name = default)
|
||||||
{
|
{
|
||||||
VarClassOption = varClass;
|
ClassOption = @class;
|
||||||
NameOption = name;
|
NameOption = name;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
@ -45,17 +45,17 @@ namespace Org.OpenAPITools.Model
|
|||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarClass
|
/// Used to track the state of Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
public Option<string> VarClassOption { get; private set; }
|
public Option<string> ClassOption { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("class")]
|
[JsonPropertyName("class")]
|
||||||
public string VarClass { get { return this. VarClassOption; } set { this.VarClassOption = new Option<string>(value); } }
|
public string Class { get { return this. ClassOption; } set { this.ClassOption = new Option<string>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of Name
|
/// Used to track the state of Name
|
||||||
@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Model200Response {\n");
|
sb.Append("class Model200Response {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
@ -188,11 +188,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
if (model200Response.VarClassOption.IsSet && model200Response.VarClass == null)
|
if (model200Response.ClassOption.IsSet && model200Response.Class == null)
|
||||||
throw new ArgumentNullException(nameof(model200Response.VarClass), "Property is required for class Model200Response.");
|
throw new ArgumentNullException(nameof(model200Response.Class), "Property is required for class Model200Response.");
|
||||||
|
|
||||||
if (model200Response.VarClassOption.IsSet)
|
if (model200Response.ClassOption.IsSet)
|
||||||
writer.WriteString("class", model200Response.VarClass);
|
writer.WriteString("class", model200Response.Class);
|
||||||
|
|
||||||
if (model200Response.NameOption.IsSet)
|
if (model200Response.NameOption.IsSet)
|
||||||
writer.WriteNumber("name", model200Response.NameOption.Value.Value);
|
writer.WriteNumber("name", model200Response.NameOption.Value.Value);
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (nullableShape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nullableShape.Triangle != null) {
|
if (nullableShape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, nullableShape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nullableShape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(nullableShape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, nullableShape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
WriteProperties(ref writer, nullableShape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varString != null)
|
|
||||||
return new OneOfString(varString);
|
|
||||||
|
|
||||||
if (varString != null)
|
if (varString != null)
|
||||||
return new OneOfString(varString);
|
return new OneOfString(varString);
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="varObject"></param>
|
/// <param name="object"></param>
|
||||||
internal PolymorphicProperty(Object varObject)
|
internal PolymorphicProperty(Object @object)
|
||||||
{
|
{
|
||||||
VarObject = varObject;
|
Object = @object;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,9 +82,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
public string VarString { get; set; }
|
public string VarString { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarObject
|
/// Gets or Sets Object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Object VarObject { get; set; }
|
public Object Object { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets List
|
/// Gets or Sets List
|
||||||
@ -165,8 +165,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
OpenAPIClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderVarObject = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<Object>(ref utf8JsonReaderVarObject, jsonSerializerOptions, out varObject);
|
OpenAPIClientUtils.TryDeserialize<Object>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);
|
||||||
|
|
||||||
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
Utf8JsonReader utf8JsonReaderList = utf8JsonReader;
|
||||||
OpenAPIClientUtils.TryDeserialize<List<string>>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
OpenAPIClientUtils.TryDeserialize<List<string>>(ref utf8JsonReaderList, jsonSerializerOptions, out list);
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (quadrilateral.ComplexQuadrilateral != null) {
|
|
||||||
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
|
||||||
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quadrilateral.SimpleQuadrilateral != null) {
|
if (quadrilateral.SimpleQuadrilateral != null) {
|
||||||
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
SimpleQuadrilateralJsonConverter simpleQuadrilateralJsonConverter = (SimpleQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.SimpleQuadrilateral.GetType()));
|
||||||
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
simpleQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.SimpleQuadrilateral, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quadrilateral.ComplexQuadrilateral != null) {
|
||||||
|
ComplexQuadrilateralJsonConverter complexQuadrilateralJsonConverter = (ComplexQuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(quadrilateral.ComplexQuadrilateral.GetType()));
|
||||||
|
complexQuadrilateralJsonConverter.WriteProperties(ref writer, quadrilateral.ComplexQuadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
WriteProperties(ref writer, quadrilateral, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -32,16 +32,34 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="lock">lock</param>
|
||||||
|
/// <param name="abstract">abstract</param>
|
||||||
/// <param name="varReturn">varReturn</param>
|
/// <param name="varReturn">varReturn</param>
|
||||||
|
/// <param name="unsafe">unsafe</param>
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public Return(Option<int?> varReturn = default)
|
public Return(string @lock, string @abstract = default, Option<int?> varReturn = default, Option<string> @unsafe = default)
|
||||||
{
|
{
|
||||||
|
Lock = @lock;
|
||||||
|
Abstract = @abstract;
|
||||||
VarReturnOption = varReturn;
|
VarReturnOption = varReturn;
|
||||||
|
UnsafeOption = @unsafe;
|
||||||
OnCreated();
|
OnCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Lock
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("lock")]
|
||||||
|
public string Lock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Abstract
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("abstract")]
|
||||||
|
public string Abstract { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to track the state of VarReturn
|
/// Used to track the state of VarReturn
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,6 +73,19 @@ namespace Org.OpenAPITools.Model
|
|||||||
[JsonPropertyName("return")]
|
[JsonPropertyName("return")]
|
||||||
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new Option<int?>(value); } }
|
public int? VarReturn { get { return this. VarReturnOption; } set { this.VarReturnOption = new Option<int?>(value); } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to track the state of Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
public Option<string> UnsafeOption { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Unsafe
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("unsafe")]
|
||||||
|
public string Unsafe { get { return this. UnsafeOption; } set { this.UnsafeOption = new Option<string>(value); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -69,7 +100,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class Return {\n");
|
sb.Append("class Return {\n");
|
||||||
|
sb.Append(" Lock: ").Append(Lock).Append("\n");
|
||||||
|
sb.Append(" Abstract: ").Append(Abstract).Append("\n");
|
||||||
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
sb.Append(" VarReturn: ").Append(VarReturn).Append("\n");
|
||||||
|
sb.Append(" Unsafe: ").Append(Unsafe).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -108,7 +142,10 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||||
|
|
||||||
|
Option<string> varLock = default;
|
||||||
|
Option<string> varAbstract = default;
|
||||||
Option<int?> varReturn = default;
|
Option<int?> varReturn = default;
|
||||||
|
Option<string> varUnsafe = default;
|
||||||
|
|
||||||
while (utf8JsonReader.Read())
|
while (utf8JsonReader.Read())
|
||||||
{
|
{
|
||||||
@ -125,20 +162,41 @@ namespace Org.OpenAPITools.Model
|
|||||||
|
|
||||||
switch (localVarJsonPropertyName)
|
switch (localVarJsonPropertyName)
|
||||||
{
|
{
|
||||||
|
case "lock":
|
||||||
|
varLock = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
|
case "abstract":
|
||||||
|
varAbstract = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
case "return":
|
case "return":
|
||||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||||
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
varReturn = new Option<int?>(utf8JsonReader.GetInt32());
|
||||||
break;
|
break;
|
||||||
|
case "unsafe":
|
||||||
|
varUnsafe = new Option<string>(utf8JsonReader.GetString());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!varLock.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varLock));
|
||||||
|
|
||||||
|
if (!varAbstract.IsSet)
|
||||||
|
throw new ArgumentException("Property is required for class Return.", nameof(varAbstract));
|
||||||
|
|
||||||
|
if (varLock.IsSet && varLock.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
if (varReturn.IsSet && varReturn.Value == null)
|
if (varReturn.IsSet && varReturn.Value == null)
|
||||||
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
return new Return(varReturn);
|
if (varUnsafe.IsSet && varUnsafe.Value == null)
|
||||||
|
throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return.");
|
||||||
|
|
||||||
|
return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -165,8 +223,24 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <exception cref="NotImplementedException"></exception>
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSerializerOptions jsonSerializerOptions)
|
||||||
{
|
{
|
||||||
|
if (varReturn.Lock == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Lock), "Property is required for class Return.");
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet && varReturn.Unsafe == null)
|
||||||
|
throw new ArgumentNullException(nameof(varReturn.Unsafe), "Property is required for class Return.");
|
||||||
|
|
||||||
|
writer.WriteString("lock", varReturn.Lock);
|
||||||
|
|
||||||
|
if (varReturn.Abstract != null)
|
||||||
|
writer.WriteString("abstract", varReturn.Abstract);
|
||||||
|
else
|
||||||
|
writer.WriteNull("abstract");
|
||||||
|
|
||||||
if (varReturn.VarReturnOption.IsSet)
|
if (varReturn.VarReturnOption.IsSet)
|
||||||
writer.WriteNumber("return", varReturn.VarReturnOption.Value.Value);
|
writer.WriteNumber("return", varReturn.VarReturnOption.Value.Value);
|
||||||
|
|
||||||
|
if (varReturn.UnsafeOption.IsSet)
|
||||||
|
writer.WriteString("unsafe", varReturn.Unsafe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shape.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shape.Triangle != null) {
|
if (shape.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shape.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shape.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shape.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shape.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
WriteProperties(ref writer, shape, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -219,16 +219,16 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
writer.WriteStartObject();
|
writer.WriteStartObject();
|
||||||
|
|
||||||
if (shapeOrNull.Quadrilateral != null) {
|
|
||||||
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
|
||||||
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shapeOrNull.Triangle != null) {
|
if (shapeOrNull.Triangle != null) {
|
||||||
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
TriangleJsonConverter triangleJsonConverter = (TriangleJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Triangle.GetType()));
|
||||||
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
triangleJsonConverter.WriteProperties(ref writer, shapeOrNull.Triangle, jsonSerializerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shapeOrNull.Quadrilateral != null) {
|
||||||
|
QuadrilateralJsonConverter quadrilateralJsonConverter = (QuadrilateralJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(shapeOrNull.Quadrilateral.GetType()));
|
||||||
|
quadrilateralJsonConverter.WriteProperties(ref writer, shapeOrNull.Quadrilateral, jsonSerializerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
WriteProperties(ref writer, shapeOrNull, jsonSerializerOptions);
|
||||||
writer.WriteEndObject();
|
writer.WriteEndObject();
|
||||||
}
|
}
|
||||||
|
@ -1490,6 +1490,16 @@ components:
|
|||||||
return:
|
return:
|
||||||
format: int32
|
format: int32
|
||||||
type: integer
|
type: integer
|
||||||
|
lock:
|
||||||
|
type: string
|
||||||
|
abstract:
|
||||||
|
nullable: true
|
||||||
|
type: string
|
||||||
|
unsafe:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- abstract
|
||||||
|
- lock
|
||||||
xml:
|
xml:
|
||||||
name: Return
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
|
@ -5,7 +5,7 @@ Model for testing model with \"_class\" property
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[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,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarString** | [**Foo**](Foo.md) | | [optional]
|
**String** | [**Foo**](Foo.md) | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ Name | Type | Description | Notes
|
|||||||
**Int64** | **long** | | [optional]
|
**Int64** | **long** | | [optional]
|
||||||
**UnsignedLong** | **ulong** | | [optional]
|
**UnsignedLong** | **ulong** | | [optional]
|
||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**VarFloat** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**VarDouble** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
**VarDecimal** | **decimal** | | [optional]
|
**Decimal** | **decimal** | | [optional]
|
||||||
**VarString** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**VarByte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | [**FileParameter**](FileParameter.md) | | [optional]
|
**Binary** | [**FileParameter**](FileParameter.md) | | [optional]
|
||||||
**Date** | **DateTime** | |
|
**Date** | **DateTime** | |
|
||||||
**DateTime** | **DateTime** | | [optional]
|
**DateTime** | **DateTime** | | [optional]
|
||||||
|
@ -6,7 +6,7 @@ Model for testing model name starting with number
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Name** | **int** | | [optional]
|
**Name** | **int** | | [optional]
|
||||||
**VarClass** | **string** | | [optional]
|
**Class** | **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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ Model for testing reserved words
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**VarReturn** | **int** | | [optional]
|
**VarReturn** | **int** | | [optional]
|
||||||
|
**Lock** | **string** | |
|
||||||
|
**Abstract** | **string** | |
|
||||||
|
**Unsafe** | **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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -39,15 +39,15 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="varClass">varClass.</param>
|
/// <param name="varClass">varClass.</param>
|
||||||
public ClassModel(string varClass = default(string))
|
public ClassModel(string varClass = default(string))
|
||||||
{
|
{
|
||||||
this.VarClass = varClass;
|
this.Class = varClass;
|
||||||
this.AdditionalProperties = new Dictionary<string, object>();
|
this.AdditionalProperties = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets VarClass
|
/// Gets or Sets Class
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
||||||
public string VarClass { get; set; }
|
public string Class { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets additional properties
|
/// Gets or Sets additional properties
|
||||||
@ -63,7 +63,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append("class ClassModel {\n");
|
sb.Append("class ClassModel {\n");
|
||||||
sb.Append(" VarClass: ").Append(VarClass).Append("\n");
|
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||||
sb.Append("}\n");
|
sb.Append("}\n");
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
@ -107,9 +107,9 @@ namespace Org.OpenAPITools.Model
|
|||||||
unchecked // Overflow is fine, just wrap
|
unchecked // Overflow is fine, just wrap
|
||||||
{
|
{
|
||||||
int hashCode = 41;
|
int hashCode = 41;
|
||||||
if (this.VarClass != null)
|
if (this.Class != null)
|
||||||
{
|
{
|
||||||
hashCode = (hashCode * 59) + this.VarClass.GetHashCode();
|
hashCode = (hashCode * 59) + this.Class.GetHashCode();
|
||||||
}
|
}
|
||||||
if (this.AdditionalProperties != null)
|
if (this.AdditionalProperties != null)
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user