forked from loafle/openapi-generator-original
[csharp-netcore][generichost] Move deserialization to method (#15454)
* removed extra line break * moved deserialization to method
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
{{/nrt}}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
@@ -16,7 +17,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
{{>visibility}} interface IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The data type of <see cref="Data"/>
|
||||
/// The type that represents the server's response.
|
||||
/// </summary>
|
||||
Type ResponseType { get; }
|
||||
|
||||
@@ -42,12 +43,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
{{>visibility}} partial class ApiResponse<T> : IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The deserialized content
|
||||
/// </summary>
|
||||
{{! .net 3.1 does not support unconstrained nullable T }}
|
||||
public T{{#nrt}}{{^netcoreapp3.1}}?{{/netcoreapp3.1}}{{/nrt}} Content { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status code (HTTP status code)
|
||||
/// </summary>
|
||||
@@ -55,7 +50,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
public HttpStatusCode StatusCode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The content of this response
|
||||
/// The type that represents the server's response.
|
||||
/// </summary>
|
||||
public Type ResponseType
|
||||
{
|
||||
@@ -65,7 +60,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// <summary>
|
||||
/// The raw data
|
||||
/// </summary>
|
||||
public string RawContent { get; }
|
||||
public string RawContent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The IsSuccessStatusCode from the api response
|
||||
@@ -87,18 +82,56 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
public DateTime DownloadedAt { get; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// The JsonSerialzierOptions
|
||||
/// </summary>
|
||||
private System.Text.Json.JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
/// <summary>
|
||||
/// Construct the response using an HttpResponseMessage
|
||||
/// </summary>
|
||||
/// <param name="response"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
public ApiResponse(System.Net.Http.HttpResponseMessage response, string rawContent)
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, System.Text.Json.JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
StatusCode = response.StatusCode;
|
||||
Headers = response.Headers;
|
||||
IsSuccessStatusCode = response.IsSuccessStatusCode;
|
||||
ReasonPhrase = response.ReasonPhrase;
|
||||
StatusCode = httpResponseMessage.StatusCode;
|
||||
Headers = httpResponseMessage.Headers;
|
||||
IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode;
|
||||
ReasonPhrase = httpResponseMessage.ReasonPhrase;
|
||||
RawContent = rawContent;
|
||||
_jsonSerializerOptions = jsonSerializerOptions;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes the server's response
|
||||
/// </summary>
|
||||
public T{{nrt?}} ToModel(System.Text.Json.JsonSerializerOptions{{nrt?}} options = null)
|
||||
{
|
||||
return IsSuccessStatusCode
|
||||
? System.Text.Json.JsonSerializer.Deserialize<T>(RawContent, options ?? _jsonSerializerOptions)
|
||||
: default(T);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when the model can be deserialized
|
||||
/// </summary>
|
||||
public bool TryToModel({{^netStandard}}[NotNullWhen(true)] {{/netStandard}}out T{{nrt?}} model, System.Text.Json.JsonSerializerOptions{{nrt?}} options = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
model = ToModel(options);
|
||||
return model != null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
model = default(T);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/// <summary>
|
||||
/// {{summary}} {{notes}}
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
{{#allParams}}
|
||||
/// <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="{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}"/>></returns>
|
||||
public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}})
|
||||
{
|
||||
ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
@@ -61,8 +61,20 @@ namespace YourProject
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
var host = CreateHostBuilder(args).Build();{{#apiInfo}}{{#apis}}{{#-first}}
|
||||
var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();{{#operations}}{{#-first}}{{#operation}}{{#-first}}
|
||||
ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> foo = await api.{{operationId}}WithHttpInfoAsync("todo");{{/-first}}{{/operation}}{{/-first}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>();
|
||||
{{#operations}}
|
||||
{{#-first}}
|
||||
{{#operation}}
|
||||
{{#-first}}
|
||||
ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}> response = await api.{{operationId}}Async("todo");
|
||||
{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}} model = response.ToModel();
|
||||
{{/-first}}
|
||||
{{/operation}}
|
||||
{{/-first}}
|
||||
{{/operations}}
|
||||
{{/-first}}
|
||||
{{/apis}}
|
||||
{{/apiInfo}}
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args)
|
||||
|
||||
@@ -39,34 +39,7 @@ namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}}
|
||||
{{/allParams}}
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>></returns>
|
||||
Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>> {{operationId}}WithHttpInfoAsync({{>OperationSignature}});
|
||||
|
||||
/// <summary>
|
||||
/// {{summary}}
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// {{notes}}
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
{{#allParams}}
|
||||
/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
|
||||
{{/allParams}}
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}></returns>
|
||||
Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}> {{operationId}}Async({{>OperationSignature}});{{#nrt}}
|
||||
|
||||
/// <summary>
|
||||
/// {{summary}}
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// {{notes}}
|
||||
/// </remarks>
|
||||
{{#allParams}}
|
||||
/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
|
||||
{{/allParams}}
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}?></returns>
|
||||
Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}});{{/nrt}}
|
||||
Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>> {{operationId}}Async({{>OperationSignature}});
|
||||
{{^-last}}
|
||||
|
||||
{{/-last}}
|
||||
@@ -122,11 +95,11 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// Initializes a new instance of the <see cref="{{classname}}"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider{{#hasApiKeyMethods}},
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}},
|
||||
TokenProvider<BearerToken> bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}},
|
||||
TokenProvider<BasicToken> basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}},
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}},
|
||||
public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider{{#hasApiKeyMethods}},
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}},
|
||||
TokenProvider<BearerToken> bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}},
|
||||
TokenProvider<BasicToken> basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}},
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}},
|
||||
TokenProvider<OAuthToken> oauthTokenProvider{{/hasOAuthMethods}})
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -149,37 +122,6 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
}
|
||||
{{#operation}}
|
||||
|
||||
/// <summary>
|
||||
/// {{summary}} {{notes}}
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
{{#allParams}}
|
||||
/// <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="{{#returnType}}{{.}}{{/returnType}}{{^returnType}}object{{/returnType}}"/>></returns>
|
||||
public async Task<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}> {{operationId}}Async({{>OperationSignature}})
|
||||
{
|
||||
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponseLocalVar = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);
|
||||
|
||||
{{^nrt}}{{#returnTypeIsPrimitive}}#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
{{/returnTypeIsPrimitive}}{{/nrt}}if (apiResponseLocalVar.Content == null){{^nrt}}{{#returnTypeIsPrimitive}}
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/returnTypeIsPrimitive}}{{/nrt}}
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content{{#nrt}}{{#returnProperty}}{{#isPrimitiveType}}{{^isMap}}{{^isString}}{{^isContainer}}.Value{{/isContainer}}{{/isString}}{{/isMap}}{{/isPrimitiveType}}{{/returnProperty}}{{/nrt}};
|
||||
}
|
||||
|
||||
{{#nrt}}
|
||||
{{>OperationOrDefault}}
|
||||
|
||||
{{/nrt}}
|
||||
{{^nrt}}
|
||||
{{^returnTypeIsPrimitive}}
|
||||
{{>OperationOrDefault}}
|
||||
|
||||
{{/returnTypeIsPrimitive}}
|
||||
{{/nrt}}
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -223,7 +165,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{#allParams}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{/allParams}}
|
||||
protected virtual void After{{operationId}}({{#lambda.joinWithComma}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponseLocalVar {{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}} {{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}} {{/requiredAndNotNullable}}{{/allParams}}{{/lambda.joinWithComma}})
|
||||
protected virtual void After{{operationId}}({{#lambda.joinWithComma}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar {{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}} {{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}} {{/requiredAndNotNullable}}{{/allParams}}{{/lambda.joinWithComma}})
|
||||
{
|
||||
}
|
||||
|
||||
@@ -250,7 +192,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/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>
|
||||
public async Task<ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>> {{operationId}}WithHttpInfoAsync({{>OperationSignature}})
|
||||
public async Task<ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}>> {{operationId}}Async({{>OperationSignature}})
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -438,19 +380,16 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
After{{operationId}}({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
After{{operationId}}({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
}
|
||||
{{#authMethods}}
|
||||
else if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
foreach(TokenBase tokenBaseLocalVar in tokenBaseLocalVars)
|
||||
tokenBaseLocalVar.BeginRateLimit();
|
||||
{{/authMethods}}
|
||||
|
||||
{{/authMethods}}
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,14 @@ namespace {{packageName}}.Test.{{apiPackage}}
|
||||
{{#allParams}}
|
||||
{{{dataType}}} {{paramName}} = default;
|
||||
{{/allParams}}
|
||||
{{#returnType}}var response = {{/returnType}}await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
|
||||
Assert.IsType<{{{.}}}>(response);{{/returnType}}
|
||||
{{#returnType}}
|
||||
var response = await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<{{{.}}}>(model);
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
{{/returnType}}
|
||||
}
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/isInherited}}
|
||||
{{/allVars}}
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
{{/vendorExtensions.x-duplicated-data-type}}
|
||||
@@ -70,9 +71,12 @@
|
||||
{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
|
||||
{{/isInherited}}
|
||||
{{/allVars}}
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
{{/composedSchemas.oneOf}}
|
||||
partial void OnCreated();
|
||||
|
||||
{{#vars}}
|
||||
{{#items.isEnum}}
|
||||
{{#items}}
|
||||
|
||||
@@ -59,7 +59,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
ModelClient modelClient = default;
|
||||
var response = await _instance.Call123TestSpecialTagsAsync(modelClient);
|
||||
Assert.IsType<ModelClient>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<ModelClient>(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task FooGetAsyncTest()
|
||||
{
|
||||
var response = await _instance.FooGetAsync();
|
||||
Assert.IsType<FooGetDefaultResponse>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<FooGetDefaultResponse>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -78,7 +79,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task HelloAsyncTest()
|
||||
{
|
||||
var response = await _instance.HelloAsync();
|
||||
Assert.IsType<List<Guid>>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<List<Guid>>(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task FakeHealthGetAsyncTest()
|
||||
{
|
||||
var response = await _instance.FakeHealthGetAsync();
|
||||
Assert.IsType<HealthCheckResult>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<HealthCheckResult>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -69,7 +70,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
bool? body = default;
|
||||
var response = await _instance.FakeOuterBooleanSerializeAsync(body);
|
||||
Assert.IsType<bool>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<bool>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -80,7 +82,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
OuterComposite? outerComposite = default;
|
||||
var response = await _instance.FakeOuterCompositeSerializeAsync(outerComposite);
|
||||
Assert.IsType<OuterComposite>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<OuterComposite>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -91,7 +94,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
decimal? body = default;
|
||||
var response = await _instance.FakeOuterNumberSerializeAsync(body);
|
||||
Assert.IsType<decimal>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<decimal>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -103,7 +107,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
Guid requiredStringUuid = default;
|
||||
string? body = default;
|
||||
var response = await _instance.FakeOuterStringSerializeAsync(requiredStringUuid, body);
|
||||
Assert.IsType<string>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<string>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -113,7 +118,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task GetArrayOfEnumsAsyncTest()
|
||||
{
|
||||
var response = await _instance.GetArrayOfEnumsAsync();
|
||||
Assert.IsType<List<OuterEnum>>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<List<OuterEnum>>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -145,7 +151,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
ModelClient modelClient = default;
|
||||
var response = await _instance.TestClientModelAsync(modelClient);
|
||||
Assert.IsType<ModelClient>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<ModelClient>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -59,7 +59,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
ModelClient modelClient = default;
|
||||
var response = await _instance.TestClassnameAsync(modelClient);
|
||||
Assert.IsType<ModelClient>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<ModelClient>(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
List<string> status = default;
|
||||
var response = await _instance.FindPetsByStatusAsync(status);
|
||||
Assert.IsType<List<Pet>>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<List<Pet>>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -91,7 +92,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
List<string> tags = default;
|
||||
var response = await _instance.FindPetsByTagsAsync(tags);
|
||||
Assert.IsType<List<Pet>>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<List<Pet>>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -102,7 +104,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
long petId = default;
|
||||
var response = await _instance.GetPetByIdAsync(petId);
|
||||
Assert.IsType<Pet>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<Pet>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -137,7 +140,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
System.IO.Stream? file = default;
|
||||
string? additionalMetadata = default;
|
||||
var response = await _instance.UploadFileAsync(petId, file, additionalMetadata);
|
||||
Assert.IsType<ApiResponse>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<ApiResponse>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -150,7 +154,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
long petId = default;
|
||||
string? additionalMetadata = default;
|
||||
var response = await _instance.UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata);
|
||||
Assert.IsType<ApiResponse>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<ApiResponse>(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public async Task GetInventoryAsyncTest()
|
||||
{
|
||||
var response = await _instance.GetInventoryAsync();
|
||||
Assert.IsType<Dictionary<string, int>>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<Dictionary<string, int>>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -79,7 +80,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
long orderId = default;
|
||||
var response = await _instance.GetOrderByIdAsync(orderId);
|
||||
Assert.IsType<Order>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<Order>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -90,7 +92,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
Order order = default;
|
||||
var response = await _instance.PlaceOrderAsync(order);
|
||||
Assert.IsType<Order>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<Order>(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
string username = default;
|
||||
var response = await _instance.GetUserByNameAsync(username);
|
||||
Assert.IsType<User>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<User>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -111,7 +112,8 @@ namespace Org.OpenAPITools.Test.Api
|
||||
string username = default;
|
||||
string password = default;
|
||||
var response = await _instance.LoginUserAsync(username, password);
|
||||
Assert.IsType<string>(response);
|
||||
var model = response.ToModel();
|
||||
Assert.IsType<string>(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -151,6 +151,14 @@ namespace Org.OpenAPITools.Test.Model
|
||||
// TODO unit test for the property 'Password'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'PatternWithBackslash'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void PatternWithBackslashTest()
|
||||
{
|
||||
// TODO unit test for the property 'PatternWithBackslash'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'PatternWithDigits'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
||||
@@ -39,30 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ModelClient?>></returns>
|
||||
Task<ApiResponse<ModelClient?>> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// To test special tags and operation ID starting with number
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<ModelClient></returns>
|
||||
Task<ModelClient> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// To test special tags and operation ID starting with number
|
||||
/// </remarks>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<ModelClient?></returns>
|
||||
Task<ModelClient?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,11 +91,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Initializes a new instance of the <see cref="AnotherFakeApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public AnotherFakeApi(ILogger<AnotherFakeApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
public AnotherFakeApi(ILogger<AnotherFakeApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
TokenProvider<OAuthToken> oauthTokenProvider)
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -140,46 +117,6 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags To test special tags and operation ID starting with number
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ModelClient"/>></returns>
|
||||
public async Task<ModelClient> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<ModelClient?> apiResponseLocalVar = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags To test special tags and operation ID starting with number
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ModelClient"/>></returns>
|
||||
public async Task<ModelClient?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<ModelClient?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -204,7 +141,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void AfterCall123TestSpecialTags(ApiResponse<ModelClient?> apiResponseLocalVar, ModelClient modelClient)
|
||||
protected virtual void AfterCall123TestSpecialTags(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient modelClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -227,7 +164,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient?>> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -278,13 +215,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<ModelClient?> apiResponseLocalVar = new ApiResponse<ModelClient?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<ModelClient> apiResponseLocalVar = new ApiResponse<ModelClient>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<ModelClient>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterCall123TestSpecialTags(apiResponseLocalVar, modelClient);
|
||||
}
|
||||
AfterCall123TestSpecialTags(apiResponseLocalVar, modelClient);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
|
||||
@@ -38,28 +38,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<FooGetDefaultResponse?>></returns>
|
||||
Task<ApiResponse<FooGetDefaultResponse?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse></returns>
|
||||
Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse?></returns>
|
||||
Task<FooGetDefaultResponse?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<FooGetDefaultResponse>> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -71,30 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> GetCountryWithHttpInfoAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Hello
|
||||
@@ -105,28 +61,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<List<Guid>?>></returns>
|
||||
Task<ApiResponse<List<Guid>?>> HelloWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Hello
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Hello
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<List<Guid>></returns>
|
||||
Task<List<Guid>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Hello
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Hello
|
||||
/// </remarks>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<List<Guid>?></returns>
|
||||
Task<List<Guid>?> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<List<Guid>>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,11 +113,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(ILogger<DefaultApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
public DefaultApi(ILogger<DefaultApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
TokenProvider<OAuthToken> oauthTokenProvider)
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -204,44 +139,6 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </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="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<FooGetDefaultResponse?> apiResponseLocalVar = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </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="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<FooGetDefaultResponse?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -255,7 +152,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
protected virtual void AfterFooGet(ApiResponse<FooGetDefaultResponse?> apiResponseLocalVar)
|
||||
protected virtual void AfterFooGet(ApiResponse<FooGetDefaultResponse> apiResponseLocalVar)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -276,7 +173,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <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="FooGetDefaultResponse"/></returns>
|
||||
public async Task<ApiResponse<FooGetDefaultResponse?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<FooGetDefaultResponse>> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -314,13 +211,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<FooGetDefaultResponse?> apiResponseLocalVar = new ApiResponse<FooGetDefaultResponse?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<FooGetDefaultResponse> apiResponseLocalVar = new ApiResponse<FooGetDefaultResponse>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<FooGetDefaultResponse>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterFooGet(apiResponseLocalVar);
|
||||
}
|
||||
AfterFooGet(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -333,46 +226,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await GetCountryWithHttpInfoAsync(country, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await GetCountryWithHttpInfoAsync(country, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -397,7 +250,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="country"></param>
|
||||
protected virtual void AfterGetCountry(ApiResponse<object?> apiResponseLocalVar, string country)
|
||||
protected virtual void AfterGetCountry(ApiResponse<object> apiResponseLocalVar, string country)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -420,7 +273,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> GetCountryWithHttpInfoAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> GetCountryAsync(string country, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -468,13 +321,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterGetCountry(apiResponseLocalVar, country);
|
||||
}
|
||||
AfterGetCountry(apiResponseLocalVar, country);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -487,44 +336,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hello Hello
|
||||
/// </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="List<Guid>"/>></returns>
|
||||
public async Task<List<Guid>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<List<Guid>?> apiResponseLocalVar = await HelloWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hello Hello
|
||||
/// </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="List<Guid>"/>></returns>
|
||||
public async Task<List<Guid>?> HelloOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<List<Guid>?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await HelloWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -538,7 +349,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
protected virtual void AfterHello(ApiResponse<List<Guid>?> apiResponseLocalVar)
|
||||
protected virtual void AfterHello(ApiResponse<List<Guid>> apiResponseLocalVar)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -559,7 +370,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <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>
|
||||
public async Task<ApiResponse<List<Guid>?>> HelloWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<List<Guid>>> HelloAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -597,13 +408,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<List<Guid>?> apiResponseLocalVar = new ApiResponse<List<Guid>?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<List<Guid>> apiResponseLocalVar = new ApiResponse<List<Guid>>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<List<Guid>>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterHello(apiResponseLocalVar);
|
||||
}
|
||||
AfterHello(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,30 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ModelClient?>></returns>
|
||||
Task<ApiResponse<ModelClient?>> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// To test class name in snake case
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<ModelClient></returns>
|
||||
Task<ModelClient> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// To test class name in snake case
|
||||
/// </remarks>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<ModelClient?></returns>
|
||||
Task<ModelClient?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,11 +91,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Initializes a new instance of the <see cref="FakeClassnameTags123Api"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public FakeClassnameTags123Api(ILogger<FakeClassnameTags123Api> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
public FakeClassnameTags123Api(ILogger<FakeClassnameTags123Api> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
TokenProvider<OAuthToken> oauthTokenProvider)
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -140,46 +117,6 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case To test class name in snake case
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ModelClient"/>></returns>
|
||||
public async Task<ModelClient> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<ModelClient?> apiResponseLocalVar = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case To test class name in snake case
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ModelClient"/>></returns>
|
||||
public async Task<ModelClient?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<ModelClient?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -204,7 +141,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void AfterTestClassname(ApiResponse<ModelClient?> apiResponseLocalVar, ModelClient modelClient)
|
||||
protected virtual void AfterTestClassname(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient modelClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -227,7 +164,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient?>> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -288,14 +225,11 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<ModelClient?> apiResponseLocalVar = new ApiResponse<ModelClient?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<ModelClient> apiResponseLocalVar = new ApiResponse<ModelClient>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<ModelClient>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterTestClassname(apiResponseLocalVar, modelClient);
|
||||
}
|
||||
else if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
AfterTestClassname(apiResponseLocalVar, modelClient);
|
||||
|
||||
if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
foreach(TokenBase tokenBaseLocalVar in tokenBaseLocalVars)
|
||||
tokenBaseLocalVar.BeginRateLimit();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,30 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
/// </remarks>
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
@@ -73,28 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<Dictionary<string, int>?>></returns>
|
||||
Task<ApiResponse<Dictionary<string, int>?>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Dictionary<string, int>></returns>
|
||||
Task<Dictionary<string, int>> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a map of status codes to quantities
|
||||
/// </remarks>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Dictionary<string, int>?></returns>
|
||||
Task<Dictionary<string, int>?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
@@ -106,30 +62,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<Order?>></returns>
|
||||
Task<ApiResponse<Order?>> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Order></returns>
|
||||
Task<Order> GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
/// </remarks>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Order?></returns>
|
||||
Task<Order?> GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<Order>> GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@@ -141,30 +74,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<Order?>></returns>
|
||||
Task<ApiResponse<Order?>> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Order></returns>
|
||||
Task<Order> PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<Order?></returns>
|
||||
Task<Order?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<Order>> PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,11 +126,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Initializes a new instance of the <see cref="StoreApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public StoreApi(ILogger<StoreApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
public StoreApi(ILogger<StoreApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
TokenProvider<OAuthToken> oauthTokenProvider)
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -242,46 +152,6 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -306,7 +176,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="orderId"></param>
|
||||
protected virtual void AfterDeleteOrder(ApiResponse<object?> apiResponseLocalVar, string orderId)
|
||||
protected virtual void AfterDeleteOrder(ApiResponse<object> apiResponseLocalVar, string orderId)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -329,7 +199,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -358,13 +228,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterDeleteOrder(apiResponseLocalVar, orderId);
|
||||
}
|
||||
AfterDeleteOrder(apiResponseLocalVar, orderId);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -377,44 +243,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </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="Dictionary<string, int>"/>></returns>
|
||||
public async Task<Dictionary<string, int>> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Dictionary<string, int>?> apiResponseLocalVar = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </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="Dictionary<string, int>"/>></returns>
|
||||
public async Task<Dictionary<string, int>?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Dictionary<string, int>?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -428,7 +256,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
protected virtual void AfterGetInventory(ApiResponse<Dictionary<string, int>?> apiResponseLocalVar)
|
||||
protected virtual void AfterGetInventory(ApiResponse<Dictionary<string, int>> apiResponseLocalVar)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -449,7 +277,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <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>
|
||||
public async Task<ApiResponse<Dictionary<string, int>?>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<Dictionary<string, int>>> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -493,14 +321,11 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<Dictionary<string, int>?> apiResponseLocalVar = new ApiResponse<Dictionary<string, int>?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<Dictionary<string, int>> apiResponseLocalVar = new ApiResponse<Dictionary<string, int>>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<Dictionary<string, int>>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterGetInventory(apiResponseLocalVar);
|
||||
}
|
||||
else if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
AfterGetInventory(apiResponseLocalVar);
|
||||
|
||||
if (apiResponseLocalVar.StatusCode == (HttpStatusCode) 429)
|
||||
foreach(TokenBase tokenBaseLocalVar in tokenBaseLocalVars)
|
||||
tokenBaseLocalVar.BeginRateLimit();
|
||||
|
||||
@@ -515,46 +340,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="Order"/>></returns>
|
||||
public async Task<Order> GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Order?> apiResponseLocalVar = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="Order"/>></returns>
|
||||
public async Task<Order?> GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Order?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -579,7 +364,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="orderId"></param>
|
||||
protected virtual void AfterGetOrderById(ApiResponse<Order?> apiResponseLocalVar, long orderId)
|
||||
protected virtual void AfterGetOrderById(ApiResponse<Order> apiResponseLocalVar, long orderId)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -602,7 +387,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId">ID of pet that needs to be fetched</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Order"/></returns>
|
||||
public async Task<ApiResponse<Order?>> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<Order>> GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -641,13 +426,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<Order?> apiResponseLocalVar = new ApiResponse<Order?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<Order> apiResponseLocalVar = new ApiResponse<Order>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<Order>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterGetOrderById(apiResponseLocalVar, orderId);
|
||||
}
|
||||
AfterGetOrderById(apiResponseLocalVar, orderId);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -660,46 +441,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="Order"/>></returns>
|
||||
public async Task<Order> PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Order?> apiResponseLocalVar = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="Order"/>></returns>
|
||||
public async Task<Order?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<Order?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -724,7 +465,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="order"></param>
|
||||
protected virtual void AfterPlaceOrder(ApiResponse<Order?> apiResponseLocalVar, Order order)
|
||||
protected virtual void AfterPlaceOrder(ApiResponse<Order> apiResponseLocalVar, Order order)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -747,7 +488,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Order"/></returns>
|
||||
public async Task<ApiResponse<Order?>> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<Order>> PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -799,13 +540,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<Order?> apiResponseLocalVar = new ApiResponse<Order?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<Order> apiResponseLocalVar = new ApiResponse<Order>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<Order>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterPlaceOrder(apiResponseLocalVar, order);
|
||||
}
|
||||
AfterPlaceOrder(apiResponseLocalVar, order);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
|
||||
@@ -39,30 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -74,30 +51,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> CreateUsersWithArrayInputWithHttpInfoAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> CreateUsersWithArrayInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -109,30 +63,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> CreateUsersWithListInputWithHttpInfoAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> CreateUsersWithListInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
@@ -144,30 +75,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@@ -179,30 +87,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<User?>></returns>
|
||||
Task<ApiResponse<User?>> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<User></returns>
|
||||
Task<User> GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<User?></returns>
|
||||
Task<User?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<User>> GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -215,32 +100,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<string?>></returns>
|
||||
Task<ApiResponse<string?>> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<string></returns>
|
||||
Task<string> LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<string?></returns>
|
||||
Task<string?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<string>> LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@@ -251,28 +111,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@@ -285,32 +124,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object?>></returns>
|
||||
Task<ApiResponse<object?>> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object></returns>
|
||||
Task<object> UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This can only be done by the logged in user.
|
||||
/// </remarks>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<object?></returns>
|
||||
Task<object?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
Task<ApiResponse<object>> UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,11 +176,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// Initializes a new instance of the <see cref="UserApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public UserApi(ILogger<UserApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
public UserApi(ILogger<UserApi> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider,
|
||||
TokenProvider<ApiKeyToken> apiKeyProvider,
|
||||
TokenProvider<BearerToken> bearerTokenProvider,
|
||||
TokenProvider<BasicToken> basicTokenProvider,
|
||||
TokenProvider<HttpSignatureToken> httpSignatureTokenProvider,
|
||||
TokenProvider<OAuthToken> oauthTokenProvider)
|
||||
{
|
||||
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
|
||||
@@ -388,46 +202,6 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -452,7 +226,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUser(ApiResponse<object?> apiResponseLocalVar, User user)
|
||||
protected virtual void AfterCreateUser(ApiResponse<object> apiResponseLocalVar, User user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -475,7 +249,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -517,13 +291,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterCreateUser(apiResponseLocalVar, user);
|
||||
}
|
||||
AfterCreateUser(apiResponseLocalVar, user);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -536,46 +306,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> CreateUsersWithArrayInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -600,7 +330,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUsersWithArrayInput(ApiResponse<object?> apiResponseLocalVar, List<User> user)
|
||||
protected virtual void AfterCreateUsersWithArrayInput(ApiResponse<object> apiResponseLocalVar, List<User> user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -623,7 +353,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> CreateUsersWithArrayInputWithHttpInfoAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -665,13 +395,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterCreateUsersWithArrayInput(apiResponseLocalVar, user);
|
||||
}
|
||||
AfterCreateUsersWithArrayInput(apiResponseLocalVar, user);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -684,46 +410,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> CreateUsersWithListInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -748,7 +434,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUsersWithListInput(ApiResponse<object?> apiResponseLocalVar, List<User> user)
|
||||
protected virtual void AfterCreateUsersWithListInput(ApiResponse<object> apiResponseLocalVar, List<User> user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -771,7 +457,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> CreateUsersWithListInputWithHttpInfoAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -813,13 +499,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterCreateUsersWithListInput(apiResponseLocalVar, user);
|
||||
}
|
||||
AfterCreateUsersWithListInput(apiResponseLocalVar, user);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -832,46 +514,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -896,7 +538,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterDeleteUser(ApiResponse<object?> apiResponseLocalVar, string username)
|
||||
protected virtual void AfterDeleteUser(ApiResponse<object> apiResponseLocalVar, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -919,7 +561,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -948,13 +590,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterDeleteUser(apiResponseLocalVar, username);
|
||||
}
|
||||
AfterDeleteUser(apiResponseLocalVar, username);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -967,46 +605,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="User"/>></returns>
|
||||
public async Task<User> GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<User?> apiResponseLocalVar = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="User"/>></returns>
|
||||
public async Task<User?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<User?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1031,7 +629,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterGetUserByName(ApiResponse<User?> apiResponseLocalVar, string username)
|
||||
protected virtual void AfterGetUserByName(ApiResponse<User> apiResponseLocalVar, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1054,7 +652,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="User"/></returns>
|
||||
public async Task<ApiResponse<User?>> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<User>> GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -1093,13 +691,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<User?> apiResponseLocalVar = new ApiResponse<User?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<User> apiResponseLocalVar = new ApiResponse<User>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<User>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterGetUserByName(apiResponseLocalVar, username);
|
||||
}
|
||||
AfterGetUserByName(apiResponseLocalVar, username);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -1112,48 +706,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="string"/>></returns>
|
||||
public async Task<string> LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<string?> apiResponseLocalVar = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="username">The user name for login</param>
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="string"/>></returns>
|
||||
public async Task<string?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<string?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1183,7 +735,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
protected virtual void AfterLoginUser(ApiResponse<string?> apiResponseLocalVar, string username, string password)
|
||||
protected virtual void AfterLoginUser(ApiResponse<string> apiResponseLocalVar, string username, string password)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1208,7 +760,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="string"/></returns>
|
||||
public async Task<ApiResponse<string?>> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<string>> LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -1256,13 +808,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<string?> apiResponseLocalVar = new ApiResponse<string?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<string> apiResponseLocalVar = new ApiResponse<string>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<string>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterLoginUser(apiResponseLocalVar, username, password);
|
||||
}
|
||||
AfterLoginUser(apiResponseLocalVar, username, password);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -1275,44 +823,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </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="object"/>></returns>
|
||||
public async Task<object> LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
/// </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="object"/>></returns>
|
||||
public async Task<object?> LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1326,7 +836,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
protected virtual void AfterLogoutUser(ApiResponse<object?> apiResponseLocalVar)
|
||||
protected virtual void AfterLogoutUser(ApiResponse<object> apiResponseLocalVar)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1347,7 +857,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <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="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -1376,13 +886,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterLogoutUser(apiResponseLocalVar);
|
||||
}
|
||||
AfterLogoutUser(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
@@ -1395,48 +901,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object> UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?> apiResponseLocalVar = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (apiResponseLocalVar.Content == null)
|
||||
throw new ApiException(apiResponseLocalVar.ReasonPhrase, apiResponseLocalVar.StatusCode, apiResponseLocalVar.RawContent);
|
||||
|
||||
return apiResponseLocalVar.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="user">Updated user object</param>
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="object"/>></returns>
|
||||
public async Task<object?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<object?>? apiResponseLocalVar = null;
|
||||
try
|
||||
{
|
||||
apiResponseLocalVar = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return apiResponseLocalVar != null && apiResponseLocalVar.IsSuccessStatusCode
|
||||
? apiResponseLocalVar.Content
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1466,7 +930,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterUpdateUser(ApiResponse<object?> apiResponseLocalVar, User user, string username)
|
||||
protected virtual void AfterUpdateUser(ApiResponse<object> apiResponseLocalVar, User user, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1491,7 +955,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object?>> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
public async Task<ApiResponse<object>> UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
@@ -1535,13 +999,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
|
||||
|
||||
ApiResponse<object?> apiResponseLocalVar = new ApiResponse<object?>(httpResponseMessageLocalVar, responseContentLocalVar);
|
||||
ApiResponse<object> apiResponseLocalVar = new ApiResponse<object>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, _jsonSerializerOptions);
|
||||
|
||||
if (apiResponseLocalVar.IsSuccessStatusCode)
|
||||
{
|
||||
apiResponseLocalVar.Content = JsonSerializer.Deserialize<object>(apiResponseLocalVar.RawContent, _jsonSerializerOptions);
|
||||
AfterUpdateUser(apiResponseLocalVar, user, username);
|
||||
}
|
||||
AfterUpdateUser(apiResponseLocalVar, user, username);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
@@ -22,7 +23,7 @@ namespace Org.OpenAPITools.Client
|
||||
public interface IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The data type of <see cref="Data"/>
|
||||
/// The type that represents the server's response.
|
||||
/// </summary>
|
||||
Type ResponseType { get; }
|
||||
|
||||
@@ -48,11 +49,6 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
public partial class ApiResponse<T> : IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The deserialized content
|
||||
/// </summary>
|
||||
public T? Content { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status code (HTTP status code)
|
||||
/// </summary>
|
||||
@@ -60,7 +56,7 @@ namespace Org.OpenAPITools.Client
|
||||
public HttpStatusCode StatusCode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The content of this response
|
||||
/// The type that represents the server's response.
|
||||
/// </summary>
|
||||
public Type ResponseType
|
||||
{
|
||||
@@ -70,7 +66,7 @@ namespace Org.OpenAPITools.Client
|
||||
/// <summary>
|
||||
/// The raw data
|
||||
/// </summary>
|
||||
public string RawContent { get; }
|
||||
public string RawContent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The IsSuccessStatusCode from the api response
|
||||
@@ -92,18 +88,56 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
public DateTime DownloadedAt { get; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// The JsonSerialzierOptions
|
||||
/// </summary>
|
||||
private System.Text.Json.JsonSerializerOptions _jsonSerializerOptions;
|
||||
|
||||
/// <summary>
|
||||
/// Construct the response using an HttpResponseMessage
|
||||
/// </summary>
|
||||
/// <param name="response"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
public ApiResponse(System.Net.Http.HttpResponseMessage response, string rawContent)
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, System.Text.Json.JsonSerializerOptions jsonSerializerOptions)
|
||||
{
|
||||
StatusCode = response.StatusCode;
|
||||
Headers = response.Headers;
|
||||
IsSuccessStatusCode = response.IsSuccessStatusCode;
|
||||
ReasonPhrase = response.ReasonPhrase;
|
||||
StatusCode = httpResponseMessage.StatusCode;
|
||||
Headers = httpResponseMessage.Headers;
|
||||
IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode;
|
||||
ReasonPhrase = httpResponseMessage.ReasonPhrase;
|
||||
RawContent = rawContent;
|
||||
_jsonSerializerOptions = jsonSerializerOptions;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes the server's response
|
||||
/// </summary>
|
||||
public T? ToModel(System.Text.Json.JsonSerializerOptions? options = null)
|
||||
{
|
||||
return IsSuccessStatusCode
|
||||
? System.Text.Json.JsonSerializer.Deserialize<T>(RawContent, options ?? _jsonSerializerOptions)
|
||||
: default(T);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when the model can be deserialized
|
||||
/// </summary>
|
||||
public bool TryToModel([NotNullWhen(true)] out T? model, System.Text.Json.JsonSerializerOptions? options = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
model = ToModel(options);
|
||||
return model != null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
model = default(T);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public Activity(Dictionary<string, List<ActivityOutputElementRepresentation>> activityOutputs)
|
||||
{
|
||||
ActivityOutputs = activityOutputs;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ActivityOutputs
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Prop1 = prop1;
|
||||
Prop2 = prop2;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Prop1
|
||||
/// </summary>
|
||||
|
||||
@@ -52,8 +52,11 @@ namespace Org.OpenAPITools.Model
|
||||
MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3;
|
||||
MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString;
|
||||
Anytype1 = anytype1;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// an object with no declared properties and no undeclared properties, hence it's an empty map.
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ClassName = className;
|
||||
Color = color;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
|
||||
@@ -42,8 +42,11 @@ namespace Org.OpenAPITools.Model
|
||||
Code = code;
|
||||
Message = message;
|
||||
Type = type;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Code
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Cultivar = cultivar;
|
||||
Origin = origin;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Cultivar = cultivar;
|
||||
Mealy = mealy;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber)
|
||||
{
|
||||
ArrayArrayNumber = arrayArrayNumber;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayNumber
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public ArrayOfNumberOnly(List<decimal> arrayNumber)
|
||||
{
|
||||
ArrayNumber = arrayNumber;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayNumber
|
||||
/// </summary>
|
||||
|
||||
@@ -42,8 +42,11 @@ namespace Org.OpenAPITools.Model
|
||||
ArrayArrayOfInteger = arrayArrayOfInteger;
|
||||
ArrayArrayOfModel = arrayArrayOfModel;
|
||||
ArrayOfString = arrayOfString;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfInteger
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public Banana(decimal lengthCm)
|
||||
{
|
||||
LengthCm = lengthCm;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LengthCm
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
LengthCm = lengthCm;
|
||||
Sweet = sweet;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LengthCm
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public BasquePig(string className)
|
||||
{
|
||||
ClassName = className;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace Org.OpenAPITools.Model
|
||||
SCAETHFlowPoints = sCAETHFlowPoints;
|
||||
SmallCamel = smallCamel;
|
||||
SmallSnake = smallSnake;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Name of the pet
|
||||
/// </summary>
|
||||
|
||||
@@ -42,8 +42,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Dictionary = dictionary;
|
||||
CatAllOf = catAllOf;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Dictionary
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public CatAllOf(bool declawed)
|
||||
{
|
||||
Declawed = declawed;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Declawed
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
|
||||
@@ -39,8 +39,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType)
|
||||
{
|
||||
ChildCatAllOf = childCatAllOf;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ChildCatAllOf
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Name = name;
|
||||
PetType = petType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Defines PetType
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public ClassModel(string classProperty)
|
||||
{
|
||||
ClassProperty = classProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ShapeInterface = shapeInterface;
|
||||
QuadrilateralInterface = quadrilateralInterface;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public DanishPig(string className)
|
||||
{
|
||||
ClassName = className;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public DateOnlyClass(DateTime dateOnlyProperty)
|
||||
{
|
||||
DateOnlyProperty = dateOnlyProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DateOnlyProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public DeprecatedObject(string name)
|
||||
{
|
||||
Name = name;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal Dog(DogAllOf dogAllOf, string className, string color = @"red") : base(className, color)
|
||||
{
|
||||
DogAllOf = dogAllOf;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DogAllOf
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public DogAllOf(string breed)
|
||||
{
|
||||
Breed = breed;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
|
||||
@@ -44,8 +44,11 @@ namespace Org.OpenAPITools.Model
|
||||
ShapeOrNull = shapeOrNull;
|
||||
Shapes = shapes;
|
||||
NullableShape = nullableShape;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MainShape
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ArrayEnum = arrayEnum;
|
||||
JustSymbol = justSymbol;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Defines ArrayEnum
|
||||
/// </summary>
|
||||
|
||||
@@ -54,8 +54,11 @@ namespace Org.OpenAPITools.Model
|
||||
OuterEnumInteger = outerEnumInteger;
|
||||
OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
|
||||
OuterEnum = outerEnum;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Defines EnumInteger
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ShapeInterface = shapeInterface;
|
||||
TriangleInterface = triangleInterface;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public File(string sourceURI)
|
||||
{
|
||||
SourceURI = sourceURI;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Test capitalization
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
File = file;
|
||||
Files = files;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets File
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public Foo(string bar = @"bar")
|
||||
{
|
||||
Bar = bar;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public FooGetDefaultResponse(Foo stringProperty)
|
||||
{
|
||||
StringProperty = stringProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets StringProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -74,8 +74,11 @@ namespace Org.OpenAPITools.Model
|
||||
UnsignedInteger = unsignedInteger;
|
||||
UnsignedLong = unsignedLong;
|
||||
Uuid = uuid;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
/// </summary>
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Apple = apple;
|
||||
Color = color;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,8 +53,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Banana = banana;
|
||||
Color = color;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Apple
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal FruitReq(AppleReq appleReq)
|
||||
{
|
||||
AppleReq = appleReq;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,8 +49,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal FruitReq(BananaReq bananaReq)
|
||||
{
|
||||
BananaReq = bananaReq;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets AppleReq
|
||||
/// </summary>
|
||||
|
||||
@@ -42,8 +42,11 @@ namespace Org.OpenAPITools.Model
|
||||
Apple = Apple;
|
||||
Banana = Banana;
|
||||
Color = color;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Apple
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public GrandparentAnimal(string petType)
|
||||
{
|
||||
PetType = petType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PetType
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Bar = bar;
|
||||
Foo = foo;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public HealthCheckResult(string? nullableMessage = default)
|
||||
{
|
||||
NullableMessage = nullableMessage;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets NullableMessage
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ShapeInterface = shapeInterface;
|
||||
TriangleInterface = triangleInterface;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public List(string _123list)
|
||||
{
|
||||
_123List = _123list;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _123List
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
EscapedLiteralString = escapedLiteralString;
|
||||
UnescapedLiteralString = unescapedLiteralString;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets EscapedLiteralString
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal Mammal(Whale whale)
|
||||
{
|
||||
Whale = whale;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,6 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal Mammal(Zebra zebra)
|
||||
{
|
||||
Zebra = zebra;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,8 +60,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal Mammal(Pig pig)
|
||||
{
|
||||
Pig = pig;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Whale
|
||||
/// </summary>
|
||||
|
||||
@@ -44,8 +44,11 @@ namespace Org.OpenAPITools.Model
|
||||
IndirectMap = indirectMap;
|
||||
MapMapOfString = mapMapOfString;
|
||||
MapOfEnumString = mapOfEnumString;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Defines Inner
|
||||
/// </summary>
|
||||
|
||||
@@ -44,8 +44,11 @@ namespace Org.OpenAPITools.Model
|
||||
Map = map;
|
||||
Uuid = uuid;
|
||||
UuidWithPattern = uuidWithPattern;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets DateTime
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ClassProperty = classProperty;
|
||||
Name = name;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ClassProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public ModelClient(string clientProperty)
|
||||
{
|
||||
_ClientProperty = clientProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _ClientProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -44,8 +44,11 @@ namespace Org.OpenAPITools.Model
|
||||
Property = property;
|
||||
SnakeCase = snakeCase;
|
||||
_123Number = _123number;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets NameProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -60,8 +60,11 @@ namespace Org.OpenAPITools.Model
|
||||
ObjectAndItemsNullableProp = objectAndItemsNullableProp;
|
||||
ObjectNullableProp = objectNullableProp;
|
||||
StringProp = stringProp;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayItemsNullable
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public NullableGuidClass(Guid? uuid = default)
|
||||
{
|
||||
Uuid = uuid;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal NullableShape(Triangle triangle)
|
||||
{
|
||||
Triangle = triangle;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,8 +49,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal NullableShape(Quadrilateral quadrilateral)
|
||||
{
|
||||
Quadrilateral = quadrilateral;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Triangle
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public NumberOnly(decimal justNumber)
|
||||
{
|
||||
JustNumber = justNumber;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets JustNumber
|
||||
/// </summary>
|
||||
|
||||
@@ -44,8 +44,11 @@ namespace Org.OpenAPITools.Model
|
||||
DeprecatedRef = deprecatedRef;
|
||||
Id = id;
|
||||
Uuid = uuid;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bars
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal OneOfString(string _string)
|
||||
{
|
||||
String = _string;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace Org.OpenAPITools.Model
|
||||
ShipDate = shipDate;
|
||||
Status = status;
|
||||
Complete = complete;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Order Status
|
||||
/// </summary>
|
||||
|
||||
@@ -42,8 +42,11 @@ namespace Org.OpenAPITools.Model
|
||||
MyBoolean = myBoolean;
|
||||
MyNumber = myNumber;
|
||||
MyString = myString;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MyBoolean
|
||||
/// </summary>
|
||||
|
||||
@@ -37,8 +37,11 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonConstructor]
|
||||
internal ParentPet(string petType) : base(petType)
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace Org.OpenAPITools.Model
|
||||
PhotoUrls = photoUrls;
|
||||
Status = status;
|
||||
Tags = tags;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// pet status in the store
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal Pig(BasquePig basquePig)
|
||||
{
|
||||
BasquePig = basquePig;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,8 +49,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal Pig(DanishPig danishPig)
|
||||
{
|
||||
DanishPig = danishPig;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets BasquePig
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal PolymorphicProperty(bool _bool)
|
||||
{
|
||||
Bool = _bool;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,6 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal PolymorphicProperty(string _string)
|
||||
{
|
||||
String = _string;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,6 +60,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal PolymorphicProperty(Object _object)
|
||||
{
|
||||
Object = _object;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,8 +71,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal PolymorphicProperty(List<string> liststring)
|
||||
{
|
||||
Liststring = liststring;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bool
|
||||
/// </summary>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
internal Quadrilateral(SimpleQuadrilateral simpleQuadrilateral)
|
||||
{
|
||||
SimpleQuadrilateral = simpleQuadrilateral;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,8 +49,11 @@ namespace Org.OpenAPITools.Model
|
||||
internal Quadrilateral(ComplexQuadrilateral complexQuadrilateral)
|
||||
{
|
||||
ComplexQuadrilateral = complexQuadrilateral;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SimpleQuadrilateral
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public QuadrilateralInterface(string quadrilateralType)
|
||||
{
|
||||
QuadrilateralType = quadrilateralType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets QuadrilateralType
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Bar = bar;
|
||||
Baz = baz;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public Return(int returnProperty)
|
||||
{
|
||||
ReturnProperty = returnProperty;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ReturnProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ShapeInterface = shapeInterface;
|
||||
TriangleInterface = triangleInterface;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Triangle = triangle;
|
||||
QuadrilateralType = quadrilateralType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,8 +53,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Quadrilateral = quadrilateral;
|
||||
QuadrilateralType = quadrilateralType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Triangle
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public ShapeInterface(string shapeType)
|
||||
{
|
||||
ShapeType = shapeType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeType
|
||||
/// </summary>
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Triangle = triangle;
|
||||
QuadrilateralType = quadrilateralType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,8 +53,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Quadrilateral = quadrilateral;
|
||||
QuadrilateralType = quadrilateralType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Triangle
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
ShapeInterface = shapeInterface;
|
||||
QuadrilateralInterface = quadrilateralInterface;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeInterface
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
SpecialModelNameProperty = specialModelNameProperty;
|
||||
SpecialPropertyName = specialPropertyName;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SpecialModelNameProperty
|
||||
/// </summary>
|
||||
|
||||
@@ -40,8 +40,11 @@ namespace Org.OpenAPITools.Model
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Id
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public TestCollectionEndingWithWordList(string value)
|
||||
{
|
||||
Value = value;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Value
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public TestCollectionEndingWithWordListObject(List<TestCollectionEndingWithWordList> testCollectionEndingWithWordList)
|
||||
{
|
||||
TestCollectionEndingWithWordList = testCollectionEndingWithWordList;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets TestCollectionEndingWithWordList
|
||||
/// </summary>
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Org.OpenAPITools.Model
|
||||
EquilateralTriangle = equilateralTriangle;
|
||||
ShapeType = shapeType;
|
||||
TriangleType = triangleType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,6 +57,7 @@ namespace Org.OpenAPITools.Model
|
||||
IsoscelesTriangle = isoscelesTriangle;
|
||||
ShapeType = shapeType;
|
||||
TriangleType = triangleType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -70,8 +72,11 @@ namespace Org.OpenAPITools.Model
|
||||
ScaleneTriangle = scaleneTriangle;
|
||||
ShapeType = shapeType;
|
||||
TriangleType = triangleType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets EquilateralTriangle
|
||||
/// </summary>
|
||||
|
||||
@@ -38,8 +38,11 @@ namespace Org.OpenAPITools.Model
|
||||
public TriangleInterface(string triangleType)
|
||||
{
|
||||
TriangleType = triangleType;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets TriangleType
|
||||
/// </summary>
|
||||
|
||||
@@ -60,8 +60,11 @@ namespace Org.OpenAPITools.Model
|
||||
AnyTypeProp = anyTypeProp;
|
||||
AnyTypePropNullable = anyTypePropNullable;
|
||||
ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable;
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user