forked from loafle/openapi-generator-original
added event for errors (#16057)
This commit is contained in:
parent
91a55fc6b6
commit
9362b49173
@ -1026,6 +1026,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
supportingFiles.add(new SupportingFile("DateTimeJsonConverter.mustache", clientPackageDir, "DateTimeJsonConverter.cs"));
|
||||
supportingFiles.add(new SupportingFile("DateTimeNullableJsonConverter.mustache", clientPackageDir, "DateTimeNullableJsonConverter.cs"));
|
||||
supportingFiles.add(new SupportingFile("ApiResponseEventArgs`1.mustache", clientPackageDir, "ApiResponseEventArgs.cs"));
|
||||
supportingFiles.add(new SupportingFile("ExceptionEventArgs.mustache", clientPackageDir, "ExceptionEventArgs.cs"));
|
||||
supportingFiles.add(new SupportingFile("JsonSerializerOptionsProvider.mustache", clientPackageDir, "JsonSerializerOptionsProvider.cs"));
|
||||
supportingFiles.add(new SupportingFile("CookieContainer.mustache", clientPackageDir, "CookieContainer.cs"));
|
||||
supportingFiles.add(new SupportingFile("Option.mustache", clientPackageDir, "Option.cs"));
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
{{>visibility}} class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1,2 @@
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
@ -81,11 +81,21 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<{{{returnType}}}{{^returnType}}object{{/returnType}}>>{{nrt?}} On{{operationId}};
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>{{nrt?}} OnError{{operationId}};
|
||||
|
||||
internal void ExecuteOn{{operationId}}(ApiResponse<{{{returnType}}}{{^returnType}}object{{/returnType}}> apiResponse)
|
||||
{
|
||||
On{{operationId}}?.Invoke(this, new ApiResponseEventArgs<{{{returnType}}}{{^returnType}}object{{/returnType}}>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnError{{operationId}}(Exception exception)
|
||||
{
|
||||
OnError{{operationId}}?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
{{/operation}}
|
||||
{{/lambda.trimTrailingWhiteSpace}}
|
||||
}
|
||||
@ -232,20 +242,22 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/allParams}}
|
||||
private void OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}})
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnError{{operationId}}({{#lambda.joinWithComma}}ref suppressDefaultLog exception pathFormat path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
{{>OnErrorDefaultImplementation}}
|
||||
OnError{{operationId}}({{#lambda.joinWithComma}}exception pathFormat path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
{{#allParams}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{/allParams}}
|
||||
partial void OnError{{operationId}}({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog Exception exception string pathFormat string path {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
|
||||
/// <summary>
|
||||
/// {{summary}} {{notes}}
|
||||
@ -549,6 +561,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnError{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}e "{{path}}" uriBuilderLocalVar.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
|
||||
Events.ExecuteOnError{{operationId}}(e);
|
||||
throw;
|
||||
}
|
||||
{{/lambda.trimLineBreaks}}
|
||||
|
@ -118,6 +118,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningToken.cs
|
||||
|
@ -73,10 +73,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>>? OnCall123TestSpecialTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorCall123TestSpecialTags;
|
||||
|
||||
internal void ExecuteOnCall123TestSpecialTags(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnCall123TestSpecialTags?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCall123TestSpecialTags(Exception exception)
|
||||
{
|
||||
OnErrorCall123TestSpecialTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -191,18 +201,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorCall123TestSpecialTagsDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCall123TestSpecialTags(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCall123TestSpecialTags(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorCall123TestSpecialTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags To test special tags and operation ID starting with number
|
||||
@ -291,6 +304,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCall123TestSpecialTagsDefaultImplementation(e, "/another-fake/dummy", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorCall123TestSpecialTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -115,30 +115,60 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<FooGetDefaultResponse>>? OnFooGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFooGet;
|
||||
|
||||
internal void ExecuteOnFooGet(ApiResponse<FooGetDefaultResponse> apiResponse)
|
||||
{
|
||||
OnFooGet?.Invoke(this, new ApiResponseEventArgs<FooGetDefaultResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFooGet(Exception exception)
|
||||
{
|
||||
OnErrorFooGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnGetCountry;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetCountry;
|
||||
|
||||
internal void ExecuteOnGetCountry(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnGetCountry?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetCountry(Exception exception)
|
||||
{
|
||||
OnErrorGetCountry?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Guid>>>? OnHello;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorHello;
|
||||
|
||||
internal void ExecuteOnHello(ApiResponse<List<Guid>> apiResponse)
|
||||
{
|
||||
OnHello?.Invoke(this, new ApiResponseEventArgs<List<Guid>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorHello(Exception exception)
|
||||
{
|
||||
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -237,17 +267,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFooGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFooGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFooGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFooGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFooGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -317,6 +350,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFooGetDefaultImplementation(e, "/foo", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFooGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -364,18 +398,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
private void OnErrorGetCountryDefaultImplementation(Exception exception, string pathFormat, string path, string country)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetCountry(exception, pathFormat, path, country);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetCountry(ref suppressDefaultLog, exception, pathFormat, path, country);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="country"></param>
|
||||
partial void OnErrorGetCountry(Exception exception, string pathFormat, string path, string country);
|
||||
partial void OnErrorGetCountry(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string country);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -461,6 +498,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetCountryDefaultImplementation(e, "/country", uriBuilderLocalVar.Path, country);
|
||||
Events.ExecuteOnErrorGetCountry(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -492,17 +530,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorHelloDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorHello(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorHello(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorHello(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorHello(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Hello Hello
|
||||
@ -572,6 +613,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorHelloDefaultImplementation(e, "/hello", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorHello(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -463,150 +463,300 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<HealthCheckResult>>? OnFakeHealthGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFakeHealthGet;
|
||||
|
||||
internal void ExecuteOnFakeHealthGet(ApiResponse<HealthCheckResult> apiResponse)
|
||||
{
|
||||
OnFakeHealthGet?.Invoke(this, new ApiResponseEventArgs<HealthCheckResult>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeHealthGet(Exception exception)
|
||||
{
|
||||
OnErrorFakeHealthGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<bool>>? OnFakeOuterBooleanSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFakeOuterBooleanSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterBooleanSerialize(ApiResponse<bool> apiResponse)
|
||||
{
|
||||
OnFakeOuterBooleanSerialize?.Invoke(this, new ApiResponseEventArgs<bool>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterBooleanSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<OuterComposite>>? OnFakeOuterCompositeSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFakeOuterCompositeSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterCompositeSerialize(ApiResponse<OuterComposite> apiResponse)
|
||||
{
|
||||
OnFakeOuterCompositeSerialize?.Invoke(this, new ApiResponseEventArgs<OuterComposite>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterCompositeSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<decimal>>? OnFakeOuterNumberSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFakeOuterNumberSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterNumberSerialize(ApiResponse<decimal> apiResponse)
|
||||
{
|
||||
OnFakeOuterNumberSerialize?.Invoke(this, new ApiResponseEventArgs<decimal>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterNumberSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>>? OnFakeOuterStringSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFakeOuterStringSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterStringSerialize(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnFakeOuterStringSerialize?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterStringSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterStringSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<OuterEnum>>>? OnGetArrayOfEnums;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetArrayOfEnums;
|
||||
|
||||
internal void ExecuteOnGetArrayOfEnums(ApiResponse<List<OuterEnum>> apiResponse)
|
||||
{
|
||||
OnGetArrayOfEnums?.Invoke(this, new ApiResponseEventArgs<List<OuterEnum>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetArrayOfEnums(Exception exception)
|
||||
{
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestBodyWithFileSchema;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestBodyWithFileSchema;
|
||||
|
||||
internal void ExecuteOnTestBodyWithFileSchema(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithFileSchema?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithFileSchema(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchema?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestBodyWithQueryParams;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestBodyWithQueryParams;
|
||||
|
||||
internal void ExecuteOnTestBodyWithQueryParams(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithQueryParams?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithQueryParams(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParams?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>>? OnTestClientModel;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestClientModel;
|
||||
|
||||
internal void ExecuteOnTestClientModel(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClientModel?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClientModel(Exception exception)
|
||||
{
|
||||
OnErrorTestClientModel?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestEndpointParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestEndpointParameters;
|
||||
|
||||
internal void ExecuteOnTestEndpointParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEndpointParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEndpointParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEndpointParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestEnumParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestEnumParameters;
|
||||
|
||||
internal void ExecuteOnTestEnumParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEnumParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEnumParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEnumParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestGroupParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestGroupParameters;
|
||||
|
||||
internal void ExecuteOnTestGroupParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestGroupParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestGroupParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestGroupParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestInlineAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestInlineAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestJsonFormData;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestJsonFormData;
|
||||
|
||||
internal void ExecuteOnTestJsonFormData(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestJsonFormData?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestJsonFormData(Exception exception)
|
||||
{
|
||||
OnErrorTestJsonFormData?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnTestQueryParameterCollectionFormat;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestQueryParameterCollectionFormat;
|
||||
|
||||
internal void ExecuteOnTestQueryParameterCollectionFormat(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestQueryParameterCollectionFormat?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestQueryParameterCollectionFormat(Exception exception)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormat?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -705,17 +855,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFakeHealthGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeHealthGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeHealthGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFakeHealthGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Health check endpoint
|
||||
@ -785,6 +938,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeHealthGetDefaultImplementation(e, "/fake/health", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFakeHealthGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -821,18 +975,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterBooleanSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<bool> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterBooleanSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterBooleanSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
partial void OnErrorFakeOuterBooleanSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer boolean types
|
||||
@ -920,6 +1077,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerializeDefaultImplementation(e, "/fake/outer/boolean", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterBooleanSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -967,18 +1125,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="outerComposite"></param>
|
||||
private void OnErrorFakeOuterCompositeSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterCompositeSerialize(exception, pathFormat, path, outerComposite);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterCompositeSerialize(ref suppressDefaultLog, exception, pathFormat, path, outerComposite);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="outerComposite"></param>
|
||||
partial void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
partial void OnErrorFakeOuterCompositeSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of object with outer number type
|
||||
@ -1068,6 +1229,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerializeDefaultImplementation(e, "/fake/outer/composite", uriBuilderLocalVar.Path, outerComposite);
|
||||
Events.ExecuteOnErrorFakeOuterCompositeSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1104,18 +1266,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterNumberSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<decimal> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterNumberSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterNumberSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
partial void OnErrorFakeOuterNumberSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer number types
|
||||
@ -1203,6 +1368,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerializeDefaultImplementation(e, "/fake/outer/number", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterNumberSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1253,19 +1419,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterStringSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterStringSerialize(exception, pathFormat, path, requiredStringUuid, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterStringSerialize(ref suppressDefaultLog, exception, pathFormat, path, requiredStringUuid, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
partial void OnErrorFakeOuterStringSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer string types
|
||||
@ -1363,6 +1532,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterStringSerializeDefaultImplementation(e, "/fake/outer/string", uriBuilderLocalVar.Path, requiredStringUuid, body);
|
||||
Events.ExecuteOnErrorFakeOuterStringSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1394,17 +1564,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetArrayOfEnumsDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetArrayOfEnums(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetArrayOfEnums(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetArrayOfEnums(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Array of Enums
|
||||
@ -1474,6 +1647,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetArrayOfEnumsDefaultImplementation(e, "/fake/array-of-enums", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetArrayOfEnums(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1521,18 +1695,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
private void OnErrorTestBodyWithFileSchemaDefaultImplementation(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithFileSchema(exception, pathFormat, path, fileSchemaTestClass);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithFileSchema(ref suppressDefaultLog, exception, pathFormat, path, fileSchemaTestClass);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
partial void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
partial void OnErrorTestBodyWithFileSchema(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
@ -1612,6 +1789,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchemaDefaultImplementation(e, "/fake/body-with-file-schema", uriBuilderLocalVar.Path, fileSchemaTestClass);
|
||||
Events.ExecuteOnErrorTestBodyWithFileSchema(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1666,19 +1844,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="query"></param>
|
||||
private void OnErrorTestBodyWithQueryParamsDefaultImplementation(Exception exception, string pathFormat, string path, User user, string query)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithQueryParams(exception, pathFormat, path, user, query);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithQueryParams(ref suppressDefaultLog, exception, pathFormat, path, user, query);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
partial void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query);
|
||||
partial void OnErrorTestBodyWithQueryParams(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string query);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -1766,6 +1947,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParamsDefaultImplementation(e, "/fake/body-with-query-params", uriBuilderLocalVar.Path, user, query);
|
||||
Events.ExecuteOnErrorTestBodyWithQueryParams(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1813,18 +1995,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClientModelDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClientModel(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClientModel(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClientModel(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test \"client\" model To test \"client\" model
|
||||
@ -1913,6 +2098,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClientModelDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClientModel(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2019,13 +2205,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="dateTime"></param>
|
||||
private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEndpointParameters(exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2043,7 +2232,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
partial void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -2203,6 +2392,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
Events.ExecuteOnErrorTestEndpointParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2291,13 +2481,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumFormString"></param>
|
||||
private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEnumParameters(exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2309,7 +2502,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
partial void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters To test enum parameters
|
||||
@ -2433,6 +2626,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
Events.ExecuteOnErrorTestEnumParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2484,13 +2678,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="int64Group"></param>
|
||||
private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestGroupParameters(exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2500,7 +2697,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
partial void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
|
||||
@ -2605,6 +2802,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
Events.ExecuteOnErrorTestGroupParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2652,18 +2850,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestInlineAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestInlineAdditionalProperties(exception, pathFormat, path, requestBody);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
partial void OnErrorTestInlineAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test inline additionalProperties
|
||||
@ -2743,6 +2944,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineAdditionalPropertiesDefaultImplementation(e, "/fake/inline-additionalProperties", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestInlineAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2797,19 +2999,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="param2"></param>
|
||||
private void OnErrorTestJsonFormDataDefaultImplementation(Exception exception, string pathFormat, string path, string param, string param2)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestJsonFormData(exception, pathFormat, path, param, param2);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestJsonFormData(ref suppressDefaultLog, exception, pathFormat, path, param, param2);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
partial void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2);
|
||||
partial void OnErrorTestJsonFormData(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
@ -2899,6 +3104,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestJsonFormDataDefaultImplementation(e, "/fake/jsonFormData", uriBuilderLocalVar.Path, param, param2);
|
||||
Events.ExecuteOnErrorTestJsonFormData(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2994,13 +3200,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string? requiredNullable, Option<string> notRequiredNotNullable, Option<string?> notRequiredNullable)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestQueryParameterCollectionFormat(exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -3013,7 +3222,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredNullable"></param>
|
||||
/// <param name="notRequiredNotNullable"></param>
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string? requiredNullable, Option<string> notRequiredNotNullable, Option<string?> notRequiredNullable);
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string? requiredNullable, Option<string> notRequiredNotNullable, Option<string?> notRequiredNullable);
|
||||
|
||||
/// <summary>
|
||||
/// To test the collection format in query parameters
|
||||
@ -3114,6 +3323,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -73,10 +73,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>>? OnTestClassname;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestClassname;
|
||||
|
||||
internal void ExecuteOnTestClassname(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClassname?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClassname(Exception exception)
|
||||
{
|
||||
OnErrorTestClassname?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -191,18 +201,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClassnameDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClassname(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClassname(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClassname(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case To test class name in snake case
|
||||
@ -306,6 +319,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClassnameDefaultImplementation(e, "/fake_classname_test", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClassname(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -271,90 +271,180 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnAddPet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorAddPet;
|
||||
|
||||
internal void ExecuteOnAddPet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnAddPet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorAddPet(Exception exception)
|
||||
{
|
||||
OnErrorAddPet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnDeletePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorDeletePet;
|
||||
|
||||
internal void ExecuteOnDeletePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeletePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeletePet(Exception exception)
|
||||
{
|
||||
OnErrorDeletePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>>? OnFindPetsByStatus;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFindPetsByStatus;
|
||||
|
||||
internal void ExecuteOnFindPetsByStatus(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByStatus?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByStatus(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByStatus?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>>? OnFindPetsByTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorFindPetsByTags;
|
||||
|
||||
internal void ExecuteOnFindPetsByTags(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByTags?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByTags(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Pet>>? OnGetPetById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetPetById;
|
||||
|
||||
internal void ExecuteOnGetPetById(ApiResponse<Pet> apiResponse)
|
||||
{
|
||||
OnGetPetById?.Invoke(this, new ApiResponseEventArgs<Pet>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetPetById(Exception exception)
|
||||
{
|
||||
OnErrorGetPetById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnUpdatePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorUpdatePet;
|
||||
|
||||
internal void ExecuteOnUpdatePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePet(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnUpdatePetWithForm;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorUpdatePetWithForm;
|
||||
|
||||
internal void ExecuteOnUpdatePetWithForm(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePetWithForm?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePetWithForm(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePetWithForm?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>>? OnUploadFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorUploadFile;
|
||||
|
||||
internal void ExecuteOnUploadFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>>? OnUploadFileWithRequiredFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorUploadFileWithRequiredFile;
|
||||
|
||||
internal void ExecuteOnUploadFileWithRequiredFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFileWithRequiredFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFileWithRequiredFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -469,18 +559,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorAddPetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorAddPet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorAddPet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorAddPet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@ -587,6 +680,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorAddPetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorAddPet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -637,19 +731,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiKey"></param>
|
||||
private void OnErrorDeletePetDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeletePet(exception, pathFormat, path, petId, apiKey);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeletePet(ref suppressDefaultLog, exception, pathFormat, path, petId, apiKey);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
partial void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
partial void OnErrorDeletePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@ -734,6 +831,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeletePetDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, apiKey);
|
||||
Events.ExecuteOnErrorDeletePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -781,18 +879,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorFindPetsByStatusDefaultImplementation(Exception exception, string pathFormat, string path, List<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByStatus(exception, pathFormat, path, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByStatus(ref suppressDefaultLog, exception, pathFormat, path, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List<string> status);
|
||||
partial void OnErrorFindPetsByStatus(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status Multiple status values can be provided with comma separated strings
|
||||
@ -901,6 +1002,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByStatusDefaultImplementation(e, "/pet/findByStatus", uriBuilderLocalVar.Path, status);
|
||||
Events.ExecuteOnErrorFindPetsByStatus(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -948,18 +1050,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="tags"></param>
|
||||
private void OnErrorFindPetsByTagsDefaultImplementation(Exception exception, string pathFormat, string path, List<string> tags)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByTags(exception, pathFormat, path, tags);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByTags(ref suppressDefaultLog, exception, pathFormat, path, tags);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="tags"></param>
|
||||
partial void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List<string> tags);
|
||||
partial void OnErrorFindPetsByTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> tags);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -1068,6 +1173,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByTagsDefaultImplementation(e, "/pet/findByTags", uriBuilderLocalVar.Path, tags);
|
||||
Events.ExecuteOnErrorFindPetsByTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1104,18 +1210,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="petId"></param>
|
||||
private void OnErrorGetPetByIdDefaultImplementation(Exception exception, string pathFormat, string path, long petId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetPetById(exception, pathFormat, path, petId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetPetById(ref suppressDefaultLog, exception, pathFormat, path, petId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
partial void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId);
|
||||
partial void OnErrorGetPetById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId);
|
||||
|
||||
/// <summary>
|
||||
/// Find pet by ID Returns a single pet
|
||||
@ -1203,6 +1312,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetPetByIdDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId);
|
||||
Events.ExecuteOnErrorGetPetById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1250,18 +1360,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorUpdatePetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorUpdatePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
@ -1368,6 +1481,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorUpdatePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1425,20 +1539,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorUpdatePetWithFormDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePetWithForm(exception, pathFormat, path, petId, name, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePetWithForm(ref suppressDefaultLog, exception, pathFormat, path, petId, name, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
partial void OnErrorUpdatePetWithForm(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
@ -1543,6 +1660,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetWithFormDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, name, status);
|
||||
Events.ExecuteOnErrorUpdatePetWithForm(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1600,20 +1718,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFile(exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFile(ref suppressDefaultLog, exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@ -1727,6 +1848,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileDefaultImplementation(e, "/pet/{petId}/uploadImage", uriBuilderLocalVar.Path, petId, file, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1784,20 +1906,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileWithRequiredFileDefaultImplementation(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFileWithRequiredFile(exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFileWithRequiredFile(ref suppressDefaultLog, exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFileWithRequiredFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image (required)
|
||||
@ -1911,6 +2036,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFileDefaultImplementation(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilderLocalVar.Path, requiredFile, petId, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFileWithRequiredFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -140,40 +140,80 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnDeleteOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorDeleteOrder;
|
||||
|
||||
internal void ExecuteOnDeleteOrder(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteOrder?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteOrder(Exception exception)
|
||||
{
|
||||
OnErrorDeleteOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Dictionary<string, int>>>? OnGetInventory;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetInventory;
|
||||
|
||||
internal void ExecuteOnGetInventory(ApiResponse<Dictionary<string, int>> apiResponse)
|
||||
{
|
||||
OnGetInventory?.Invoke(this, new ApiResponseEventArgs<Dictionary<string, int>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetInventory(Exception exception)
|
||||
{
|
||||
OnErrorGetInventory?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>>? OnGetOrderById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetOrderById;
|
||||
|
||||
internal void ExecuteOnGetOrderById(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnGetOrderById?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetOrderById(Exception exception)
|
||||
{
|
||||
OnErrorGetOrderById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>>? OnPlaceOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorPlaceOrder;
|
||||
|
||||
internal void ExecuteOnPlaceOrder(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnPlaceOrder?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorPlaceOrder(Exception exception)
|
||||
{
|
||||
OnErrorPlaceOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -288,18 +328,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorDeleteOrderDefaultImplementation(Exception exception, string pathFormat, string path, string orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteOrder(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteOrder(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId);
|
||||
partial void OnErrorDeleteOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -367,6 +410,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteOrderDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorDeleteOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -398,17 +442,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetInventoryDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetInventory(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetInventory(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetInventory(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetInventory(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
@ -490,6 +537,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetInventoryDefaultImplementation(e, "/store/inventory", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetInventory(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -526,18 +574,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorGetOrderByIdDefaultImplementation(Exception exception, string pathFormat, string path, long orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetOrderById(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetOrderById(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId);
|
||||
partial void OnErrorGetOrderById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
@ -613,6 +664,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetOrderByIdDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorGetOrderById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -660,18 +712,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order"></param>
|
||||
private void OnErrorPlaceOrderDefaultImplementation(Exception exception, string pathFormat, string path, Order order)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorPlaceOrder(exception, pathFormat, path, order);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorPlaceOrder(ref suppressDefaultLog, exception, pathFormat, path, order);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="order"></param>
|
||||
partial void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order);
|
||||
partial void OnErrorPlaceOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Order order);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@ -761,6 +816,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorPlaceOrderDefaultImplementation(e, "/store/order", uriBuilderLocalVar.Path, order);
|
||||
Events.ExecuteOnErrorPlaceOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -236,80 +236,160 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnCreateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorCreateUser;
|
||||
|
||||
internal void ExecuteOnCreateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUser(Exception exception)
|
||||
{
|
||||
OnErrorCreateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnCreateUsersWithArrayInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorCreateUsersWithArrayInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithArrayInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithArrayInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithArrayInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnCreateUsersWithListInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorCreateUsersWithListInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithListInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithListInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithListInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithListInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnDeleteUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorDeleteUser;
|
||||
|
||||
internal void ExecuteOnDeleteUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteUser(Exception exception)
|
||||
{
|
||||
OnErrorDeleteUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<User>>? OnGetUserByName;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorGetUserByName;
|
||||
|
||||
internal void ExecuteOnGetUserByName(ApiResponse<User> apiResponse)
|
||||
{
|
||||
OnGetUserByName?.Invoke(this, new ApiResponseEventArgs<User>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetUserByName(Exception exception)
|
||||
{
|
||||
OnErrorGetUserByName?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>>? OnLoginUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorLoginUser;
|
||||
|
||||
internal void ExecuteOnLoginUser(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnLoginUser?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLoginUser(Exception exception)
|
||||
{
|
||||
OnErrorLoginUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnLogoutUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorLogoutUser;
|
||||
|
||||
internal void ExecuteOnLogoutUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnLogoutUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLogoutUser(Exception exception)
|
||||
{
|
||||
OnErrorLogoutUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>>? OnUpdateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorUpdateUser;
|
||||
|
||||
internal void ExecuteOnUpdateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdateUser(Exception exception)
|
||||
{
|
||||
OnErrorUpdateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -424,18 +504,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUser(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUser(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user);
|
||||
partial void OnErrorCreateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user);
|
||||
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
@ -515,6 +598,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUserDefaultImplementation(e, "/user", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -562,18 +646,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithArrayInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithArrayInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithArrayInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithArrayInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -653,6 +740,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInputDefaultImplementation(e, "/user/createWithArray", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithArrayInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -700,18 +788,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithListInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithListInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithListInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithListInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -791,6 +882,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithListInputDefaultImplementation(e, "/user/createWithList", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithListInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -838,18 +930,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorDeleteUserDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteUser(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteUser(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorDeleteUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
@ -917,6 +1012,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorDeleteUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -964,18 +1060,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorGetUserByNameDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetUserByName(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetUserByName(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorGetUserByName(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@ -1053,6 +1152,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetUserByNameDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorGetUserByName(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1107,19 +1207,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLoginUser(exception, pathFormat, path, username, password);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password);
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -1205,6 +1308,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password);
|
||||
Events.ExecuteOnErrorLoginUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1236,17 +1340,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorLogoutUserDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLogoutUser(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLogoutUser(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorLogoutUser(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorLogoutUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -1307,6 +1414,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLogoutUserDefaultImplementation(e, "/user/logout", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorLogoutUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1361,19 +1469,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdateUser(exception, pathFormat, path, user, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username);
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
@ -1456,6 +1567,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -118,6 +118,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningToken.cs
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnCall123TestSpecialTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCall123TestSpecialTags;
|
||||
|
||||
internal void ExecuteOnCall123TestSpecialTags(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnCall123TestSpecialTags?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCall123TestSpecialTags(Exception exception)
|
||||
{
|
||||
OnErrorCall123TestSpecialTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -189,18 +199,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorCall123TestSpecialTagsDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCall123TestSpecialTags(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCall123TestSpecialTags(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorCall123TestSpecialTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags To test special tags and operation ID starting with number
|
||||
@ -289,6 +302,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCall123TestSpecialTagsDefaultImplementation(e, "/another-fake/dummy", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorCall123TestSpecialTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -113,30 +113,60 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<FooGetDefaultResponse>> OnFooGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFooGet;
|
||||
|
||||
internal void ExecuteOnFooGet(ApiResponse<FooGetDefaultResponse> apiResponse)
|
||||
{
|
||||
OnFooGet?.Invoke(this, new ApiResponseEventArgs<FooGetDefaultResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFooGet(Exception exception)
|
||||
{
|
||||
OnErrorFooGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnGetCountry;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetCountry;
|
||||
|
||||
internal void ExecuteOnGetCountry(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnGetCountry?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetCountry(Exception exception)
|
||||
{
|
||||
OnErrorGetCountry?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Guid>>> OnHello;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorHello;
|
||||
|
||||
internal void ExecuteOnHello(ApiResponse<List<Guid>> apiResponse)
|
||||
{
|
||||
OnHello?.Invoke(this, new ApiResponseEventArgs<List<Guid>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorHello(Exception exception)
|
||||
{
|
||||
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -235,17 +265,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFooGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFooGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFooGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFooGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFooGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -315,6 +348,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFooGetDefaultImplementation(e, "/foo", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFooGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -362,18 +396,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
private void OnErrorGetCountryDefaultImplementation(Exception exception, string pathFormat, string path, string country)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetCountry(exception, pathFormat, path, country);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetCountry(ref suppressDefaultLog, exception, pathFormat, path, country);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="country"></param>
|
||||
partial void OnErrorGetCountry(Exception exception, string pathFormat, string path, string country);
|
||||
partial void OnErrorGetCountry(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string country);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -459,6 +496,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetCountryDefaultImplementation(e, "/country", uriBuilderLocalVar.Path, country);
|
||||
Events.ExecuteOnErrorGetCountry(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -490,17 +528,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorHelloDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorHello(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorHello(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorHello(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorHello(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Hello Hello
|
||||
@ -570,6 +611,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorHelloDefaultImplementation(e, "/hello", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorHello(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -461,150 +461,300 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<HealthCheckResult>> OnFakeHealthGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeHealthGet;
|
||||
|
||||
internal void ExecuteOnFakeHealthGet(ApiResponse<HealthCheckResult> apiResponse)
|
||||
{
|
||||
OnFakeHealthGet?.Invoke(this, new ApiResponseEventArgs<HealthCheckResult>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeHealthGet(Exception exception)
|
||||
{
|
||||
OnErrorFakeHealthGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<bool>> OnFakeOuterBooleanSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterBooleanSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterBooleanSerialize(ApiResponse<bool> apiResponse)
|
||||
{
|
||||
OnFakeOuterBooleanSerialize?.Invoke(this, new ApiResponseEventArgs<bool>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterBooleanSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<OuterComposite>> OnFakeOuterCompositeSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterCompositeSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterCompositeSerialize(ApiResponse<OuterComposite> apiResponse)
|
||||
{
|
||||
OnFakeOuterCompositeSerialize?.Invoke(this, new ApiResponseEventArgs<OuterComposite>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterCompositeSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<decimal>> OnFakeOuterNumberSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterNumberSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterNumberSerialize(ApiResponse<decimal> apiResponse)
|
||||
{
|
||||
OnFakeOuterNumberSerialize?.Invoke(this, new ApiResponseEventArgs<decimal>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterNumberSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>> OnFakeOuterStringSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterStringSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterStringSerialize(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnFakeOuterStringSerialize?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterStringSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterStringSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<OuterEnum>>> OnGetArrayOfEnums;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetArrayOfEnums;
|
||||
|
||||
internal void ExecuteOnGetArrayOfEnums(ApiResponse<List<OuterEnum>> apiResponse)
|
||||
{
|
||||
OnGetArrayOfEnums?.Invoke(this, new ApiResponseEventArgs<List<OuterEnum>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetArrayOfEnums(Exception exception)
|
||||
{
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestBodyWithFileSchema;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestBodyWithFileSchema;
|
||||
|
||||
internal void ExecuteOnTestBodyWithFileSchema(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithFileSchema?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithFileSchema(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchema?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestBodyWithQueryParams;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestBodyWithQueryParams;
|
||||
|
||||
internal void ExecuteOnTestBodyWithQueryParams(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithQueryParams?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithQueryParams(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParams?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnTestClientModel;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestClientModel;
|
||||
|
||||
internal void ExecuteOnTestClientModel(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClientModel?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClientModel(Exception exception)
|
||||
{
|
||||
OnErrorTestClientModel?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestEndpointParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestEndpointParameters;
|
||||
|
||||
internal void ExecuteOnTestEndpointParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEndpointParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEndpointParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEndpointParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestEnumParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestEnumParameters;
|
||||
|
||||
internal void ExecuteOnTestEnumParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEnumParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEnumParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEnumParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestGroupParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestGroupParameters;
|
||||
|
||||
internal void ExecuteOnTestGroupParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestGroupParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestGroupParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestGroupParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestInlineAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestInlineAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestJsonFormData;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestJsonFormData;
|
||||
|
||||
internal void ExecuteOnTestJsonFormData(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestJsonFormData?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestJsonFormData(Exception exception)
|
||||
{
|
||||
OnErrorTestJsonFormData?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestQueryParameterCollectionFormat;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestQueryParameterCollectionFormat;
|
||||
|
||||
internal void ExecuteOnTestQueryParameterCollectionFormat(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestQueryParameterCollectionFormat?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestQueryParameterCollectionFormat(Exception exception)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormat?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -703,17 +853,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFakeHealthGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeHealthGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeHealthGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFakeHealthGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Health check endpoint
|
||||
@ -783,6 +936,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeHealthGetDefaultImplementation(e, "/fake/health", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFakeHealthGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -819,18 +973,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterBooleanSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<bool> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterBooleanSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterBooleanSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
partial void OnErrorFakeOuterBooleanSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer boolean types
|
||||
@ -918,6 +1075,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerializeDefaultImplementation(e, "/fake/outer/boolean", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterBooleanSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -965,18 +1123,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="outerComposite"></param>
|
||||
private void OnErrorFakeOuterCompositeSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterCompositeSerialize(exception, pathFormat, path, outerComposite);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterCompositeSerialize(ref suppressDefaultLog, exception, pathFormat, path, outerComposite);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="outerComposite"></param>
|
||||
partial void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
partial void OnErrorFakeOuterCompositeSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of object with outer number type
|
||||
@ -1066,6 +1227,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerializeDefaultImplementation(e, "/fake/outer/composite", uriBuilderLocalVar.Path, outerComposite);
|
||||
Events.ExecuteOnErrorFakeOuterCompositeSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1102,18 +1264,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterNumberSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<decimal> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterNumberSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterNumberSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
partial void OnErrorFakeOuterNumberSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer number types
|
||||
@ -1201,6 +1366,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerializeDefaultImplementation(e, "/fake/outer/number", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterNumberSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1251,19 +1417,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterStringSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterStringSerialize(exception, pathFormat, path, requiredStringUuid, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterStringSerialize(ref suppressDefaultLog, exception, pathFormat, path, requiredStringUuid, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
partial void OnErrorFakeOuterStringSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer string types
|
||||
@ -1361,6 +1530,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterStringSerializeDefaultImplementation(e, "/fake/outer/string", uriBuilderLocalVar.Path, requiredStringUuid, body);
|
||||
Events.ExecuteOnErrorFakeOuterStringSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1392,17 +1562,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetArrayOfEnumsDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetArrayOfEnums(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetArrayOfEnums(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetArrayOfEnums(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Array of Enums
|
||||
@ -1472,6 +1645,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetArrayOfEnumsDefaultImplementation(e, "/fake/array-of-enums", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetArrayOfEnums(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1519,18 +1693,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
private void OnErrorTestBodyWithFileSchemaDefaultImplementation(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithFileSchema(exception, pathFormat, path, fileSchemaTestClass);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithFileSchema(ref suppressDefaultLog, exception, pathFormat, path, fileSchemaTestClass);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
partial void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
partial void OnErrorTestBodyWithFileSchema(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
@ -1610,6 +1787,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchemaDefaultImplementation(e, "/fake/body-with-file-schema", uriBuilderLocalVar.Path, fileSchemaTestClass);
|
||||
Events.ExecuteOnErrorTestBodyWithFileSchema(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1664,19 +1842,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="query"></param>
|
||||
private void OnErrorTestBodyWithQueryParamsDefaultImplementation(Exception exception, string pathFormat, string path, User user, string query)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithQueryParams(exception, pathFormat, path, user, query);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithQueryParams(ref suppressDefaultLog, exception, pathFormat, path, user, query);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
partial void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query);
|
||||
partial void OnErrorTestBodyWithQueryParams(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string query);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -1764,6 +1945,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParamsDefaultImplementation(e, "/fake/body-with-query-params", uriBuilderLocalVar.Path, user, query);
|
||||
Events.ExecuteOnErrorTestBodyWithQueryParams(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1811,18 +1993,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClientModelDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClientModel(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClientModel(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClientModel(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test \"client\" model To test \"client\" model
|
||||
@ -1911,6 +2096,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClientModelDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClientModel(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2017,13 +2203,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="dateTime"></param>
|
||||
private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEndpointParameters(exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2041,7 +2230,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
partial void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -2201,6 +2390,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
Events.ExecuteOnErrorTestEndpointParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2289,13 +2479,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumFormString"></param>
|
||||
private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEnumParameters(exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2307,7 +2500,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
partial void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters To test enum parameters
|
||||
@ -2431,6 +2624,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
Events.ExecuteOnErrorTestEnumParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2482,13 +2676,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="int64Group"></param>
|
||||
private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestGroupParameters(exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2498,7 +2695,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
partial void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
|
||||
@ -2603,6 +2800,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
Events.ExecuteOnErrorTestGroupParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2650,18 +2848,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestInlineAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestInlineAdditionalProperties(exception, pathFormat, path, requestBody);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
partial void OnErrorTestInlineAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test inline additionalProperties
|
||||
@ -2741,6 +2942,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineAdditionalPropertiesDefaultImplementation(e, "/fake/inline-additionalProperties", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestInlineAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2795,19 +2997,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="param2"></param>
|
||||
private void OnErrorTestJsonFormDataDefaultImplementation(Exception exception, string pathFormat, string path, string param, string param2)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestJsonFormData(exception, pathFormat, path, param, param2);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestJsonFormData(ref suppressDefaultLog, exception, pathFormat, path, param, param2);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
partial void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2);
|
||||
partial void OnErrorTestJsonFormData(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
@ -2897,6 +3102,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestJsonFormDataDefaultImplementation(e, "/fake/jsonFormData", uriBuilderLocalVar.Path, param, param2);
|
||||
Events.ExecuteOnErrorTestJsonFormData(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2992,13 +3198,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestQueryParameterCollectionFormat(exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -3011,7 +3220,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredNullable"></param>
|
||||
/// <param name="notRequiredNotNullable"></param>
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable);
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable);
|
||||
|
||||
/// <summary>
|
||||
/// To test the collection format in query parameters
|
||||
@ -3112,6 +3321,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnTestClassname;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestClassname;
|
||||
|
||||
internal void ExecuteOnTestClassname(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClassname?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClassname(Exception exception)
|
||||
{
|
||||
OnErrorTestClassname?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -189,18 +199,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClassnameDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClassname(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClassname(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClassname(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case To test class name in snake case
|
||||
@ -304,6 +317,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClassnameDefaultImplementation(e, "/fake_classname_test", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClassname(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -269,90 +269,180 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnAddPet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorAddPet;
|
||||
|
||||
internal void ExecuteOnAddPet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnAddPet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorAddPet(Exception exception)
|
||||
{
|
||||
OnErrorAddPet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeletePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeletePet;
|
||||
|
||||
internal void ExecuteOnDeletePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeletePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeletePet(Exception exception)
|
||||
{
|
||||
OnErrorDeletePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>> OnFindPetsByStatus;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFindPetsByStatus;
|
||||
|
||||
internal void ExecuteOnFindPetsByStatus(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByStatus?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByStatus(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByStatus?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>> OnFindPetsByTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFindPetsByTags;
|
||||
|
||||
internal void ExecuteOnFindPetsByTags(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByTags?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByTags(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Pet>> OnGetPetById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetPetById;
|
||||
|
||||
internal void ExecuteOnGetPetById(ApiResponse<Pet> apiResponse)
|
||||
{
|
||||
OnGetPetById?.Invoke(this, new ApiResponseEventArgs<Pet>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetPetById(Exception exception)
|
||||
{
|
||||
OnErrorGetPetById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdatePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdatePet;
|
||||
|
||||
internal void ExecuteOnUpdatePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePet(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdatePetWithForm;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdatePetWithForm;
|
||||
|
||||
internal void ExecuteOnUpdatePetWithForm(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePetWithForm?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePetWithForm(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePetWithForm?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>> OnUploadFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUploadFile;
|
||||
|
||||
internal void ExecuteOnUploadFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>> OnUploadFileWithRequiredFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUploadFileWithRequiredFile;
|
||||
|
||||
internal void ExecuteOnUploadFileWithRequiredFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFileWithRequiredFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFileWithRequiredFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,18 +557,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorAddPetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorAddPet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorAddPet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorAddPet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@ -585,6 +678,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorAddPetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorAddPet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -635,19 +729,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiKey"></param>
|
||||
private void OnErrorDeletePetDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeletePet(exception, pathFormat, path, petId, apiKey);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeletePet(ref suppressDefaultLog, exception, pathFormat, path, petId, apiKey);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
partial void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
partial void OnErrorDeletePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@ -732,6 +829,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeletePetDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, apiKey);
|
||||
Events.ExecuteOnErrorDeletePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -779,18 +877,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorFindPetsByStatusDefaultImplementation(Exception exception, string pathFormat, string path, List<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByStatus(exception, pathFormat, path, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByStatus(ref suppressDefaultLog, exception, pathFormat, path, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List<string> status);
|
||||
partial void OnErrorFindPetsByStatus(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status Multiple status values can be provided with comma separated strings
|
||||
@ -899,6 +1000,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByStatusDefaultImplementation(e, "/pet/findByStatus", uriBuilderLocalVar.Path, status);
|
||||
Events.ExecuteOnErrorFindPetsByStatus(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -946,18 +1048,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="tags"></param>
|
||||
private void OnErrorFindPetsByTagsDefaultImplementation(Exception exception, string pathFormat, string path, List<string> tags)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByTags(exception, pathFormat, path, tags);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByTags(ref suppressDefaultLog, exception, pathFormat, path, tags);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="tags"></param>
|
||||
partial void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List<string> tags);
|
||||
partial void OnErrorFindPetsByTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> tags);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -1066,6 +1171,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByTagsDefaultImplementation(e, "/pet/findByTags", uriBuilderLocalVar.Path, tags);
|
||||
Events.ExecuteOnErrorFindPetsByTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1102,18 +1208,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="petId"></param>
|
||||
private void OnErrorGetPetByIdDefaultImplementation(Exception exception, string pathFormat, string path, long petId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetPetById(exception, pathFormat, path, petId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetPetById(ref suppressDefaultLog, exception, pathFormat, path, petId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
partial void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId);
|
||||
partial void OnErrorGetPetById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId);
|
||||
|
||||
/// <summary>
|
||||
/// Find pet by ID Returns a single pet
|
||||
@ -1201,6 +1310,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetPetByIdDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId);
|
||||
Events.ExecuteOnErrorGetPetById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1248,18 +1358,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorUpdatePetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorUpdatePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
@ -1366,6 +1479,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorUpdatePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1423,20 +1537,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorUpdatePetWithFormDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePetWithForm(exception, pathFormat, path, petId, name, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePetWithForm(ref suppressDefaultLog, exception, pathFormat, path, petId, name, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
partial void OnErrorUpdatePetWithForm(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
@ -1541,6 +1658,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetWithFormDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, name, status);
|
||||
Events.ExecuteOnErrorUpdatePetWithForm(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1598,20 +1716,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFile(exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFile(ref suppressDefaultLog, exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@ -1725,6 +1846,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileDefaultImplementation(e, "/pet/{petId}/uploadImage", uriBuilderLocalVar.Path, petId, file, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1782,20 +1904,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileWithRequiredFileDefaultImplementation(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFileWithRequiredFile(exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFileWithRequiredFile(ref suppressDefaultLog, exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFileWithRequiredFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image (required)
|
||||
@ -1909,6 +2034,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFileDefaultImplementation(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilderLocalVar.Path, requiredFile, petId, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFileWithRequiredFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -138,40 +138,80 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeleteOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeleteOrder;
|
||||
|
||||
internal void ExecuteOnDeleteOrder(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteOrder?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteOrder(Exception exception)
|
||||
{
|
||||
OnErrorDeleteOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Dictionary<string, int>>> OnGetInventory;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetInventory;
|
||||
|
||||
internal void ExecuteOnGetInventory(ApiResponse<Dictionary<string, int>> apiResponse)
|
||||
{
|
||||
OnGetInventory?.Invoke(this, new ApiResponseEventArgs<Dictionary<string, int>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetInventory(Exception exception)
|
||||
{
|
||||
OnErrorGetInventory?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>> OnGetOrderById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetOrderById;
|
||||
|
||||
internal void ExecuteOnGetOrderById(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnGetOrderById?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetOrderById(Exception exception)
|
||||
{
|
||||
OnErrorGetOrderById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>> OnPlaceOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorPlaceOrder;
|
||||
|
||||
internal void ExecuteOnPlaceOrder(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnPlaceOrder?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorPlaceOrder(Exception exception)
|
||||
{
|
||||
OnErrorPlaceOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -286,18 +326,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorDeleteOrderDefaultImplementation(Exception exception, string pathFormat, string path, string orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteOrder(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteOrder(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId);
|
||||
partial void OnErrorDeleteOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -365,6 +408,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteOrderDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorDeleteOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -396,17 +440,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetInventoryDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetInventory(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetInventory(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetInventory(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetInventory(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
@ -488,6 +535,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetInventoryDefaultImplementation(e, "/store/inventory", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetInventory(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -524,18 +572,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorGetOrderByIdDefaultImplementation(Exception exception, string pathFormat, string path, long orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetOrderById(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetOrderById(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId);
|
||||
partial void OnErrorGetOrderById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
@ -611,6 +662,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetOrderByIdDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorGetOrderById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -658,18 +710,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order"></param>
|
||||
private void OnErrorPlaceOrderDefaultImplementation(Exception exception, string pathFormat, string path, Order order)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorPlaceOrder(exception, pathFormat, path, order);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorPlaceOrder(ref suppressDefaultLog, exception, pathFormat, path, order);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="order"></param>
|
||||
partial void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order);
|
||||
partial void OnErrorPlaceOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Order order);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@ -759,6 +814,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorPlaceOrderDefaultImplementation(e, "/store/order", uriBuilderLocalVar.Path, order);
|
||||
Events.ExecuteOnErrorPlaceOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -234,80 +234,160 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUser;
|
||||
|
||||
internal void ExecuteOnCreateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUser(Exception exception)
|
||||
{
|
||||
OnErrorCreateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUsersWithArrayInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUsersWithArrayInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithArrayInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithArrayInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithArrayInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUsersWithListInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUsersWithListInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithListInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithListInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithListInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithListInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeleteUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeleteUser;
|
||||
|
||||
internal void ExecuteOnDeleteUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteUser(Exception exception)
|
||||
{
|
||||
OnErrorDeleteUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<User>> OnGetUserByName;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetUserByName;
|
||||
|
||||
internal void ExecuteOnGetUserByName(ApiResponse<User> apiResponse)
|
||||
{
|
||||
OnGetUserByName?.Invoke(this, new ApiResponseEventArgs<User>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetUserByName(Exception exception)
|
||||
{
|
||||
OnErrorGetUserByName?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>> OnLoginUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorLoginUser;
|
||||
|
||||
internal void ExecuteOnLoginUser(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnLoginUser?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLoginUser(Exception exception)
|
||||
{
|
||||
OnErrorLoginUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnLogoutUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorLogoutUser;
|
||||
|
||||
internal void ExecuteOnLogoutUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnLogoutUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLogoutUser(Exception exception)
|
||||
{
|
||||
OnErrorLogoutUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdateUser;
|
||||
|
||||
internal void ExecuteOnUpdateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdateUser(Exception exception)
|
||||
{
|
||||
OnErrorUpdateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -422,18 +502,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUser(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUser(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user);
|
||||
partial void OnErrorCreateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user);
|
||||
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
@ -513,6 +596,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUserDefaultImplementation(e, "/user", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -560,18 +644,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithArrayInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithArrayInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithArrayInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithArrayInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -651,6 +738,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInputDefaultImplementation(e, "/user/createWithArray", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithArrayInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -698,18 +786,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithListInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithListInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithListInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithListInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -789,6 +880,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithListInputDefaultImplementation(e, "/user/createWithList", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithListInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -836,18 +928,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorDeleteUserDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteUser(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteUser(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorDeleteUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
@ -915,6 +1010,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorDeleteUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -962,18 +1058,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorGetUserByNameDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetUserByName(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetUserByName(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorGetUserByName(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@ -1051,6 +1150,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetUserByNameDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorGetUserByName(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1105,19 +1205,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLoginUser(exception, pathFormat, path, username, password);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password);
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -1203,6 +1306,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password);
|
||||
Events.ExecuteOnErrorLoginUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1234,17 +1338,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorLogoutUserDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLogoutUser(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLogoutUser(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorLogoutUser(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorLogoutUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -1305,6 +1412,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLogoutUserDefaultImplementation(e, "/user/logout", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorLogoutUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1359,19 +1467,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdateUser(exception, pathFormat, path, user, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username);
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
@ -1454,6 +1565,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs
|
||||
src/Org.OpenAPITools/Client/Option.cs
|
||||
|
@ -73,10 +73,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Person>>? OnList;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorList;
|
||||
|
||||
internal void ExecuteOnList(ApiResponse<Person> apiResponse)
|
||||
{
|
||||
OnList?.Invoke(this, new ApiResponseEventArgs<Person>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorList(Exception exception)
|
||||
{
|
||||
OnErrorList?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -156,18 +166,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="personId"></param>
|
||||
private void OnErrorListDefaultImplementation(Exception exception, string pathFormat, string path, string personId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorList(exception, pathFormat, path, personId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorList(ref suppressDefaultLog, exception, pathFormat, path, personId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="personId"></param>
|
||||
partial void OnErrorList(Exception exception, string pathFormat, string path, string personId);
|
||||
partial void OnErrorList(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string personId);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -244,6 +257,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorListDefaultImplementation(e, "/person/display/{personId}", uriBuilderLocalVar.Path, personId);
|
||||
Events.ExecuteOnErrorList(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs
|
||||
src/Org.OpenAPITools/Client/Option.cs
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Fruit>>? OnRootGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorRootGet;
|
||||
|
||||
internal void ExecuteOnRootGet(ApiResponse<Fruit> apiResponse)
|
||||
{
|
||||
OnRootGet?.Invoke(this, new ApiResponseEventArgs<Fruit>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorRootGet(Exception exception)
|
||||
{
|
||||
OnErrorRootGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -138,17 +148,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorRootGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorRootGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorRootGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorRootGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorRootGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -218,6 +231,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorRootGetDefaultImplementation(e, "/", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorRootGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs
|
||||
src/Org.OpenAPITools/Client/Option.cs
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Fruit>>? OnRootGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorRootGet;
|
||||
|
||||
internal void ExecuteOnRootGet(ApiResponse<Fruit> apiResponse)
|
||||
{
|
||||
OnRootGet?.Invoke(this, new ApiResponseEventArgs<Fruit>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorRootGet(Exception exception)
|
||||
{
|
||||
OnErrorRootGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -138,17 +148,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorRootGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorRootGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorRootGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorRootGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorRootGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -218,6 +231,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorRootGetDefaultImplementation(e, "/", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorRootGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
@ -118,6 +118,7 @@ src/Org.OpenAPITools/Client/ClientUtils.cs
|
||||
src/Org.OpenAPITools/Client/CookieContainer.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
|
||||
src/Org.OpenAPITools/Client/ExceptionEventArgs.cs
|
||||
src/Org.OpenAPITools/Client/HostConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs
|
||||
src/Org.OpenAPITools/Client/HttpSigningToken.cs
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnCall123TestSpecialTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCall123TestSpecialTags;
|
||||
|
||||
internal void ExecuteOnCall123TestSpecialTags(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnCall123TestSpecialTags?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCall123TestSpecialTags(Exception exception)
|
||||
{
|
||||
OnErrorCall123TestSpecialTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -189,18 +199,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorCall123TestSpecialTagsDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCall123TestSpecialTags(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCall123TestSpecialTags(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorCall123TestSpecialTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags To test special tags and operation ID starting with number
|
||||
@ -288,6 +301,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCall123TestSpecialTagsDefaultImplementation(e, "/another-fake/dummy", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorCall123TestSpecialTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -113,30 +113,60 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<FooGetDefaultResponse>> OnFooGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFooGet;
|
||||
|
||||
internal void ExecuteOnFooGet(ApiResponse<FooGetDefaultResponse> apiResponse)
|
||||
{
|
||||
OnFooGet?.Invoke(this, new ApiResponseEventArgs<FooGetDefaultResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFooGet(Exception exception)
|
||||
{
|
||||
OnErrorFooGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnGetCountry;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetCountry;
|
||||
|
||||
internal void ExecuteOnGetCountry(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnGetCountry?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetCountry(Exception exception)
|
||||
{
|
||||
OnErrorGetCountry?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Guid>>> OnHello;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorHello;
|
||||
|
||||
internal void ExecuteOnHello(ApiResponse<List<Guid>> apiResponse)
|
||||
{
|
||||
OnHello?.Invoke(this, new ApiResponseEventArgs<List<Guid>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorHello(Exception exception)
|
||||
{
|
||||
OnErrorHello?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -235,17 +265,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFooGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFooGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFooGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFooGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFooGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -314,6 +347,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFooGetDefaultImplementation(e, "/foo", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFooGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -361,18 +395,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
private void OnErrorGetCountryDefaultImplementation(Exception exception, string pathFormat, string path, string country)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetCountry(exception, pathFormat, path, country);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetCountry(ref suppressDefaultLog, exception, pathFormat, path, country);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="country"></param>
|
||||
partial void OnErrorGetCountry(Exception exception, string pathFormat, string path, string country);
|
||||
partial void OnErrorGetCountry(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string country);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -458,6 +495,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetCountryDefaultImplementation(e, "/country", uriBuilderLocalVar.Path, country);
|
||||
Events.ExecuteOnErrorGetCountry(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -489,17 +527,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorHelloDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorHello(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorHello(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorHello(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorHello(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Hello Hello
|
||||
@ -568,6 +609,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorHelloDefaultImplementation(e, "/hello", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorHello(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -461,150 +461,300 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<HealthCheckResult>> OnFakeHealthGet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeHealthGet;
|
||||
|
||||
internal void ExecuteOnFakeHealthGet(ApiResponse<HealthCheckResult> apiResponse)
|
||||
{
|
||||
OnFakeHealthGet?.Invoke(this, new ApiResponseEventArgs<HealthCheckResult>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeHealthGet(Exception exception)
|
||||
{
|
||||
OnErrorFakeHealthGet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<bool>> OnFakeOuterBooleanSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterBooleanSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterBooleanSerialize(ApiResponse<bool> apiResponse)
|
||||
{
|
||||
OnFakeOuterBooleanSerialize?.Invoke(this, new ApiResponseEventArgs<bool>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterBooleanSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<OuterComposite>> OnFakeOuterCompositeSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterCompositeSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterCompositeSerialize(ApiResponse<OuterComposite> apiResponse)
|
||||
{
|
||||
OnFakeOuterCompositeSerialize?.Invoke(this, new ApiResponseEventArgs<OuterComposite>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterCompositeSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<decimal>> OnFakeOuterNumberSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterNumberSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterNumberSerialize(ApiResponse<decimal> apiResponse)
|
||||
{
|
||||
OnFakeOuterNumberSerialize?.Invoke(this, new ApiResponseEventArgs<decimal>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterNumberSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>> OnFakeOuterStringSerialize;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFakeOuterStringSerialize;
|
||||
|
||||
internal void ExecuteOnFakeOuterStringSerialize(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnFakeOuterStringSerialize?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFakeOuterStringSerialize(Exception exception)
|
||||
{
|
||||
OnErrorFakeOuterStringSerialize?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<OuterEnum>>> OnGetArrayOfEnums;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetArrayOfEnums;
|
||||
|
||||
internal void ExecuteOnGetArrayOfEnums(ApiResponse<List<OuterEnum>> apiResponse)
|
||||
{
|
||||
OnGetArrayOfEnums?.Invoke(this, new ApiResponseEventArgs<List<OuterEnum>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetArrayOfEnums(Exception exception)
|
||||
{
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestBodyWithFileSchema;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestBodyWithFileSchema;
|
||||
|
||||
internal void ExecuteOnTestBodyWithFileSchema(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithFileSchema?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithFileSchema(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchema?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestBodyWithQueryParams;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestBodyWithQueryParams;
|
||||
|
||||
internal void ExecuteOnTestBodyWithQueryParams(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestBodyWithQueryParams?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestBodyWithQueryParams(Exception exception)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParams?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnTestClientModel;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestClientModel;
|
||||
|
||||
internal void ExecuteOnTestClientModel(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClientModel?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClientModel(Exception exception)
|
||||
{
|
||||
OnErrorTestClientModel?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestEndpointParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestEndpointParameters;
|
||||
|
||||
internal void ExecuteOnTestEndpointParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEndpointParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEndpointParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEndpointParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestEnumParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestEnumParameters;
|
||||
|
||||
internal void ExecuteOnTestEnumParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestEnumParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestEnumParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestEnumParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestGroupParameters;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestGroupParameters;
|
||||
|
||||
internal void ExecuteOnTestGroupParameters(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestGroupParameters?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestGroupParameters(Exception exception)
|
||||
{
|
||||
OnErrorTestGroupParameters?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestInlineAdditionalProperties;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestInlineAdditionalProperties;
|
||||
|
||||
internal void ExecuteOnTestInlineAdditionalProperties(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestInlineAdditionalProperties?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestInlineAdditionalProperties(Exception exception)
|
||||
{
|
||||
OnErrorTestInlineAdditionalProperties?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestJsonFormData;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestJsonFormData;
|
||||
|
||||
internal void ExecuteOnTestJsonFormData(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestJsonFormData?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestJsonFormData(Exception exception)
|
||||
{
|
||||
OnErrorTestJsonFormData?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnTestQueryParameterCollectionFormat;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestQueryParameterCollectionFormat;
|
||||
|
||||
internal void ExecuteOnTestQueryParameterCollectionFormat(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnTestQueryParameterCollectionFormat?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestQueryParameterCollectionFormat(Exception exception)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormat?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -703,17 +853,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorFakeHealthGetDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeHealthGet(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeHealthGet(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorFakeHealthGet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Health check endpoint
|
||||
@ -782,6 +935,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeHealthGetDefaultImplementation(e, "/fake/health", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorFakeHealthGet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -818,18 +972,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterBooleanSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<bool> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterBooleanSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterBooleanSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
partial void OnErrorFakeOuterBooleanSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<bool> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer boolean types
|
||||
@ -916,6 +1073,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterBooleanSerializeDefaultImplementation(e, "/fake/outer/boolean", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterBooleanSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -963,18 +1121,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="outerComposite"></param>
|
||||
private void OnErrorFakeOuterCompositeSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterCompositeSerialize(exception, pathFormat, path, outerComposite);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterCompositeSerialize(ref suppressDefaultLog, exception, pathFormat, path, outerComposite);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="outerComposite"></param>
|
||||
partial void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
partial void OnErrorFakeOuterCompositeSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<OuterComposite> outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of object with outer number type
|
||||
@ -1063,6 +1224,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterCompositeSerializeDefaultImplementation(e, "/fake/outer/composite", uriBuilderLocalVar.Path, outerComposite);
|
||||
Events.ExecuteOnErrorFakeOuterCompositeSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1099,18 +1261,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterNumberSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Option<decimal> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterNumberSerialize(exception, pathFormat, path, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterNumberSerialize(ref suppressDefaultLog, exception, pathFormat, path, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
partial void OnErrorFakeOuterNumberSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<decimal> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer number types
|
||||
@ -1197,6 +1362,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterNumberSerializeDefaultImplementation(e, "/fake/outer/number", uriBuilderLocalVar.Path, body);
|
||||
Events.ExecuteOnErrorFakeOuterNumberSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1247,19 +1413,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="body"></param>
|
||||
private void OnErrorFakeOuterStringSerializeDefaultImplementation(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFakeOuterStringSerialize(exception, pathFormat, path, requiredStringUuid, body);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFakeOuterStringSerialize(ref suppressDefaultLog, exception, pathFormat, path, requiredStringUuid, body);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
partial void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
partial void OnErrorFakeOuterStringSerialize(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Guid requiredStringUuid, Option<string> body);
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization of outer string types
|
||||
@ -1356,6 +1525,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFakeOuterStringSerializeDefaultImplementation(e, "/fake/outer/string", uriBuilderLocalVar.Path, requiredStringUuid, body);
|
||||
Events.ExecuteOnErrorFakeOuterStringSerialize(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1387,17 +1557,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetArrayOfEnumsDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetArrayOfEnums(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetArrayOfEnums(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetArrayOfEnums(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Array of Enums
|
||||
@ -1466,6 +1639,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetArrayOfEnumsDefaultImplementation(e, "/fake/array-of-enums", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetArrayOfEnums(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1513,18 +1687,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
private void OnErrorTestBodyWithFileSchemaDefaultImplementation(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithFileSchema(exception, pathFormat, path, fileSchemaTestClass);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithFileSchema(ref suppressDefaultLog, exception, pathFormat, path, fileSchemaTestClass);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
partial void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
partial void OnErrorTestBodyWithFileSchema(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
@ -1604,6 +1781,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithFileSchemaDefaultImplementation(e, "/fake/body-with-file-schema", uriBuilderLocalVar.Path, fileSchemaTestClass);
|
||||
Events.ExecuteOnErrorTestBodyWithFileSchema(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1658,19 +1836,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="query"></param>
|
||||
private void OnErrorTestBodyWithQueryParamsDefaultImplementation(Exception exception, string pathFormat, string path, User user, string query)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestBodyWithQueryParams(exception, pathFormat, path, user, query);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestBodyWithQueryParams(ref suppressDefaultLog, exception, pathFormat, path, user, query);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
partial void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query);
|
||||
partial void OnErrorTestBodyWithQueryParams(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string query);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -1758,6 +1939,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestBodyWithQueryParamsDefaultImplementation(e, "/fake/body-with-query-params", uriBuilderLocalVar.Path, user, query);
|
||||
Events.ExecuteOnErrorTestBodyWithQueryParams(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1805,18 +1987,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClientModelDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClientModel(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClientModel(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClientModel(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test \"client\" model To test \"client\" model
|
||||
@ -1904,6 +2089,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClientModelDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClientModel(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2010,13 +2196,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="dateTime"></param>
|
||||
private void OnErrorTestEndpointParametersDefaultImplementation(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEndpointParameters(exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEndpointParameters(ref suppressDefaultLog, exception, pathFormat, path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2034,7 +2223,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
partial void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
partial void OnErrorTestEndpointParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, Option<DateTime> date, Option<System.IO.Stream> binary, Option<float> varFloat, Option<int> integer, Option<int> int32, Option<long> int64, Option<string> varString, Option<string> password, Option<string> callback, Option<DateTime> dateTime);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -2194,6 +2383,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEndpointParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
Events.ExecuteOnErrorTestEndpointParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2282,13 +2472,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumFormString"></param>
|
||||
private void OnErrorTestEnumParametersDefaultImplementation(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestEnumParameters(exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestEnumParameters(ref suppressDefaultLog, exception, pathFormat, path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2300,7 +2493,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
partial void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
partial void OnErrorTestEnumParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Option<List<string>> enumHeaderStringArray, Option<List<string>> enumQueryStringArray, Option<double> enumQueryDouble, Option<int> enumQueryInteger, Option<List<string>> enumFormStringArray, Option<string> enumHeaderString, Option<string> enumQueryString, Option<string> enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters To test enum parameters
|
||||
@ -2424,6 +2617,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestEnumParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
Events.ExecuteOnErrorTestEnumParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2475,13 +2669,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="int64Group"></param>
|
||||
private void OnErrorTestGroupParametersDefaultImplementation(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestGroupParameters(exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestGroupParameters(ref suppressDefaultLog, exception, pathFormat, path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -2491,7 +2688,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
partial void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
partial void OnErrorTestGroupParameters(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, Option<bool> booleanGroup, Option<int> stringGroup, Option<long> int64Group);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional)
|
||||
@ -2595,6 +2792,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestGroupParametersDefaultImplementation(e, "/fake", uriBuilderLocalVar.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
Events.ExecuteOnErrorTestGroupParameters(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2642,18 +2840,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestInlineAdditionalPropertiesDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestInlineAdditionalProperties(exception, pathFormat, path, requestBody);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestInlineAdditionalProperties(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
partial void OnErrorTestInlineAdditionalProperties(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test inline additionalProperties
|
||||
@ -2733,6 +2934,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestInlineAdditionalPropertiesDefaultImplementation(e, "/fake/inline-additionalProperties", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestInlineAdditionalProperties(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2787,19 +2989,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="param2"></param>
|
||||
private void OnErrorTestJsonFormDataDefaultImplementation(Exception exception, string pathFormat, string path, string param, string param2)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestJsonFormData(exception, pathFormat, path, param, param2);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestJsonFormData(ref suppressDefaultLog, exception, pathFormat, path, param, param2);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
partial void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2);
|
||||
partial void OnErrorTestJsonFormData(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string param, string param2);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
@ -2889,6 +3094,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestJsonFormDataDefaultImplementation(e, "/fake/jsonFormData", uriBuilderLocalVar.Path, param, param2);
|
||||
Events.ExecuteOnErrorTestJsonFormData(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2984,13 +3190,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
private void OnErrorTestQueryParameterCollectionFormatDefaultImplementation(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestQueryParameterCollectionFormat(exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestQueryParameterCollectionFormat(ref suppressDefaultLog, exception, pathFormat, path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
@ -3003,7 +3212,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredNullable"></param>
|
||||
/// <param name="notRequiredNotNullable"></param>
|
||||
/// <param name="notRequiredNullable"></param>
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable);
|
||||
partial void OnErrorTestQueryParameterCollectionFormat(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, string requiredNotNullable, string requiredNullable, Option<string> notRequiredNotNullable, Option<string> notRequiredNullable);
|
||||
|
||||
/// <summary>
|
||||
/// To test the collection format in query parameters
|
||||
@ -3103,6 +3312,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestQueryParameterCollectionFormatDefaultImplementation(e, "/fake/test-query-parameters", uriBuilderLocalVar.Path, pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
|
||||
Events.ExecuteOnErrorTestQueryParameterCollectionFormat(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -71,10 +71,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ModelClient>> OnTestClassname;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestClassname;
|
||||
|
||||
internal void ExecuteOnTestClassname(ApiResponse<ModelClient> apiResponse)
|
||||
{
|
||||
OnTestClassname?.Invoke(this, new ApiResponseEventArgs<ModelClient>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestClassname(Exception exception)
|
||||
{
|
||||
OnErrorTestClassname?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -189,18 +199,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient"></param>
|
||||
private void OnErrorTestClassnameDefaultImplementation(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorTestClassname(exception, pathFormat, path, modelClient);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestClassname(ref suppressDefaultLog, exception, pathFormat, path, modelClient);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
partial void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
partial void OnErrorTestClassname(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, ModelClient modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case To test class name in snake case
|
||||
@ -303,6 +316,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestClassnameDefaultImplementation(e, "/fake_classname_test", uriBuilderLocalVar.Path, modelClient);
|
||||
Events.ExecuteOnErrorTestClassname(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -269,90 +269,180 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnAddPet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorAddPet;
|
||||
|
||||
internal void ExecuteOnAddPet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnAddPet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorAddPet(Exception exception)
|
||||
{
|
||||
OnErrorAddPet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeletePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeletePet;
|
||||
|
||||
internal void ExecuteOnDeletePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeletePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeletePet(Exception exception)
|
||||
{
|
||||
OnErrorDeletePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>> OnFindPetsByStatus;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFindPetsByStatus;
|
||||
|
||||
internal void ExecuteOnFindPetsByStatus(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByStatus?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByStatus(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByStatus?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<List<Pet>>> OnFindPetsByTags;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorFindPetsByTags;
|
||||
|
||||
internal void ExecuteOnFindPetsByTags(ApiResponse<List<Pet>> apiResponse)
|
||||
{
|
||||
OnFindPetsByTags?.Invoke(this, new ApiResponseEventArgs<List<Pet>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorFindPetsByTags(Exception exception)
|
||||
{
|
||||
OnErrorFindPetsByTags?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Pet>> OnGetPetById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetPetById;
|
||||
|
||||
internal void ExecuteOnGetPetById(ApiResponse<Pet> apiResponse)
|
||||
{
|
||||
OnGetPetById?.Invoke(this, new ApiResponseEventArgs<Pet>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetPetById(Exception exception)
|
||||
{
|
||||
OnErrorGetPetById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdatePet;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdatePet;
|
||||
|
||||
internal void ExecuteOnUpdatePet(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePet?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePet(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePet?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdatePetWithForm;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdatePetWithForm;
|
||||
|
||||
internal void ExecuteOnUpdatePetWithForm(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdatePetWithForm?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdatePetWithForm(Exception exception)
|
||||
{
|
||||
OnErrorUpdatePetWithForm?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>> OnUploadFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUploadFile;
|
||||
|
||||
internal void ExecuteOnUploadFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<ApiResponse>> OnUploadFileWithRequiredFile;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUploadFileWithRequiredFile;
|
||||
|
||||
internal void ExecuteOnUploadFileWithRequiredFile(ApiResponse<ApiResponse> apiResponse)
|
||||
{
|
||||
OnUploadFileWithRequiredFile?.Invoke(this, new ApiResponseEventArgs<ApiResponse>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUploadFileWithRequiredFile(Exception exception)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFile?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,18 +557,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorAddPetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorAddPet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorAddPet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorAddPet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@ -585,6 +678,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorAddPetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorAddPet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -635,19 +729,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiKey"></param>
|
||||
private void OnErrorDeletePetDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeletePet(exception, pathFormat, path, petId, apiKey);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeletePet(ref suppressDefaultLog, exception, pathFormat, path, petId, apiKey);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
partial void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
partial void OnErrorDeletePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> apiKey);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@ -731,6 +828,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeletePetDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, apiKey);
|
||||
Events.ExecuteOnErrorDeletePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -778,18 +876,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorFindPetsByStatusDefaultImplementation(Exception exception, string pathFormat, string path, List<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByStatus(exception, pathFormat, path, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByStatus(ref suppressDefaultLog, exception, pathFormat, path, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List<string> status);
|
||||
partial void OnErrorFindPetsByStatus(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status Multiple status values can be provided with comma separated strings
|
||||
@ -897,6 +998,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByStatusDefaultImplementation(e, "/pet/findByStatus", uriBuilderLocalVar.Path, status);
|
||||
Events.ExecuteOnErrorFindPetsByStatus(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -944,18 +1046,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="tags"></param>
|
||||
private void OnErrorFindPetsByTagsDefaultImplementation(Exception exception, string pathFormat, string path, List<string> tags)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorFindPetsByTags(exception, pathFormat, path, tags);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorFindPetsByTags(ref suppressDefaultLog, exception, pathFormat, path, tags);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="tags"></param>
|
||||
partial void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List<string> tags);
|
||||
partial void OnErrorFindPetsByTags(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<string> tags);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -1063,6 +1168,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorFindPetsByTagsDefaultImplementation(e, "/pet/findByTags", uriBuilderLocalVar.Path, tags);
|
||||
Events.ExecuteOnErrorFindPetsByTags(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1099,18 +1205,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="petId"></param>
|
||||
private void OnErrorGetPetByIdDefaultImplementation(Exception exception, string pathFormat, string path, long petId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetPetById(exception, pathFormat, path, petId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetPetById(ref suppressDefaultLog, exception, pathFormat, path, petId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
partial void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId);
|
||||
partial void OnErrorGetPetById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId);
|
||||
|
||||
/// <summary>
|
||||
/// Find pet by ID Returns a single pet
|
||||
@ -1197,6 +1306,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetPetByIdDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId);
|
||||
Events.ExecuteOnErrorGetPetById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1244,18 +1354,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet"></param>
|
||||
private void OnErrorUpdatePetDefaultImplementation(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePet(exception, pathFormat, path, pet);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePet(ref suppressDefaultLog, exception, pathFormat, path, pet);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
partial void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet);
|
||||
partial void OnErrorUpdatePet(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Pet pet);
|
||||
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
@ -1362,6 +1475,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetDefaultImplementation(e, "/pet", uriBuilderLocalVar.Path, pet);
|
||||
Events.ExecuteOnErrorUpdatePet(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1419,20 +1533,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status"></param>
|
||||
private void OnErrorUpdatePetWithFormDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdatePetWithForm(exception, pathFormat, path, petId, name, status);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdatePetWithForm(ref suppressDefaultLog, exception, pathFormat, path, petId, name, status);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
partial void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
partial void OnErrorUpdatePetWithForm(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<string> name, Option<string> status);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
@ -1537,6 +1654,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdatePetWithFormDefaultImplementation(e, "/pet/{petId}", uriBuilderLocalVar.Path, petId, name, status);
|
||||
Events.ExecuteOnErrorUpdatePetWithForm(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1594,20 +1712,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileDefaultImplementation(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFile(exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFile(ref suppressDefaultLog, exception, pathFormat, path, petId, file, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long petId, Option<System.IO.Stream> file, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image
|
||||
@ -1720,6 +1841,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileDefaultImplementation(e, "/pet/{petId}/uploadImage", uriBuilderLocalVar.Path, petId, file, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1777,20 +1899,23 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata"></param>
|
||||
private void OnErrorUploadFileWithRequiredFileDefaultImplementation(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUploadFileWithRequiredFile(exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUploadFileWithRequiredFile(ref suppressDefaultLog, exception, pathFormat, path, requiredFile, petId, additionalMetadata);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
partial void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
partial void OnErrorUploadFileWithRequiredFile(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, Option<string> additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image (required)
|
||||
@ -1903,6 +2028,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUploadFileWithRequiredFileDefaultImplementation(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilderLocalVar.Path, requiredFile, petId, additionalMetadata);
|
||||
Events.ExecuteOnErrorUploadFileWithRequiredFile(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -138,40 +138,80 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeleteOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeleteOrder;
|
||||
|
||||
internal void ExecuteOnDeleteOrder(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteOrder?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteOrder(Exception exception)
|
||||
{
|
||||
OnErrorDeleteOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Dictionary<string, int>>> OnGetInventory;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetInventory;
|
||||
|
||||
internal void ExecuteOnGetInventory(ApiResponse<Dictionary<string, int>> apiResponse)
|
||||
{
|
||||
OnGetInventory?.Invoke(this, new ApiResponseEventArgs<Dictionary<string, int>>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetInventory(Exception exception)
|
||||
{
|
||||
OnErrorGetInventory?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>> OnGetOrderById;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetOrderById;
|
||||
|
||||
internal void ExecuteOnGetOrderById(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnGetOrderById?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetOrderById(Exception exception)
|
||||
{
|
||||
OnErrorGetOrderById?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<Order>> OnPlaceOrder;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorPlaceOrder;
|
||||
|
||||
internal void ExecuteOnPlaceOrder(ApiResponse<Order> apiResponse)
|
||||
{
|
||||
OnPlaceOrder?.Invoke(this, new ApiResponseEventArgs<Order>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorPlaceOrder(Exception exception)
|
||||
{
|
||||
OnErrorPlaceOrder?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -286,18 +326,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorDeleteOrderDefaultImplementation(Exception exception, string pathFormat, string path, string orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteOrder(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteOrder(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId);
|
||||
partial void OnErrorDeleteOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -364,6 +407,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteOrderDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorDeleteOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -395,17 +439,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorGetInventoryDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetInventory(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetInventory(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorGetInventory(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorGetInventory(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
@ -486,6 +533,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetInventoryDefaultImplementation(e, "/store/inventory", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorGetInventory(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -522,18 +570,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId"></param>
|
||||
private void OnErrorGetOrderByIdDefaultImplementation(Exception exception, string pathFormat, string path, long orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetOrderById(exception, pathFormat, path, orderId);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetOrderById(ref suppressDefaultLog, exception, pathFormat, path, orderId);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
partial void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId);
|
||||
partial void OnErrorGetOrderById(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, long orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
@ -608,6 +659,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetOrderByIdDefaultImplementation(e, "/store/order/{order_id}", uriBuilderLocalVar.Path, orderId);
|
||||
Events.ExecuteOnErrorGetOrderById(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -655,18 +707,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order"></param>
|
||||
private void OnErrorPlaceOrderDefaultImplementation(Exception exception, string pathFormat, string path, Order order)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorPlaceOrder(exception, pathFormat, path, order);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorPlaceOrder(ref suppressDefaultLog, exception, pathFormat, path, order);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="order"></param>
|
||||
partial void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order);
|
||||
partial void OnErrorPlaceOrder(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Order order);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@ -755,6 +810,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorPlaceOrderDefaultImplementation(e, "/store/order", uriBuilderLocalVar.Path, order);
|
||||
Events.ExecuteOnErrorPlaceOrder(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -234,80 +234,160 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUser;
|
||||
|
||||
internal void ExecuteOnCreateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUser(Exception exception)
|
||||
{
|
||||
OnErrorCreateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUsersWithArrayInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUsersWithArrayInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithArrayInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithArrayInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithArrayInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnCreateUsersWithListInput;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorCreateUsersWithListInput;
|
||||
|
||||
internal void ExecuteOnCreateUsersWithListInput(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnCreateUsersWithListInput?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorCreateUsersWithListInput(Exception exception)
|
||||
{
|
||||
OnErrorCreateUsersWithListInput?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnDeleteUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorDeleteUser;
|
||||
|
||||
internal void ExecuteOnDeleteUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnDeleteUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorDeleteUser(Exception exception)
|
||||
{
|
||||
OnErrorDeleteUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<User>> OnGetUserByName;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorGetUserByName;
|
||||
|
||||
internal void ExecuteOnGetUserByName(ApiResponse<User> apiResponse)
|
||||
{
|
||||
OnGetUserByName?.Invoke(this, new ApiResponseEventArgs<User>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorGetUserByName(Exception exception)
|
||||
{
|
||||
OnErrorGetUserByName?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<string>> OnLoginUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorLoginUser;
|
||||
|
||||
internal void ExecuteOnLoginUser(ApiResponse<string> apiResponse)
|
||||
{
|
||||
OnLoginUser?.Invoke(this, new ApiResponseEventArgs<string>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLoginUser(Exception exception)
|
||||
{
|
||||
OnErrorLoginUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnLogoutUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorLogoutUser;
|
||||
|
||||
internal void ExecuteOnLogoutUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnLogoutUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorLogoutUser(Exception exception)
|
||||
{
|
||||
OnErrorLogoutUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs<object>> OnUpdateUser;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorUpdateUser;
|
||||
|
||||
internal void ExecuteOnUpdateUser(ApiResponse<object> apiResponse)
|
||||
{
|
||||
OnUpdateUser?.Invoke(this, new ApiResponseEventArgs<object>(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorUpdateUser(Exception exception)
|
||||
{
|
||||
OnErrorUpdateUser?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -422,18 +502,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUser(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUser(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user);
|
||||
partial void OnErrorCreateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user);
|
||||
|
||||
/// <summary>
|
||||
/// Create user This can only be done by the logged in user.
|
||||
@ -513,6 +596,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUserDefaultImplementation(e, "/user", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -560,18 +644,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithArrayInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithArrayInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithArrayInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithArrayInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -651,6 +738,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithArrayInputDefaultImplementation(e, "/user/createWithArray", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithArrayInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -698,18 +786,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user"></param>
|
||||
private void OnErrorCreateUsersWithListInputDefaultImplementation(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorCreateUsersWithListInput(exception, pathFormat, path, user);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorCreateUsersWithListInput(ref suppressDefaultLog, exception, pathFormat, path, user);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
partial void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List<User> user);
|
||||
partial void OnErrorCreateUsersWithListInput(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, List<User> user);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -789,6 +880,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorCreateUsersWithListInputDefaultImplementation(e, "/user/createWithList", uriBuilderLocalVar.Path, user);
|
||||
Events.ExecuteOnErrorCreateUsersWithListInput(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -836,18 +928,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorDeleteUserDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorDeleteUser(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorDeleteUser(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorDeleteUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user This can only be done by the logged in user.
|
||||
@ -914,6 +1009,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorDeleteUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorDeleteUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -961,18 +1057,21 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorGetUserByNameDefaultImplementation(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorGetUserByName(exception, pathFormat, path, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorGetUserByName(ref suppressDefaultLog, exception, pathFormat, path, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username);
|
||||
partial void OnErrorGetUserByName(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@ -1049,6 +1148,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorGetUserByNameDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, username);
|
||||
Events.ExecuteOnErrorGetUserByName(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1103,19 +1203,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
private void OnErrorLoginUserDefaultImplementation(Exception exception, string pathFormat, string path, string username, string password)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLoginUser(exception, pathFormat, path, username, password);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLoginUser(ref suppressDefaultLog, exception, pathFormat, path, username, password);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
partial void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password);
|
||||
partial void OnErrorLoginUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, string username, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@ -1200,6 +1303,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLoginUserDefaultImplementation(e, "/user/login", uriBuilderLocalVar.Path, username, password);
|
||||
Events.ExecuteOnErrorLoginUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1231,17 +1335,20 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
private void OnErrorLogoutUserDefaultImplementation(Exception exception, string pathFormat, string path)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorLogoutUser(exception, pathFormat, path);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorLogoutUser(ref suppressDefaultLog, exception, pathFormat, path);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
partial void OnErrorLogoutUser(Exception exception, string pathFormat, string path);
|
||||
partial void OnErrorLogoutUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@ -1301,6 +1408,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorLogoutUserDefaultImplementation(e, "/user/logout", uriBuilderLocalVar.Path);
|
||||
Events.ExecuteOnErrorLogoutUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1355,19 +1463,22 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username"></param>
|
||||
private void OnErrorUpdateUserDefaultImplementation(Exception exception, string pathFormat, string path, User user, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
OnErrorUpdateUser(exception, pathFormat, path, user, username);
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorUpdateUser(ref suppressDefaultLog, exception, pathFormat, path, user, username);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
partial void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username);
|
||||
partial void OnErrorUpdateUser(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, User user, string username);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user This can only be done by the logged in user.
|
||||
@ -1450,6 +1561,7 @@ namespace Org.OpenAPITools.Api
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorUpdateUserDefaultImplementation(e, "/user/{username}", uriBuilderLocalVar.Path, user, username);
|
||||
Events.ExecuteOnErrorUpdateUser(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Org.OpenAPITools.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Useful for tracking server health
|
||||
/// </summary>
|
||||
public class ExceptionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApiResponse
|
||||
/// </summary>
|
||||
public Exception Exception { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ExcepetionEventArgs
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public ExceptionEventArgs(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user