Python package improvements

Added an endpoint for getting the actual stored responses, and used it to test and improve the python package.
This commit is contained in:
Kyle Corbitt
2023-08-14 19:07:03 -07:00
parent c4cef35717
commit 754e273049
17 changed files with 786 additions and 57 deletions

View File

@@ -99,6 +99,74 @@ export interface CheckCacheRequest {
*/
'tags'?: { [key: string]: string; };
}
/**
*
* @export
* @interface LocalTestingOnlyGetLatestLoggedCall200Response
*/
export interface LocalTestingOnlyGetLatestLoggedCall200Response {
/**
*
* @type {string}
* @memberof LocalTestingOnlyGetLatestLoggedCall200Response
*/
'createdAt': string;
/**
*
* @type {boolean}
* @memberof LocalTestingOnlyGetLatestLoggedCall200Response
*/
'cacheHit': boolean;
/**
*
* @type {{ [key: string]: string; }}
* @memberof LocalTestingOnlyGetLatestLoggedCall200Response
*/
'tags': { [key: string]: string; };
/**
*
* @type {LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse}
* @memberof LocalTestingOnlyGetLatestLoggedCall200Response
*/
'modelResponse': LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse | null;
}
/**
*
* @export
* @interface LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
export interface LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse {
/**
*
* @type {string}
* @memberof LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
'id': string;
/**
*
* @type {number}
* @memberof LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
'statusCode': number | null;
/**
*
* @type {string}
* @memberof LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
'errorMessage': string | null;
/**
*
* @type {any}
* @memberof LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
'reqPayload'?: any;
/**
*
* @type {any}
* @memberof LocalTestingOnlyGetLatestLoggedCall200ResponseModelResponse
*/
'respPayload'?: any;
}
/**
*
* @export
@@ -194,6 +262,39 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
/**
* Get the latest logged call (only for local testing)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
localTestingOnlyGetLatestLoggedCall: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/local-testing-only-get-latest-logged-call`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Authorization required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Report an API call
* @param {ReportRequest} reportRequest
@@ -253,6 +354,15 @@ export const DefaultApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.checkCache(checkCacheRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Get the latest logged call (only for local testing)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async localTestingOnlyGetLatestLoggedCall(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LocalTestingOnlyGetLatestLoggedCall200Response>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.localTestingOnlyGetLatestLoggedCall(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Report an API call
* @param {ReportRequest} reportRequest
@@ -282,6 +392,14 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
checkCache(checkCacheRequest: CheckCacheRequest, options?: any): AxiosPromise<CheckCache200Response> {
return localVarFp.checkCache(checkCacheRequest, options).then((request) => request(axios, basePath));
},
/**
* Get the latest logged call (only for local testing)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
localTestingOnlyGetLatestLoggedCall(options?: any): AxiosPromise<LocalTestingOnlyGetLatestLoggedCall200Response> {
return localVarFp.localTestingOnlyGetLatestLoggedCall(options).then((request) => request(axios, basePath));
},
/**
* Report an API call
* @param {ReportRequest} reportRequest
@@ -312,6 +430,16 @@ export class DefaultApi extends BaseAPI {
return DefaultApiFp(this.configuration).checkCache(checkCacheRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
* Get the latest logged call (only for local testing)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public localTestingOnlyGetLatestLoggedCall(options?: AxiosRequestConfig) {
return DefaultApiFp(this.configuration).localTestingOnlyGetLatestLoggedCall(options).then((request) => request(this.axios, this.basePath));
}
/**
* Report an API call
* @param {ReportRequest} reportRequest