forked from loafle/openapi-generator-original
removed warnings (#15706)
This commit is contained in:
parent
63a311a2e6
commit
f769070fa3
@ -28,7 +28,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="{{classname}}"/> class.
|
||||
/// Initializes a new instance of the <see cref="ApiFactory"/> class.
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
public ApiFactory(IServiceProvider services)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/// <summary>
|
||||
/// A Json converter for type {{classname}}
|
||||
/// A Json converter for type <see cref="{{classname}}" />
|
||||
/// </summary>
|
||||
{{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}>
|
||||
{
|
||||
@ -20,7 +20,7 @@
|
||||
{{/isDate}}
|
||||
{{/allVars}}
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="{{classname}}" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -131,12 +131,16 @@
|
||||
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32();
|
||||
{{/isNumeric}}
|
||||
{{^isNumeric}}
|
||||
string {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = utf8JsonReader.GetString();
|
||||
string{{nrt?}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = utf8JsonReader.GetString();
|
||||
{{^isInnerEnum}}
|
||||
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{{datatypeWithEnum}}}Converter.FromString{{#isNullable}}OrDefault{{/isNullable}}({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue);
|
||||
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue == null
|
||||
? null
|
||||
: {{{datatypeWithEnum}}}Converter.FromStringOrDefault({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue);
|
||||
{{/isInnerEnum}}
|
||||
{{#isInnerEnum}}
|
||||
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{classname}}.{{{datatypeWithEnum}}}FromString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue);
|
||||
{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue == null
|
||||
? null
|
||||
: {{classname}}.{{{datatypeWithEnum}}}FromStringOrDefault({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue);
|
||||
{{/isInnerEnum}}
|
||||
{{/isNumeric}}
|
||||
{{/isMap}}
|
||||
@ -191,7 +195,7 @@
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="{{classname}}" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="{{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}"></param>
|
||||
|
@ -64,7 +64,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
_nextAvailable = DateTime.UtcNow.AddSeconds(5);
|
||||
}
|
||||
|
||||
private void OnTimer(object sender, System.Timers.ElapsedEventArgs e)
|
||||
private void OnTimer(object{{nrt?}} sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (TokenBecameAvailable != null && !IsRateLimited)
|
||||
TokenBecameAvailable.Invoke(this);
|
||||
|
@ -146,9 +146,9 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
{{#allParams}}
|
||||
{{/-first}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{/allParams}}
|
||||
{{#-last}}
|
||||
/// <returns></returns>
|
||||
private void Validate{{operationId}}({{#requiredAndNotNullableParams}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}})
|
||||
{
|
||||
@ -177,7 +177,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
}
|
||||
|
||||
{{/-first}}
|
||||
{{/-last}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@ -211,7 +211,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
|
||||
{{/allParams}}
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="{{#returnProperty}}{{baseType}}{{#isContainer}}{{#isMap}}{TKey, TValue}{{/isMap}}{{^isMap}}{TValue}{{/isMap}}{{/isContainer}}{{/returnProperty}}{{^returnProperty}}object{{/returnProperty}}"/></returns>
|
||||
public async Task<ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}>{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}})
|
||||
{
|
||||
try
|
||||
@ -232,7 +232,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
|
||||
{{/allParams}}
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="{{#returnProperty}}{{baseType}}{{#isContainer}}{{#isMap}}{TKey, TValue}{{/isMap}}{{^isMap}}{TValue}{{/isMap}}{{/isContainer}}{{/returnProperty}}{{^returnProperty}}object{{/returnProperty}}"/></returns>
|
||||
public async Task<ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}>> {{operationId}}Async({{>OperationSignature}})
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
@ -43,8 +43,17 @@
|
||||
}
|
||||
{{#useGenericHost}}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} FromString(string value)
|
||||
{
|
||||
{{#allowableValues}}
|
||||
@ -57,6 +66,11 @@
|
||||
throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? FromStringOrDefault(string value)
|
||||
{
|
||||
{{#allowableValues}}
|
||||
@ -69,6 +83,12 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static {{>EnumValueDataType}} ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value)
|
||||
{
|
||||
{{^isString}}
|
||||
@ -97,8 +117,10 @@
|
||||
{
|
||||
string{{nrt?}} rawValue = reader.GetString();
|
||||
|
||||
{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromString(rawValue);
|
||||
|
||||
{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null
|
||||
? null
|
||||
: {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -117,6 +139,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -130,10 +155,9 @@
|
||||
{
|
||||
string{{nrt?}} rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromString(rawValue);
|
||||
{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null
|
||||
? null
|
||||
: {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -32,11 +32,12 @@
|
||||
{{#useGenericHost}}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}
|
||||
/// Returns a <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#isNullable}}?{{/isNullable}} {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromString(string value)
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromString(string value)
|
||||
{
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
@ -45,20 +46,34 @@
|
||||
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
{{#isNullable}}
|
||||
return null;
|
||||
{{/isNullable}}
|
||||
{{^isNullable}}
|
||||
throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'");
|
||||
{{/isNullable}}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromStringOrDefault(string value)
|
||||
{
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
if (value == {{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})
|
||||
return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}};
|
||||
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
{{#isString}}
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
{{/isString}}
|
||||
public static {{>EnumValueDataType}} {{datatypeWithEnum}}ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value)
|
||||
{
|
||||
{{^isString}}
|
||||
|
@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Hello Hello
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Guid>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Guid>>?> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -434,7 +434,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Guid>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Guid>>> HelloAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
@ -951,7 +951,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
{
|
||||
@ -1112,7 +1111,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Array of Enums
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<OuterEnum>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<OuterEnum>>?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -1130,7 +1129,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<OuterEnum>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
@ -1586,16 +1585,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="number"></param>
|
||||
/// <param name="varDouble"></param>
|
||||
/// <param name="patternWithoutDelimiter"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <param name="binary"></param>
|
||||
/// <param name="varFloat"></param>
|
||||
/// <param name="integer"></param>
|
||||
/// <param name="int32"></param>
|
||||
/// <param name="int64"></param>
|
||||
/// <param name="varString"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
{
|
||||
@ -2005,9 +1994,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredBooleanGroup"></param>
|
||||
/// <param name="requiredStringGroup"></param>
|
||||
/// <param name="requiredInt64Group"></param>
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
{
|
||||
|
@ -481,7 +481,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeletePet(long petId)
|
||||
{
|
||||
@ -651,7 +650,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -670,7 +669,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
@ -802,7 +801,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -821,7 +820,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
@ -1194,8 +1193,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePetWithForm(long petId)
|
||||
{
|
||||
@ -1348,8 +1345,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFile(long petId)
|
||||
{
|
||||
@ -1512,7 +1507,6 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId)
|
||||
{
|
||||
|
@ -329,7 +329,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Dictionary<string, int>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Dictionary{TKey, TValue}"/></returns>
|
||||
public async Task<ApiResponse<Dictionary<string, int>>?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -347,7 +347,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Dictionary<string, int>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Dictionary{TKey, TValue}"/></returns>
|
||||
public async Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
@ -28,7 +28,7 @@ namespace Org.OpenAPITools.Client
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref=""/> class.
|
||||
/// Initializes a new instance of the <see cref="ApiFactory"/> class.
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
public ApiFactory(IServiceProvider services)
|
||||
|
@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Client
|
||||
_nextAvailable = DateTime.UtcNow.AddSeconds(5);
|
||||
}
|
||||
|
||||
private void OnTimer(object sender, System.Timers.ElapsedEventArgs e)
|
||||
private void OnTimer(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (TokenBecameAvailable != null && !IsRateLimited)
|
||||
TokenBecameAvailable.Invoke(this);
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Activity
|
||||
/// A Json converter for type <see cref="Activity" />
|
||||
/// </summary>
|
||||
public class ActivityJsonConverter : JsonConverter<Activity>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Activity" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Activity" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="activity"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ActivityOutputElementRepresentation
|
||||
/// A Json converter for type <see cref="ActivityOutputElementRepresentation" />
|
||||
/// </summary>
|
||||
public class ActivityOutputElementRepresentationJsonConverter : JsonConverter<ActivityOutputElementRepresentation>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ActivityOutputElementRepresentation" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ActivityOutputElementRepresentation" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="activityOutputElementRepresentation"></param>
|
||||
|
@ -145,12 +145,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type AdditionalPropertiesClass
|
||||
/// A Json converter for type <see cref="AdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
public class AdditionalPropertiesClassJsonConverter : JsonConverter<AdditionalPropertiesClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="AdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -253,7 +253,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="AdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="additionalPropertiesClass"></param>
|
||||
|
@ -100,12 +100,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Animal
|
||||
/// A Json converter for type <see cref="Animal" />
|
||||
/// </summary>
|
||||
public class AnimalJsonConverter : JsonConverter<Animal>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Animal" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -161,7 +161,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Animal" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="animal"></param>
|
||||
|
@ -99,12 +99,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ApiResponse
|
||||
/// A Json converter for type <see cref="ApiResponse" />
|
||||
/// </summary>
|
||||
public class ApiResponseJsonConverter : JsonConverter<ApiResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ApiResponse" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -168,7 +168,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ApiResponse" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="apiResponse"></param>
|
||||
|
@ -104,12 +104,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Apple
|
||||
/// A Json converter for type <see cref="Apple" />
|
||||
/// </summary>
|
||||
public class AppleJsonConverter : JsonConverter<Apple>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Apple" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -165,7 +165,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Apple" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="apple"></param>
|
||||
|
@ -83,12 +83,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type AppleReq
|
||||
/// A Json converter for type <see cref="AppleReq" />
|
||||
/// </summary>
|
||||
public class AppleReqJsonConverter : JsonConverter<AppleReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="AppleReq" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -145,7 +145,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="AppleReq" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="appleReq"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayOfArrayOfNumberOnly
|
||||
/// A Json converter for type <see cref="ArrayOfArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
public class ArrayOfArrayOfNumberOnlyJsonConverter : JsonConverter<ArrayOfArrayOfNumberOnly>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ArrayOfArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ArrayOfArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="arrayOfArrayOfNumberOnly"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayOfNumberOnly
|
||||
/// A Json converter for type <see cref="ArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
public class ArrayOfNumberOnlyJsonConverter : JsonConverter<ArrayOfNumberOnly>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ArrayOfNumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="arrayOfNumberOnly"></param>
|
||||
|
@ -99,12 +99,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ArrayTest
|
||||
/// A Json converter for type <see cref="ArrayTest" />
|
||||
/// </summary>
|
||||
public class ArrayTestJsonConverter : JsonConverter<ArrayTest>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ArrayTest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -170,7 +170,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ArrayTest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="arrayTest"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Banana
|
||||
/// A Json converter for type <see cref="Banana" />
|
||||
/// </summary>
|
||||
public class BananaJsonConverter : JsonConverter<Banana>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Banana" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Banana" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="banana"></param>
|
||||
|
@ -83,12 +83,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type BananaReq
|
||||
/// A Json converter for type <see cref="BananaReq" />
|
||||
/// </summary>
|
||||
public class BananaReqJsonConverter : JsonConverter<BananaReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="BananaReq" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -146,7 +146,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="BananaReq" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="bananaReq"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type BasquePig
|
||||
/// A Json converter for type <see cref="BasquePig" />
|
||||
/// </summary>
|
||||
public class BasquePigJsonConverter : JsonConverter<BasquePig>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="BasquePig" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="BasquePig" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="basquePig"></param>
|
||||
|
@ -127,12 +127,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Capitalization
|
||||
/// A Json converter for type <see cref="Capitalization" />
|
||||
/// </summary>
|
||||
public class CapitalizationJsonConverter : JsonConverter<Capitalization>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Capitalization" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Capitalization" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="capitalization"></param>
|
||||
|
@ -72,12 +72,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Cat
|
||||
/// A Json converter for type <see cref="Cat" />
|
||||
/// </summary>
|
||||
public class CatJsonConverter : JsonConverter<Cat>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Cat" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -133,7 +133,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Cat" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="cat"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type CatAllOf
|
||||
/// A Json converter for type <see cref="CatAllOf" />
|
||||
/// </summary>
|
||||
public class CatAllOfJsonConverter : JsonConverter<CatAllOf>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="CatAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="CatAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="catAllOf"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Category
|
||||
/// A Json converter for type <see cref="Category" />
|
||||
/// </summary>
|
||||
public class CategoryJsonConverter : JsonConverter<Category>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Category" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Category" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="category"></param>
|
||||
|
@ -64,12 +64,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ChildCat
|
||||
/// A Json converter for type <see cref="ChildCat" />
|
||||
/// </summary>
|
||||
public class ChildCatJsonConverter : JsonConverter<ChildCat>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ChildCat" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -118,7 +118,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ChildCat" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="childCat"></param>
|
||||
|
@ -57,10 +57,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a PetTypeEnum
|
||||
/// Returns a <see cref="PetTypeEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static PetTypeEnum PetTypeEnumFromString(string value)
|
||||
{
|
||||
if (value == "ChildCat")
|
||||
@ -70,7 +71,20 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="PetTypeEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static PetTypeEnum? PetTypeEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "ChildCat")
|
||||
return PetTypeEnum.ChildCat;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="PetTypeEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -128,12 +142,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ChildCatAllOf
|
||||
/// A Json converter for type <see cref="ChildCatAllOf" />
|
||||
/// </summary>
|
||||
public class ChildCatAllOfJsonConverter : JsonConverter<ChildCatAllOf>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ChildCatAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -171,8 +185,10 @@ namespace Org.OpenAPITools.Model
|
||||
name = utf8JsonReader.GetString();
|
||||
break;
|
||||
case "pet_type":
|
||||
string petTypeRawValue = utf8JsonReader.GetString();
|
||||
petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue);
|
||||
string? petTypeRawValue = utf8JsonReader.GetString();
|
||||
petType = petTypeRawValue == null
|
||||
? null
|
||||
: ChildCatAllOf.PetTypeEnumFromStringOrDefault(petTypeRawValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -190,7 +206,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ChildCatAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="childCatAllOf"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ClassModel
|
||||
/// A Json converter for type <see cref="ClassModel" />
|
||||
/// </summary>
|
||||
public class ClassModelJsonConverter : JsonConverter<ClassModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ClassModel" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ClassModel" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="classModel"></param>
|
||||
|
@ -86,12 +86,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ComplexQuadrilateral
|
||||
/// A Json converter for type <see cref="ComplexQuadrilateral" />
|
||||
/// </summary>
|
||||
public class ComplexQuadrilateralJsonConverter : JsonConverter<ComplexQuadrilateral>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ComplexQuadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ComplexQuadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="complexQuadrilateral"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DanishPig
|
||||
/// A Json converter for type <see cref="DanishPig" />
|
||||
/// </summary>
|
||||
public class DanishPigJsonConverter : JsonConverter<DanishPig>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="DanishPig" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="DanishPig" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="danishPig"></param>
|
||||
|
@ -82,7 +82,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DateOnlyClass
|
||||
/// A Json converter for type <see cref="DateOnlyClass" />
|
||||
/// </summary>
|
||||
public class DateOnlyClassJsonConverter : JsonConverter<DateOnlyClass>
|
||||
{
|
||||
@ -92,7 +92,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string DateOnlyPropertyFormat { get; set; } = "yyyy'-'MM'-'dd";
|
||||
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="DateOnlyClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="DateOnlyClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="dateOnlyClass"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DeprecatedObject
|
||||
/// A Json converter for type <see cref="DeprecatedObject" />
|
||||
/// </summary>
|
||||
public class DeprecatedObjectJsonConverter : JsonConverter<DeprecatedObject>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="DeprecatedObject" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="DeprecatedObject" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="deprecatedObject"></param>
|
||||
|
@ -65,12 +65,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Dog
|
||||
/// A Json converter for type <see cref="Dog" />
|
||||
/// </summary>
|
||||
public class DogJsonConverter : JsonConverter<Dog>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Dog" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -123,7 +123,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Dog" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="dog"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type DogAllOf
|
||||
/// A Json converter for type <see cref="DogAllOf" />
|
||||
/// </summary>
|
||||
public class DogAllOfJsonConverter : JsonConverter<DogAllOf>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="DogAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="DogAllOf" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="dogAllOf"></param>
|
||||
|
@ -102,12 +102,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Drawing
|
||||
/// A Json converter for type <see cref="Drawing" />
|
||||
/// </summary>
|
||||
public class DrawingJsonConverter : JsonConverter<Drawing>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Drawing" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -178,7 +178,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Drawing" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="drawing"></param>
|
||||
|
@ -62,10 +62,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a ArrayEnumEnum
|
||||
/// Returns a <see cref="ArrayEnumEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static ArrayEnumEnum ArrayEnumEnumFromString(string value)
|
||||
{
|
||||
if (value == "fish")
|
||||
@ -78,7 +79,23 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="ArrayEnumEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static ArrayEnumEnum? ArrayEnumEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "fish")
|
||||
return ArrayEnumEnum.Fish;
|
||||
|
||||
if (value == "crab")
|
||||
return ArrayEnumEnum.Crab;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="ArrayEnumEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -111,10 +128,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a JustSymbolEnum
|
||||
/// Returns a <see cref="JustSymbolEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static JustSymbolEnum JustSymbolEnumFromString(string value)
|
||||
{
|
||||
if (value == ">=")
|
||||
@ -127,7 +145,23 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="JustSymbolEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static JustSymbolEnum? JustSymbolEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == ">=")
|
||||
return JustSymbolEnum.GreaterThanOrEqualTo;
|
||||
|
||||
if (value == "$")
|
||||
return JustSymbolEnum.Dollar;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="JustSymbolEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -188,12 +222,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EnumArrays
|
||||
/// A Json converter for type <see cref="EnumArrays" />
|
||||
/// </summary>
|
||||
public class EnumArraysJsonConverter : JsonConverter<EnumArrays>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="EnumArrays" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -232,8 +266,10 @@ namespace Org.OpenAPITools.Model
|
||||
arrayEnum = JsonSerializer.Deserialize<List<EnumArrays.ArrayEnumEnum>>(ref utf8JsonReader, jsonSerializerOptions);
|
||||
break;
|
||||
case "just_symbol":
|
||||
string justSymbolRawValue = utf8JsonReader.GetString();
|
||||
justSymbol = EnumArrays.JustSymbolEnumFromString(justSymbolRawValue);
|
||||
string? justSymbolRawValue = utf8JsonReader.GetString();
|
||||
justSymbol = justSymbolRawValue == null
|
||||
? null
|
||||
: EnumArrays.JustSymbolEnumFromStringOrDefault(justSymbolRawValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -251,7 +287,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="EnumArrays" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="enumArrays"></param>
|
||||
|
@ -46,8 +46,17 @@ namespace Org.OpenAPITools.Model
|
||||
Xyz = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="EnumClass"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class EnumClassConverter : JsonConverter<EnumClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="EnumClass"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumClass FromString(string value)
|
||||
{
|
||||
if (value == "_abc")
|
||||
@ -62,6 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type EnumClass: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="EnumClass"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumClass? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "_abc")
|
||||
@ -76,6 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumClass"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static string ToJsonValue(EnumClass value)
|
||||
{
|
||||
if (value == EnumClass.Abc)
|
||||
@ -101,8 +121,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
EnumClass? result = EnumClassConverter.FromString(rawValue);
|
||||
|
||||
EnumClass? result = rawValue == null
|
||||
? null
|
||||
: EnumClassConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -121,6 +143,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="EnumClass"/>
|
||||
/// </summary>
|
||||
public class EnumClassNullableConverter : JsonConverter<EnumClass?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -134,10 +159,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
EnumClass? result = EnumClassConverter.FromString(rawValue);
|
||||
EnumClass? result = rawValue == null
|
||||
? null
|
||||
: EnumClassConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -76,10 +76,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a EnumIntegerEnum
|
||||
/// Returns a <see cref="EnumIntegerEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static EnumIntegerEnum EnumIntegerEnumFromString(string value)
|
||||
{
|
||||
if (value == (1).ToString())
|
||||
@ -92,11 +93,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="EnumIntegerEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumIntegerEnum? EnumIntegerEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == (1).ToString())
|
||||
return EnumIntegerEnum.NUMBER_1;
|
||||
|
||||
if (value == (-1).ToString())
|
||||
return EnumIntegerEnum.NUMBER_MINUS_1;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumIntegerEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static int EnumIntegerEnumToJsonValue(EnumIntegerEnum value)
|
||||
{
|
||||
return (int) value;
|
||||
@ -125,10 +141,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a EnumIntegerOnlyEnum
|
||||
/// Returns a <see cref="EnumIntegerOnlyEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value)
|
||||
{
|
||||
if (value == (2).ToString())
|
||||
@ -141,11 +158,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="EnumIntegerOnlyEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumIntegerOnlyEnum? EnumIntegerOnlyEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == (2).ToString())
|
||||
return EnumIntegerOnlyEnum.NUMBER_2;
|
||||
|
||||
if (value == (-2).ToString())
|
||||
return EnumIntegerOnlyEnum.NUMBER_MINUS_2;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumIntegerOnlyEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static int EnumIntegerOnlyEnumToJsonValue(EnumIntegerOnlyEnum value)
|
||||
{
|
||||
return (int) value;
|
||||
@ -174,10 +206,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a EnumNumberEnum
|
||||
/// Returns a <see cref="EnumNumberEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static EnumNumberEnum EnumNumberEnumFromString(string value)
|
||||
{
|
||||
if (value == "1.1")
|
||||
@ -190,7 +223,23 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="EnumNumberEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumNumberEnum? EnumNumberEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "1.1")
|
||||
return EnumNumberEnum.NUMBER_1_DOT_1;
|
||||
|
||||
if (value == "-1.2")
|
||||
return EnumNumberEnum.NUMBER_MINUS_1_DOT_2;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumNumberEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -234,10 +283,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a EnumStringEnum
|
||||
/// Returns a <see cref="EnumStringEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static EnumStringEnum EnumStringEnumFromString(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
@ -253,7 +303,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="EnumStringEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumStringEnum? EnumStringEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
return EnumStringEnum.UPPER;
|
||||
|
||||
if (value == "lower")
|
||||
return EnumStringEnum.Lower;
|
||||
|
||||
if (value == "")
|
||||
return EnumStringEnum.Empty;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumStringEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -300,10 +369,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a EnumStringRequiredEnum
|
||||
/// Returns a <see cref="EnumStringRequiredEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static EnumStringRequiredEnum EnumStringRequiredEnumFromString(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
@ -319,7 +389,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="EnumStringRequiredEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static EnumStringRequiredEnum? EnumStringRequiredEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
return EnumStringRequiredEnum.UPPER;
|
||||
|
||||
if (value == "lower")
|
||||
return EnumStringRequiredEnum.Lower;
|
||||
|
||||
if (value == "")
|
||||
return EnumStringRequiredEnum.Empty;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="EnumStringRequiredEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -408,12 +497,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EnumTest
|
||||
/// A Json converter for type <see cref="EnumTest" />
|
||||
/// </summary>
|
||||
public class EnumTestJsonConverter : JsonConverter<EnumTest>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="EnumTest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -467,28 +556,40 @@ namespace Org.OpenAPITools.Model
|
||||
enumNumber = (EnumTest.EnumNumberEnum)utf8JsonReader.GetInt32();
|
||||
break;
|
||||
case "enum_string":
|
||||
string enumStringRawValue = utf8JsonReader.GetString();
|
||||
enumString = EnumTest.EnumStringEnumFromString(enumStringRawValue);
|
||||
string? enumStringRawValue = utf8JsonReader.GetString();
|
||||
enumString = enumStringRawValue == null
|
||||
? null
|
||||
: EnumTest.EnumStringEnumFromStringOrDefault(enumStringRawValue);
|
||||
break;
|
||||
case "enum_string_required":
|
||||
string enumStringRequiredRawValue = utf8JsonReader.GetString();
|
||||
enumStringRequired = EnumTest.EnumStringRequiredEnumFromString(enumStringRequiredRawValue);
|
||||
string? enumStringRequiredRawValue = utf8JsonReader.GetString();
|
||||
enumStringRequired = enumStringRequiredRawValue == null
|
||||
? null
|
||||
: EnumTest.EnumStringRequiredEnumFromStringOrDefault(enumStringRequiredRawValue);
|
||||
break;
|
||||
case "outerEnumDefaultValue":
|
||||
string outerEnumDefaultValueRawValue = utf8JsonReader.GetString();
|
||||
outerEnumDefaultValue = OuterEnumDefaultValueConverter.FromString(outerEnumDefaultValueRawValue);
|
||||
string? outerEnumDefaultValueRawValue = utf8JsonReader.GetString();
|
||||
outerEnumDefaultValue = outerEnumDefaultValueRawValue == null
|
||||
? null
|
||||
: OuterEnumDefaultValueConverter.FromStringOrDefault(outerEnumDefaultValueRawValue);
|
||||
break;
|
||||
case "outerEnumInteger":
|
||||
string outerEnumIntegerRawValue = utf8JsonReader.GetString();
|
||||
outerEnumInteger = OuterEnumIntegerConverter.FromString(outerEnumIntegerRawValue);
|
||||
string? outerEnumIntegerRawValue = utf8JsonReader.GetString();
|
||||
outerEnumInteger = outerEnumIntegerRawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerConverter.FromStringOrDefault(outerEnumIntegerRawValue);
|
||||
break;
|
||||
case "outerEnumIntegerDefaultValue":
|
||||
string outerEnumIntegerDefaultValueRawValue = utf8JsonReader.GetString();
|
||||
outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValueConverter.FromString(outerEnumIntegerDefaultValueRawValue);
|
||||
string? outerEnumIntegerDefaultValueRawValue = utf8JsonReader.GetString();
|
||||
outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValueRawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerDefaultValueConverter.FromStringOrDefault(outerEnumIntegerDefaultValueRawValue);
|
||||
break;
|
||||
case "outerEnum":
|
||||
string outerEnumRawValue = utf8JsonReader.GetString();
|
||||
outerEnum = OuterEnumConverter.FromStringOrDefault(outerEnumRawValue);
|
||||
string? outerEnumRawValue = utf8JsonReader.GetString();
|
||||
outerEnum = outerEnumRawValue == null
|
||||
? null
|
||||
: OuterEnumConverter.FromStringOrDefault(outerEnumRawValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -524,7 +625,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="EnumTest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="enumTest"></param>
|
||||
|
@ -86,12 +86,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type EquilateralTriangle
|
||||
/// A Json converter for type <see cref="EquilateralTriangle" />
|
||||
/// </summary>
|
||||
public class EquilateralTriangleJsonConverter : JsonConverter<EquilateralTriangle>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="EquilateralTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="EquilateralTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="equilateralTriangle"></param>
|
||||
|
@ -82,12 +82,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type File
|
||||
/// A Json converter for type <see cref="File" />
|
||||
/// </summary>
|
||||
public class FileJsonConverter : JsonConverter<File>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="File" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="File" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="file"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FileSchemaTestClass
|
||||
/// A Json converter for type <see cref="FileSchemaTestClass" />
|
||||
/// </summary>
|
||||
public class FileSchemaTestClassJsonConverter : JsonConverter<FileSchemaTestClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="FileSchemaTestClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -153,7 +153,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="FileSchemaTestClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Foo
|
||||
/// A Json converter for type <see cref="Foo" />
|
||||
/// </summary>
|
||||
public class FooJsonConverter : JsonConverter<Foo>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Foo" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Foo" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="foo"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FooGetDefaultResponse
|
||||
/// A Json converter for type <see cref="FooGetDefaultResponse" />
|
||||
/// </summary>
|
||||
public class FooGetDefaultResponseJsonConverter : JsonConverter<FooGetDefaultResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="FooGetDefaultResponse" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="FooGetDefaultResponse" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="fooGetDefaultResponse"></param>
|
||||
|
@ -361,7 +361,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FormatTest
|
||||
/// A Json converter for type <see cref="FormatTest" />
|
||||
/// </summary>
|
||||
public class FormatTestJsonConverter : JsonConverter<FormatTest>
|
||||
{
|
||||
@ -376,7 +376,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string DateTimeFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK";
|
||||
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="FormatTest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -565,7 +565,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="FormatTest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="formatTest"></param>
|
||||
|
@ -99,12 +99,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Fruit
|
||||
/// A Json converter for type <see cref="Fruit" />
|
||||
/// </summary>
|
||||
public class FruitJsonConverter : JsonConverter<Fruit>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Fruit" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -161,7 +161,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Fruit" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="fruit"></param>
|
||||
|
@ -88,12 +88,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type FruitReq
|
||||
/// A Json converter for type <see cref="FruitReq" />
|
||||
/// </summary>
|
||||
public class FruitReqJsonConverter : JsonConverter<FruitReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="FruitReq" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="FruitReq" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="fruitReq"></param>
|
||||
|
@ -88,12 +88,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type GmFruit
|
||||
/// A Json converter for type <see cref="GmFruit" />
|
||||
/// </summary>
|
||||
public class GmFruitJsonConverter : JsonConverter<GmFruit>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="GmFruit" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -148,7 +148,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="GmFruit" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="gmFruit"></param>
|
||||
|
@ -91,12 +91,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type GrandparentAnimal
|
||||
/// A Json converter for type <see cref="GrandparentAnimal" />
|
||||
/// </summary>
|
||||
public class GrandparentAnimalJsonConverter : JsonConverter<GrandparentAnimal>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="GrandparentAnimal" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -145,7 +145,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="GrandparentAnimal" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="grandparentAnimal"></param>
|
||||
|
@ -127,12 +127,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type HasOnlyReadOnly
|
||||
/// A Json converter for type <see cref="HasOnlyReadOnly" />
|
||||
/// </summary>
|
||||
public class HasOnlyReadOnlyJsonConverter : JsonConverter<HasOnlyReadOnly>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="HasOnlyReadOnly" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="HasOnlyReadOnly" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="hasOnlyReadOnly"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type HealthCheckResult
|
||||
/// A Json converter for type <see cref="HealthCheckResult" />
|
||||
/// </summary>
|
||||
public class HealthCheckResultJsonConverter : JsonConverter<HealthCheckResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="HealthCheckResult" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -132,7 +132,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="HealthCheckResult" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="healthCheckResult"></param>
|
||||
|
@ -79,12 +79,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type IsoscelesTriangle
|
||||
/// A Json converter for type <see cref="IsoscelesTriangle" />
|
||||
/// </summary>
|
||||
public class IsoscelesTriangleJsonConverter : JsonConverter<IsoscelesTriangle>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="IsoscelesTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -131,7 +131,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="IsoscelesTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="isoscelesTriangle"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type List
|
||||
/// A Json converter for type <see cref="List" />
|
||||
/// </summary>
|
||||
public class ListJsonConverter : JsonConverter<List>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="List" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="List" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="list"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type LiteralStringClass
|
||||
/// A Json converter for type <see cref="LiteralStringClass" />
|
||||
/// </summary>
|
||||
public class LiteralStringClassJsonConverter : JsonConverter<LiteralStringClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="LiteralStringClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -151,7 +151,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="LiteralStringClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="literalStringClass"></param>
|
||||
|
@ -121,12 +121,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Mammal
|
||||
/// A Json converter for type <see cref="Mammal" />
|
||||
/// </summary>
|
||||
public class MammalJsonConverter : JsonConverter<Mammal>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Mammal" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -179,7 +179,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Mammal" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="mammal"></param>
|
||||
|
@ -66,10 +66,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a InnerEnum
|
||||
/// Returns a <see cref="InnerEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static InnerEnum InnerEnumFromString(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
@ -82,7 +83,23 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="InnerEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static InnerEnum? InnerEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "UPPER")
|
||||
return InnerEnum.UPPER;
|
||||
|
||||
if (value == "lower")
|
||||
return InnerEnum.Lower;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="InnerEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -157,12 +174,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type MapTest
|
||||
/// A Json converter for type <see cref="MapTest" />
|
||||
/// </summary>
|
||||
public class MapTestJsonConverter : JsonConverter<MapTest>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="MapTest" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -236,7 +253,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="MapTest" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="mapTest"></param>
|
||||
|
@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type MixedPropertiesAndAdditionalPropertiesClass
|
||||
/// A Json converter for type <see cref="MixedPropertiesAndAdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
public class MixedPropertiesAndAdditionalPropertiesClassJsonConverter : JsonConverter<MixedPropertiesAndAdditionalPropertiesClass>
|
||||
{
|
||||
@ -125,7 +125,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string DateTimeFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK";
|
||||
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="MixedPropertiesAndAdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="MixedPropertiesAndAdditionalPropertiesClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="mixedPropertiesAndAdditionalPropertiesClass"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Model200Response
|
||||
/// A Json converter for type <see cref="Model200Response" />
|
||||
/// </summary>
|
||||
public class Model200ResponseJsonConverter : JsonConverter<Model200Response>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Model200Response" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Model200Response" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="model200Response"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ModelClient
|
||||
/// A Json converter for type <see cref="ModelClient" />
|
||||
/// </summary>
|
||||
public class ModelClientJsonConverter : JsonConverter<ModelClient>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ModelClient" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ModelClient" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
|
@ -145,12 +145,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Name
|
||||
/// A Json converter for type <see cref="Name" />
|
||||
/// </summary>
|
||||
public class NameJsonConverter : JsonConverter<Name>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Name" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -223,7 +223,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Name" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="name"></param>
|
||||
|
@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableClass
|
||||
/// A Json converter for type <see cref="NullableClass" />
|
||||
/// </summary>
|
||||
public class NullableClassJsonConverter : JsonConverter<NullableClass>
|
||||
{
|
||||
@ -189,7 +189,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string DatetimePropFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK";
|
||||
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="NullableClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -296,7 +296,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="NullableClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableClass"></param>
|
||||
|
@ -82,12 +82,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableGuidClass
|
||||
/// A Json converter for type <see cref="NullableGuidClass" />
|
||||
/// </summary>
|
||||
public class NullableGuidClassJsonConverter : JsonConverter<NullableGuidClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="NullableGuidClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -134,7 +134,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="NullableGuidClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableGuidClass"></param>
|
||||
|
@ -105,12 +105,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NullableShape
|
||||
/// A Json converter for type <see cref="NullableShape" />
|
||||
/// </summary>
|
||||
public class NullableShapeJsonConverter : JsonConverter<NullableShape>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="NullableShape" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -159,7 +159,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="NullableShape" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="nullableShape"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type NumberOnly
|
||||
/// A Json converter for type <see cref="NumberOnly" />
|
||||
/// </summary>
|
||||
public class NumberOnlyJsonConverter : JsonConverter<NumberOnly>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="NumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="NumberOnly" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="numberOnly"></param>
|
||||
|
@ -111,12 +111,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ObjectWithDeprecatedFields
|
||||
/// A Json converter for type <see cref="ObjectWithDeprecatedFields" />
|
||||
/// </summary>
|
||||
public class ObjectWithDeprecatedFieldsJsonConverter : JsonConverter<ObjectWithDeprecatedFields>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ObjectWithDeprecatedFields" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -189,7 +189,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ObjectWithDeprecatedFields" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="objectWithDeprecatedFields"></param>
|
||||
|
@ -79,12 +79,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type OneOfString
|
||||
/// A Json converter for type <see cref="OneOfString" />
|
||||
/// </summary>
|
||||
public class OneOfStringJsonConverter : JsonConverter<OneOfString>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="OneOfString" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -129,7 +129,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="OneOfString" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="oneOfString"></param>
|
||||
|
@ -76,10 +76,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a StatusEnum
|
||||
/// Returns a <see cref="StatusEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static StatusEnum StatusEnumFromString(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
@ -95,7 +96,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="StatusEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static StatusEnum? StatusEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
return StatusEnum.Placed;
|
||||
|
||||
if (value == "approved")
|
||||
return StatusEnum.Approved;
|
||||
|
||||
if (value == "delivered")
|
||||
return StatusEnum.Delivered;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="StatusEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -189,7 +209,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Order
|
||||
/// A Json converter for type <see cref="Order" />
|
||||
/// </summary>
|
||||
public class OrderJsonConverter : JsonConverter<Order>
|
||||
{
|
||||
@ -199,7 +219,7 @@ namespace Org.OpenAPITools.Model
|
||||
public static string ShipDateFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK";
|
||||
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Order" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -254,8 +274,10 @@ namespace Org.OpenAPITools.Model
|
||||
shipDate = JsonSerializer.Deserialize<DateTime>(ref utf8JsonReader, jsonSerializerOptions);
|
||||
break;
|
||||
case "status":
|
||||
string statusRawValue = utf8JsonReader.GetString();
|
||||
status = Order.StatusEnumFromString(statusRawValue);
|
||||
string? statusRawValue = utf8JsonReader.GetString();
|
||||
status = statusRawValue == null
|
||||
? null
|
||||
: Order.StatusEnumFromStringOrDefault(statusRawValue);
|
||||
break;
|
||||
case "complete":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
@ -289,7 +311,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Order" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="order"></param>
|
||||
|
@ -99,12 +99,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type OuterComposite
|
||||
/// A Json converter for type <see cref="OuterComposite" />
|
||||
/// </summary>
|
||||
public class OuterCompositeJsonConverter : JsonConverter<OuterComposite>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="OuterComposite" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="OuterComposite" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="outerComposite"></param>
|
||||
|
@ -46,8 +46,17 @@ namespace Org.OpenAPITools.Model
|
||||
Delivered = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnum"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class OuterEnumConverter : JsonConverter<OuterEnum>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnum FromString(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
@ -62,6 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type OuterEnum: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnum? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
@ -76,6 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="OuterEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static string ToJsonValue(OuterEnum value)
|
||||
{
|
||||
if (value == OuterEnum.Placed)
|
||||
@ -101,8 +121,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
OuterEnum? result = OuterEnumConverter.FromString(rawValue);
|
||||
|
||||
OuterEnum? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -121,6 +143,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnum"/>
|
||||
/// </summary>
|
||||
public class OuterEnumNullableConverter : JsonConverter<OuterEnum?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -134,10 +159,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
OuterEnum? result = OuterEnumConverter.FromString(rawValue);
|
||||
OuterEnum? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -46,8 +46,17 @@ namespace Org.OpenAPITools.Model
|
||||
Delivered = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class OuterEnumDefaultValueConverter : JsonConverter<OuterEnumDefaultValue>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumDefaultValue FromString(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
@ -62,6 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type OuterEnumDefaultValue: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumDefaultValue? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "placed")
|
||||
@ -76,6 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="OuterEnumDefaultValue"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static string ToJsonValue(OuterEnumDefaultValue value)
|
||||
{
|
||||
if (value == OuterEnumDefaultValue.Placed)
|
||||
@ -101,8 +121,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue);
|
||||
|
||||
OuterEnumDefaultValue? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumDefaultValueConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -121,6 +143,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumDefaultValue"/>
|
||||
/// </summary>
|
||||
public class OuterEnumDefaultValueNullableConverter : JsonConverter<OuterEnumDefaultValue?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -134,10 +159,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue);
|
||||
OuterEnumDefaultValue? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumDefaultValueConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -46,8 +46,17 @@ namespace Org.OpenAPITools.Model
|
||||
NUMBER_2 = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumInteger"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class OuterEnumIntegerConverter : JsonConverter<OuterEnumInteger>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumInteger"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumInteger FromString(string value)
|
||||
{
|
||||
if (value == (0).ToString())
|
||||
@ -62,6 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type OuterEnumInteger: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumInteger"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumInteger? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == (0).ToString())
|
||||
@ -76,6 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="OuterEnumInteger"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static int ToJsonValue(OuterEnumInteger value)
|
||||
{
|
||||
return (int) value;
|
||||
@ -92,8 +112,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue);
|
||||
|
||||
OuterEnumInteger? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -112,6 +134,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumInteger"/>
|
||||
/// </summary>
|
||||
public class OuterEnumIntegerNullableConverter : JsonConverter<OuterEnumInteger?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -125,10 +150,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue);
|
||||
OuterEnumInteger? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -46,8 +46,17 @@ namespace Org.OpenAPITools.Model
|
||||
NUMBER_2 = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumIntegerDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class OuterEnumIntegerDefaultValueConverter : JsonConverter<OuterEnumIntegerDefaultValue>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumIntegerDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumIntegerDefaultValue FromString(string value)
|
||||
{
|
||||
if (value == (0).ToString())
|
||||
@ -62,6 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type OuterEnumIntegerDefaultValue: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="OuterEnumIntegerDefaultValue"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static OuterEnumIntegerDefaultValue? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == (0).ToString())
|
||||
@ -76,6 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="OuterEnumIntegerDefaultValue"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static int ToJsonValue(OuterEnumIntegerDefaultValue value)
|
||||
{
|
||||
return (int) value;
|
||||
@ -92,8 +112,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue);
|
||||
|
||||
OuterEnumIntegerDefaultValue? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerDefaultValueConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -112,6 +134,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="OuterEnumIntegerDefaultValue"/>
|
||||
/// </summary>
|
||||
public class OuterEnumIntegerDefaultValueNullableConverter : JsonConverter<OuterEnumIntegerDefaultValue?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -125,10 +150,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue);
|
||||
OuterEnumIntegerDefaultValue? result = rawValue == null
|
||||
? null
|
||||
: OuterEnumIntegerDefaultValueConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -57,12 +57,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ParentPet
|
||||
/// A Json converter for type <see cref="ParentPet" />
|
||||
/// </summary>
|
||||
public class ParentPetJsonConverter : JsonConverter<ParentPet>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ParentPet" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -108,7 +108,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ParentPet" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="parentPet"></param>
|
||||
|
@ -76,10 +76,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a StatusEnum
|
||||
/// Returns a <see cref="StatusEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static StatusEnum StatusEnumFromString(string value)
|
||||
{
|
||||
if (value == "available")
|
||||
@ -95,7 +96,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="StatusEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static StatusEnum? StatusEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "available")
|
||||
return StatusEnum.Available;
|
||||
|
||||
if (value == "pending")
|
||||
return StatusEnum.Pending;
|
||||
|
||||
if (value == "sold")
|
||||
return StatusEnum.Sold;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="StatusEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -189,12 +209,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Pet
|
||||
/// A Json converter for type <see cref="Pet" />
|
||||
/// </summary>
|
||||
public class PetJsonConverter : JsonConverter<Pet>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Pet" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -248,8 +268,10 @@ namespace Org.OpenAPITools.Model
|
||||
photoUrls = JsonSerializer.Deserialize<List<string>>(ref utf8JsonReader, jsonSerializerOptions);
|
||||
break;
|
||||
case "status":
|
||||
string statusRawValue = utf8JsonReader.GetString();
|
||||
status = Pet.StatusEnumFromString(statusRawValue);
|
||||
string? statusRawValue = utf8JsonReader.GetString();
|
||||
status = statusRawValue == null
|
||||
? null
|
||||
: Pet.StatusEnumFromStringOrDefault(statusRawValue);
|
||||
break;
|
||||
case "tags":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
@ -283,7 +305,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Pet" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="pet"></param>
|
||||
|
@ -105,12 +105,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Pig
|
||||
/// A Json converter for type <see cref="Pig" />
|
||||
/// </summary>
|
||||
public class PigJsonConverter : JsonConverter<Pig>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Pig" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -159,7 +159,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Pig" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="pig"></param>
|
||||
|
@ -127,12 +127,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type PolymorphicProperty
|
||||
/// A Json converter for type <see cref="PolymorphicProperty" />
|
||||
/// </summary>
|
||||
public class PolymorphicPropertyJsonConverter : JsonConverter<PolymorphicProperty>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="PolymorphicProperty" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -189,7 +189,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="PolymorphicProperty" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="polymorphicProperty"></param>
|
||||
|
@ -105,12 +105,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Quadrilateral
|
||||
/// A Json converter for type <see cref="Quadrilateral" />
|
||||
/// </summary>
|
||||
public class QuadrilateralJsonConverter : JsonConverter<Quadrilateral>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Quadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -159,7 +159,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Quadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="quadrilateral"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type QuadrilateralInterface
|
||||
/// A Json converter for type <see cref="QuadrilateralInterface" />
|
||||
/// </summary>
|
||||
public class QuadrilateralInterfaceJsonConverter : JsonConverter<QuadrilateralInterface>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="QuadrilateralInterface" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="QuadrilateralInterface" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="quadrilateralInterface"></param>
|
||||
|
@ -126,12 +126,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ReadOnlyFirst
|
||||
/// A Json converter for type <see cref="ReadOnlyFirst" />
|
||||
/// </summary>
|
||||
public class ReadOnlyFirstJsonConverter : JsonConverter<ReadOnlyFirst>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ReadOnlyFirst" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -187,7 +187,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ReadOnlyFirst" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="readOnlyFirst"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Return
|
||||
/// A Json converter for type <see cref="Return" />
|
||||
/// </summary>
|
||||
public class ReturnJsonConverter : JsonConverter<Return>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Return" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Return" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="varReturn"></param>
|
||||
|
@ -86,12 +86,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ScaleneTriangle
|
||||
/// A Json converter for type <see cref="ScaleneTriangle" />
|
||||
/// </summary>
|
||||
public class ScaleneTriangleJsonConverter : JsonConverter<ScaleneTriangle>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ScaleneTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ScaleneTriangle" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="scaleneTriangle"></param>
|
||||
|
@ -116,12 +116,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Shape
|
||||
/// A Json converter for type <see cref="Shape" />
|
||||
/// </summary>
|
||||
public class ShapeJsonConverter : JsonConverter<Shape>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Shape" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -178,7 +178,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Shape" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="shape"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ShapeInterface
|
||||
/// A Json converter for type <see cref="ShapeInterface" />
|
||||
/// </summary>
|
||||
public class ShapeInterfaceJsonConverter : JsonConverter<ShapeInterface>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ShapeInterface" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ShapeInterface" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="shapeInterface"></param>
|
||||
|
@ -116,12 +116,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ShapeOrNull
|
||||
/// A Json converter for type <see cref="ShapeOrNull" />
|
||||
/// </summary>
|
||||
public class ShapeOrNullJsonConverter : JsonConverter<ShapeOrNull>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ShapeOrNull" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -178,7 +178,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ShapeOrNull" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="shapeOrNull"></param>
|
||||
|
@ -86,12 +86,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type SimpleQuadrilateral
|
||||
/// A Json converter for type <see cref="SimpleQuadrilateral" />
|
||||
/// </summary>
|
||||
public class SimpleQuadrilateralJsonConverter : JsonConverter<SimpleQuadrilateral>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="SimpleQuadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="SimpleQuadrilateral" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="simpleQuadrilateral"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type SpecialModelName
|
||||
/// A Json converter for type <see cref="SpecialModelName" />
|
||||
/// </summary>
|
||||
public class SpecialModelNameJsonConverter : JsonConverter<SpecialModelName>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="SpecialModelName" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="SpecialModelName" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="specialModelName"></param>
|
||||
|
@ -90,12 +90,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Tag
|
||||
/// A Json converter for type <see cref="Tag" />
|
||||
/// </summary>
|
||||
public class TagJsonConverter : JsonConverter<Tag>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Tag" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Tag" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="tag"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TestCollectionEndingWithWordList
|
||||
/// A Json converter for type <see cref="TestCollectionEndingWithWordList" />
|
||||
/// </summary>
|
||||
public class TestCollectionEndingWithWordListJsonConverter : JsonConverter<TestCollectionEndingWithWordList>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="TestCollectionEndingWithWordList" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="TestCollectionEndingWithWordList" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testCollectionEndingWithWordList"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TestCollectionEndingWithWordListObject
|
||||
/// A Json converter for type <see cref="TestCollectionEndingWithWordListObject" />
|
||||
/// </summary>
|
||||
public class TestCollectionEndingWithWordListObjectJsonConverter : JsonConverter<TestCollectionEndingWithWordListObject>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="TestCollectionEndingWithWordListObject" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="TestCollectionEndingWithWordListObject" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="testCollectionEndingWithWordListObject"></param>
|
||||
|
@ -147,12 +147,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Triangle
|
||||
/// A Json converter for type <see cref="Triangle" />
|
||||
/// </summary>
|
||||
public class TriangleJsonConverter : JsonConverter<Triangle>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Triangle" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -220,7 +220,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Triangle" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="triangle"></param>
|
||||
|
@ -81,12 +81,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type TriangleInterface
|
||||
/// A Json converter for type <see cref="TriangleInterface" />
|
||||
/// </summary>
|
||||
public class TriangleInterfaceJsonConverter : JsonConverter<TriangleInterface>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="TriangleInterface" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -135,7 +135,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="TriangleInterface" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="triangleInterface"></param>
|
||||
|
@ -185,12 +185,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type User
|
||||
/// A Json converter for type <see cref="User" />
|
||||
/// </summary>
|
||||
public class UserJsonConverter : JsonConverter<User>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="User" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -313,7 +313,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="User" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="user"></param>
|
||||
|
@ -99,12 +99,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Whale
|
||||
/// A Json converter for type <see cref="Whale" />
|
||||
/// </summary>
|
||||
public class WhaleJsonConverter : JsonConverter<Whale>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Whale" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Whale" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="whale"></param>
|
||||
|
@ -67,10 +67,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a TypeEnum
|
||||
/// Returns a <see cref="TypeEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static TypeEnum TypeEnumFromString(string value)
|
||||
{
|
||||
if (value == "plains")
|
||||
@ -86,7 +87,26 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="TypeEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static TypeEnum? TypeEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "plains")
|
||||
return TypeEnum.Plains;
|
||||
|
||||
if (value == "mountain")
|
||||
return TypeEnum.Mountain;
|
||||
|
||||
if (value == "grevys")
|
||||
return TypeEnum.Grevys;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="TypeEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -151,12 +171,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type Zebra
|
||||
/// A Json converter for type <see cref="Zebra" />
|
||||
/// </summary>
|
||||
public class ZebraJsonConverter : JsonConverter<Zebra>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="Zebra" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -194,8 +214,10 @@ namespace Org.OpenAPITools.Model
|
||||
className = utf8JsonReader.GetString();
|
||||
break;
|
||||
case "type":
|
||||
string typeRawValue = utf8JsonReader.GetString();
|
||||
type = Zebra.TypeEnumFromString(typeRawValue);
|
||||
string? typeRawValue = utf8JsonReader.GetString();
|
||||
type = typeRawValue == null
|
||||
? null
|
||||
: Zebra.TypeEnumFromStringOrDefault(typeRawValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -213,7 +235,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="Zebra" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="zebra"></param>
|
||||
|
@ -41,8 +41,17 @@ namespace Org.OpenAPITools.Model
|
||||
NotUnknown
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="ZeroBasedEnum"/>
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public class ZeroBasedEnumConverter : JsonConverter<ZeroBasedEnum>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="ZeroBasedEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static ZeroBasedEnum FromString(string value)
|
||||
{
|
||||
if (value == "unknown")
|
||||
@ -54,6 +63,11 @@ namespace Org.OpenAPITools.Model
|
||||
throw new NotImplementedException($"Could not convert value to type ZeroBasedEnum: '{value}'");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a given value to <see cref="ZeroBasedEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static ZeroBasedEnum? FromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "unknown")
|
||||
@ -65,6 +79,12 @@ namespace Org.OpenAPITools.Model
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="ZeroBasedEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static string ToJsonValue(ZeroBasedEnum value)
|
||||
{
|
||||
if (value == ZeroBasedEnum.Unknown)
|
||||
@ -87,8 +107,10 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
ZeroBasedEnum? result = ZeroBasedEnumConverter.FromString(rawValue);
|
||||
|
||||
ZeroBasedEnum? result = rawValue == null
|
||||
? null
|
||||
: ZeroBasedEnumConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
||||
@ -107,6 +129,9 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type <see cref="ZeroBasedEnum"/>
|
||||
/// </summary>
|
||||
public class ZeroBasedEnumNullableConverter : JsonConverter<ZeroBasedEnum?>
|
||||
{
|
||||
/// <summary>
|
||||
@ -120,10 +145,9 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
string? rawValue = reader.GetString();
|
||||
|
||||
if (rawValue == null)
|
||||
return null;
|
||||
|
||||
ZeroBasedEnum? result = ZeroBasedEnumConverter.FromString(rawValue);
|
||||
ZeroBasedEnum? result = rawValue == null
|
||||
? null
|
||||
: ZeroBasedEnumConverter.FromStringOrDefault(rawValue);
|
||||
|
||||
if (result != null)
|
||||
return result.Value;
|
||||
|
@ -60,10 +60,11 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a ZeroBasedEnumEnum
|
||||
/// Returns a <see cref="ZeroBasedEnumEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public static ZeroBasedEnumEnum ZeroBasedEnumEnumFromString(string value)
|
||||
{
|
||||
if (value == "unknown")
|
||||
@ -76,7 +77,23 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns equivalent json value
|
||||
/// Returns a <see cref="ZeroBasedEnumEnum"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static ZeroBasedEnumEnum? ZeroBasedEnumEnumFromStringOrDefault(string value)
|
||||
{
|
||||
if (value == "unknown")
|
||||
return ZeroBasedEnumEnum.Unknown;
|
||||
|
||||
if (value == "notUnknown")
|
||||
return ZeroBasedEnumEnum.NotUnknown;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the <see cref="ZeroBasedEnumEnum"/> to the json value
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
@ -130,12 +147,12 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json converter for type ZeroBasedEnumClass
|
||||
/// A Json converter for type <see cref="ZeroBasedEnumClass" />
|
||||
/// </summary>
|
||||
public class ZeroBasedEnumClassJsonConverter : JsonConverter<ZeroBasedEnumClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// A Json reader.
|
||||
/// Deserializes json to <see cref="ZeroBasedEnumClass" />
|
||||
/// </summary>
|
||||
/// <param name="utf8JsonReader"></param>
|
||||
/// <param name="typeToConvert"></param>
|
||||
@ -169,8 +186,10 @@ namespace Org.OpenAPITools.Model
|
||||
switch (propertyName)
|
||||
{
|
||||
case "ZeroBasedEnum":
|
||||
string zeroBasedEnumRawValue = utf8JsonReader.GetString();
|
||||
zeroBasedEnum = ZeroBasedEnumClass.ZeroBasedEnumEnumFromString(zeroBasedEnumRawValue);
|
||||
string? zeroBasedEnumRawValue = utf8JsonReader.GetString();
|
||||
zeroBasedEnum = zeroBasedEnumRawValue == null
|
||||
? null
|
||||
: ZeroBasedEnumClass.ZeroBasedEnumEnumFromStringOrDefault(zeroBasedEnumRawValue);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -185,7 +204,7 @@ namespace Org.OpenAPITools.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Json writer
|
||||
/// Serializes a <see cref="ZeroBasedEnumClass" />
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
/// <param name="zeroBasedEnumClass"></param>
|
||||
|
@ -414,7 +414,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Hello Hello
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Guid>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Guid>>> HelloOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
@ -432,7 +432,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Guid>"/></returns>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List{TValue}"/></returns>
|
||||
public async Task<ApiResponse<List<Guid>>> HelloAsync(System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
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