-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
最新のOpenAPI仕様書を元にクライアントコードを生成。 (#570)
Co-authored-by: Fumika Koyama <[email protected]>
- Loading branch information
Showing
3 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
170 changes: 170 additions & 0 deletions
170
samples/Dressca/dressca-frontend/src/generated/api-client/api/health-checks-api.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Dressca Web API | ||
* Dressca の Web API 仕様 | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
|
||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import { Configuration } from '../configuration'; | ||
// Some imports not used depending on template conditions | ||
// @ts-ignore | ||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; | ||
// @ts-ignore | ||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; | ||
/** | ||
* HealthChecksApi - axios parameter creator | ||
* @export | ||
*/ | ||
export const HealthChecksApiAxiosParamCreator = function (configuration?: Configuration) { | ||
return { | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
healthChecksApiHealthGET: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/api/health`; | ||
// 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; | ||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
|
||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
healthChecksApiHealthHEAD: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/api/health`; | ||
// 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: 'HEAD', ...baseOptions, ...options}; | ||
const localVarHeaderParameter = {} as any; | ||
const localVarQueryParameter = {} as any; | ||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
|
||
return { | ||
url: toPathString(localVarUrlObj), | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
} | ||
}; | ||
|
||
/** | ||
* HealthChecksApi - functional programming interface | ||
* @export | ||
*/ | ||
export const HealthChecksApiFp = function(configuration?: Configuration) { | ||
const localVarAxiosParamCreator = HealthChecksApiAxiosParamCreator(configuration) | ||
return { | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async healthChecksApiHealthGET(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.healthChecksApiHealthGET(options); | ||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
}, | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async healthChecksApiHealthHEAD(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.healthChecksApiHealthHEAD(options); | ||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
}, | ||
} | ||
}; | ||
|
||
/** | ||
* HealthChecksApi - factory interface | ||
* @export | ||
*/ | ||
export const HealthChecksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { | ||
const localVarFp = HealthChecksApiFp(configuration) | ||
return { | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
healthChecksApiHealthGET(options?: any): AxiosPromise<string> { | ||
return localVarFp.healthChecksApiHealthGET(options).then((request) => request(axios, basePath)); | ||
}, | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
healthChecksApiHealthHEAD(options?: any): AxiosPromise<void> { | ||
return localVarFp.healthChecksApiHealthHEAD(options).then((request) => request(axios, basePath)); | ||
}, | ||
}; | ||
}; | ||
|
||
/** | ||
* HealthChecksApi - object-oriented interface | ||
* @export | ||
* @class HealthChecksApi | ||
* @extends {BaseAPI} | ||
*/ | ||
export class HealthChecksApi extends BaseAPI { | ||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof HealthChecksApi | ||
*/ | ||
public healthChecksApiHealthGET(options?: AxiosRequestConfig) { | ||
return HealthChecksApiFp(this.configuration).healthChecksApiHealthGET(options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
|
||
/** | ||
* | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof HealthChecksApi | ||
*/ | ||
public healthChecksApiHealthHEAD(options?: AxiosRequestConfig) { | ||
return HealthChecksApiFp(this.configuration).healthChecksApiHealthHEAD(options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
} |