Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ namespace {{packageName}}.Client
/// Allows for extending request processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
partial void InterceptRequest(IRestRequest request);
public virtual void InterceptRequest(IRestRequest request) { }

/// <summary>
/// Allows for extending response processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
/// <param name="response">The RestSharp response object</param>
partial void InterceptResponse(IRestRequest request, IRestResponse response);
public virtual void InterceptResponse(IRestRequest request, IRestResponse response) { }

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ namespace {{packageName}}.Client
return request;
}

partial void InterceptRequest(HttpRequestMessage req);
partial void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response);
public virtual void InterceptRequest(HttpRequestMessage req) { }
public virtual void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response) { }

private async Task<ApiResponse<T>> ToApiResponse<T>(HttpResponseMessage response, object responseData, Uri uri)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ namespace {{packageName}}.Client
/// Allows for extending request processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
partial void InterceptRequest(RestRequest request);
public virtual void InterceptRequest(RestRequest request) { }

/// <summary>
/// Allows for extending response processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
/// <param name="response">The RestSharp response object</param>
partial void InterceptResponse(RestRequest request, RestResponse response);
public virtual void InterceptResponse(RestRequest request, RestResponse response) { }

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace {{packageName}}.{{clientPackage}}
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }
}
{{#x-http-statuses-with-return}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ namespace {{packageName}}.{{apiPackage}}

{{#allParams}}
{{#-first}}
partial void Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
public virtual void Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { }

{{/-first}}
{{/allParams}}
Expand Down Expand Up @@ -298,7 +298,7 @@ namespace {{packageName}}.{{apiPackage}}
{{#allParams}}
/// <param name="{{paramName}}"></param>
{{/allParams}}
partial void After{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog {{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
public virtual void After{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLog {{interfacePrefix}}{{operationId}}ApiResponse apiResponseLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) { }

/// <summary>
/// Logs exceptions that occur while retrieving the server response
Expand Down Expand Up @@ -326,7 +326,7 @@ namespace {{packageName}}.{{apiPackage}}
{{#allParams}}
/// <param name="{{paramName}}"></param>
{{/allParams}}
partial void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLogLocalVar Exception exceptionLocalVar string pathFormatLocalVar string pathLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
public virtual void OnError{{operationId}}({{#lambda.joinWithComma}}ref bool suppressDefaultLogLocalVar Exception exceptionLocalVar string pathFormatLocalVar string pathLocalVar {{#allParams}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} {{/allParams}}{{/lambda.joinWithComma}}) { }

/// <summary>
/// {{summary}} {{notes}}
Expand Down Expand Up @@ -709,7 +709,7 @@ namespace {{packageName}}.{{apiPackage}}
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }
{{#responses}}

{{#vendorExtensions.x-http-status-is-default}}
Expand Down Expand Up @@ -786,7 +786,7 @@ namespace {{packageName}}.{{apiPackage}}
{{/lambda.trimTrailingWithNewLine}}
}

partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
public virtual void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode) { }
{{/-last}}
{{/responses}}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}

{{/composedSchemas.oneOf}}
partial void OnCreated();
public virtual void OnCreated() { }

{{#vars}}
{{#items.isEnum}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ namespace {{packageName}}.Client
return request;
}

partial void InterceptRequest(HttpRequestMessage req);
partial void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response);
public virtual void InterceptRequest(HttpRequestMessage req) { }
public virtual void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response) { }

private async Task<ApiResponse<T>> ToApiResponse<T>(HttpResponseMessage response, object responseData, Uri uri)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ namespace {{packageName}}.Client

}

partial void InterceptRequest(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration);
partial void InterceptResponse(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration, ref object responseData);
public virtual void InterceptRequest(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration) { }
public virtual void InterceptResponse(UnityWebRequest req, string path, RequestOptions options, IReadableConfiguration configuration, ref object responseData) { }

private ApiResponse<T> ToApiResponse<T>(UnityWebRequest request, object responseData)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
/// Allows for extending request processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
partial void InterceptRequest(RestRequest request);
public virtual void InterceptRequest(RestRequest request) { }

/// <summary>
/// Allows for extending response processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
/// <param name="response">The RestSharp response object</param>
partial void InterceptResponse(RestRequest request, RestResponse response);
public virtual void InterceptResponse(RestRequest request, RestResponse response) { }

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
/// Allows for extending request processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
partial void InterceptRequest(RestRequest request);
public virtual void InterceptRequest(RestRequest request) { }

/// <summary>
/// Allows for extending response processing for <see cref="ApiClient"/> generated code.
/// </summary>
/// <param name="request">The RestSharp request object</param>
/// <param name="response">The RestSharp response object</param>
partial void InterceptResponse(RestRequest request, RestResponse response);
public virtual void InterceptResponse(RestRequest request, RestResponse response) { }

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public APIKEYSApi(ILogger<APIKEYSApi> logger, ILoggerFactory loggerFactory, Http
ApiKeyProvider = apiKeyProvider;
}

partial void FormatGetApiKeysId_1(ref int id);
public virtual void FormatGetApiKeysId_1(ref int id) { }

/// <summary>
/// Processes the server response
Expand All @@ -165,7 +165,7 @@ private void AfterGetApiKeysId_1DefaultImplementation(IGetApiKeysId_1ApiResponse
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
/// <param name="id"></param>
partial void AfterGetApiKeysId_1(ref bool suppressDefaultLog, IGetApiKeysId_1ApiResponse apiResponseLocalVar, int id);
public virtual void AfterGetApiKeysId_1(ref bool suppressDefaultLog, IGetApiKeysId_1ApiResponse apiResponseLocalVar, int id) { }

/// <summary>
/// Logs exceptions that occur while retrieving the server response
Expand All @@ -190,7 +190,7 @@ private void OnErrorGetApiKeysId_1DefaultImplementation(Exception exceptionLocal
/// <param name="pathFormatLocalVar"></param>
/// <param name="pathLocalVar"></param>
/// <param name="id"></param>
partial void OnErrorGetApiKeysId_1(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id);
public virtual void OnErrorGetApiKeysId_1(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id) { }

/// <summary>
/// Show API Key Show API Key
Expand Down Expand Up @@ -289,7 +289,7 @@ public GetApiKeysId_1ApiResponse(ILogger<GetApiKeysId_1ApiResponse> logger, Syst
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }

/// <summary>
/// Returns true if the response is 400 BadRequest
Expand All @@ -305,7 +305,7 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
}

partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
public virtual void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode) { }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public APIKeysApi(ILogger<APIKeysApi> logger, ILoggerFactory loggerFactory, Http
ApiKeyProvider = apiKeyProvider;
}

partial void FormatGetApiKeysId_0(ref int id);
public virtual void FormatGetApiKeysId_0(ref int id) { }

/// <summary>
/// Processes the server response
Expand All @@ -165,7 +165,7 @@ private void AfterGetApiKeysId_0DefaultImplementation(IGetApiKeysId_0ApiResponse
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
/// <param name="id"></param>
partial void AfterGetApiKeysId_0(ref bool suppressDefaultLog, IGetApiKeysId_0ApiResponse apiResponseLocalVar, int id);
public virtual void AfterGetApiKeysId_0(ref bool suppressDefaultLog, IGetApiKeysId_0ApiResponse apiResponseLocalVar, int id) { }

/// <summary>
/// Logs exceptions that occur while retrieving the server response
Expand All @@ -190,7 +190,7 @@ private void OnErrorGetApiKeysId_0DefaultImplementation(Exception exceptionLocal
/// <param name="pathFormatLocalVar"></param>
/// <param name="pathLocalVar"></param>
/// <param name="id"></param>
partial void OnErrorGetApiKeysId_0(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id);
public virtual void OnErrorGetApiKeysId_0(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id) { }

/// <summary>
/// Show API Key Show API Key
Expand Down Expand Up @@ -289,7 +289,7 @@ public GetApiKeysId_0ApiResponse(ILogger<GetApiKeysId_0ApiResponse> logger, Syst
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }

/// <summary>
/// Returns true if the response is 400 BadRequest
Expand All @@ -305,7 +305,7 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
}

partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
public virtual void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode) { }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public ApiKeysApi(ILogger<ApiKeysApi> logger, ILoggerFactory loggerFactory, Http
ApiKeyProvider = apiKeyProvider;
}

partial void FormatGetApiKeysId(ref int id);
public virtual void FormatGetApiKeysId(ref int id) { }

/// <summary>
/// Processes the server response
Expand All @@ -165,7 +165,7 @@ private void AfterGetApiKeysIdDefaultImplementation(IGetApiKeysIdApiResponse api
/// <param name="suppressDefaultLog"></param>
/// <param name="apiResponseLocalVar"></param>
/// <param name="id"></param>
partial void AfterGetApiKeysId(ref bool suppressDefaultLog, IGetApiKeysIdApiResponse apiResponseLocalVar, int id);
public virtual void AfterGetApiKeysId(ref bool suppressDefaultLog, IGetApiKeysIdApiResponse apiResponseLocalVar, int id) { }

/// <summary>
/// Logs exceptions that occur while retrieving the server response
Expand All @@ -190,7 +190,7 @@ private void OnErrorGetApiKeysIdDefaultImplementation(Exception exceptionLocalVa
/// <param name="pathFormatLocalVar"></param>
/// <param name="pathLocalVar"></param>
/// <param name="id"></param>
partial void OnErrorGetApiKeysId(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id);
public virtual void OnErrorGetApiKeysId(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, int id) { }

/// <summary>
/// Show API Key Show API Key
Expand Down Expand Up @@ -289,7 +289,7 @@ public GetApiKeysIdApiResponse(ILogger<GetApiKeysIdApiResponse> logger, System.N
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }

/// <summary>
/// Returns true if the response is 400 BadRequest
Expand All @@ -305,7 +305,7 @@ private void OnDeserializationErrorDefaultImplementation(Exception exception, Ht
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
}

partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
public virtual void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode) { }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage
OnCreated(httpRequestMessage, httpResponseMessage);
}

partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
public virtual void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage) { }
}
}
Loading