Skip to content

Commit bd32e90

Browse files
authored
Fixes OpenAPI generator check failures (#199)
1 parent 94af2c5 commit bd32e90

File tree

10 files changed

+1414
-946
lines changed

10 files changed

+1414
-946
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,19 @@ jobs:
4848
python-version: "3.12.1"
4949
cache: "poetry"
5050

51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version: "22"
54+
5155
- name: Validate lockfile
5256
run: poetry lock --check
5357

54-
- name: Install dependencies
58+
- name: Install Python dependencies
5559
run: poetry install --no-interaction
5660

61+
- name: Install Node dependencies
62+
run: npm install
63+
5764
- name: Lint
5865
run: poetry run ruff check --extend-ignore=D1 $(git ls-files '*.py')
5966

frontends/api/src/generated/v0/api.ts

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,37 @@ export interface ProductRequest {
21292129
*/
21302130
image_metadata?: any | null
21312131
}
2132+
/**
2133+
*
2134+
* @export
2135+
* @interface SandboxValues
2136+
*/
2137+
export interface SandboxValues {
2138+
/**
2139+
*
2140+
* @type {number}
2141+
* @memberof SandboxValues
2142+
*/
2143+
id: number
2144+
/**
2145+
*
2146+
* @type {string}
2147+
* @memberof SandboxValues
2148+
*/
2149+
name: string
2150+
/**
2151+
*
2152+
* @type {number}
2153+
* @memberof SandboxValues
2154+
*/
2155+
age: number
2156+
/**
2157+
*
2158+
* @type {string}
2159+
* @memberof SandboxValues
2160+
*/
2161+
email: string
2162+
}
21322163
/**
21332164
* Simpler serializer for discounts.
21342165
* @export
@@ -5760,6 +5791,251 @@ export class PaymentsApi extends BaseAPI {
57605791
}
57615792
}
57625793

5794+
/**
5795+
* SandboxApi - axios parameter creator
5796+
* @export
5797+
*/
5798+
export const SandboxApiAxiosParamCreator = function (
5799+
configuration?: Configuration,
5800+
) {
5801+
return {
5802+
/**
5803+
* Retrieves the list of sandbox values.
5804+
* @param {*} [options] Override http request option.
5805+
* @throws {RequiredError}
5806+
*/
5807+
sandboxZenApiList: async (
5808+
options: RawAxiosRequestConfig = {},
5809+
): Promise<RequestArgs> => {
5810+
const localVarPath = `/api/v0/sandbox/zen/`
5811+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
5812+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
5813+
let baseOptions
5814+
if (configuration) {
5815+
baseOptions = configuration.baseOptions
5816+
}
5817+
5818+
const localVarRequestOptions = {
5819+
method: "GET",
5820+
...baseOptions,
5821+
...options,
5822+
}
5823+
const localVarHeaderParameter = {} as any
5824+
const localVarQueryParameter = {} as any
5825+
5826+
setSearchParams(localVarUrlObj, localVarQueryParameter)
5827+
let headersFromBaseOptions =
5828+
baseOptions && baseOptions.headers ? baseOptions.headers : {}
5829+
localVarRequestOptions.headers = {
5830+
...localVarHeaderParameter,
5831+
...headersFromBaseOptions,
5832+
...options.headers,
5833+
}
5834+
5835+
return {
5836+
url: toPathString(localVarUrlObj),
5837+
options: localVarRequestOptions,
5838+
}
5839+
},
5840+
/**
5841+
* Retrieves a single sandbox value.
5842+
* @param {number} id
5843+
* @param {*} [options] Override http request option.
5844+
* @throws {RequiredError}
5845+
*/
5846+
sandboxZenApiRetrieve: async (
5847+
id: number,
5848+
options: RawAxiosRequestConfig = {},
5849+
): Promise<RequestArgs> => {
5850+
// verify required parameter 'id' is not null or undefined
5851+
assertParamExists("sandboxZenApiRetrieve", "id", id)
5852+
const localVarPath = `/api/v0/sandbox/zen/{id}/`.replace(
5853+
`{${"id"}}`,
5854+
encodeURIComponent(String(id)),
5855+
)
5856+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
5857+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
5858+
let baseOptions
5859+
if (configuration) {
5860+
baseOptions = configuration.baseOptions
5861+
}
5862+
5863+
const localVarRequestOptions = {
5864+
method: "GET",
5865+
...baseOptions,
5866+
...options,
5867+
}
5868+
const localVarHeaderParameter = {} as any
5869+
const localVarQueryParameter = {} as any
5870+
5871+
setSearchParams(localVarUrlObj, localVarQueryParameter)
5872+
let headersFromBaseOptions =
5873+
baseOptions && baseOptions.headers ? baseOptions.headers : {}
5874+
localVarRequestOptions.headers = {
5875+
...localVarHeaderParameter,
5876+
...headersFromBaseOptions,
5877+
...options.headers,
5878+
}
5879+
5880+
return {
5881+
url: toPathString(localVarUrlObj),
5882+
options: localVarRequestOptions,
5883+
}
5884+
},
5885+
}
5886+
}
5887+
5888+
/**
5889+
* SandboxApi - functional programming interface
5890+
* @export
5891+
*/
5892+
export const SandboxApiFp = function (configuration?: Configuration) {
5893+
const localVarAxiosParamCreator = SandboxApiAxiosParamCreator(configuration)
5894+
return {
5895+
/**
5896+
* Retrieves the list of sandbox values.
5897+
* @param {*} [options] Override http request option.
5898+
* @throws {RequiredError}
5899+
*/
5900+
async sandboxZenApiList(
5901+
options?: RawAxiosRequestConfig,
5902+
): Promise<
5903+
(
5904+
axios?: AxiosInstance,
5905+
basePath?: string,
5906+
) => AxiosPromise<Array<SandboxValues>>
5907+
> {
5908+
const localVarAxiosArgs =
5909+
await localVarAxiosParamCreator.sandboxZenApiList(options)
5910+
const index = configuration?.serverIndex ?? 0
5911+
const operationBasePath =
5912+
operationServerMap["SandboxApi.sandboxZenApiList"]?.[index]?.url
5913+
return (axios, basePath) =>
5914+
createRequestFunction(
5915+
localVarAxiosArgs,
5916+
globalAxios,
5917+
BASE_PATH,
5918+
configuration,
5919+
)(axios, operationBasePath || basePath)
5920+
},
5921+
/**
5922+
* Retrieves a single sandbox value.
5923+
* @param {number} id
5924+
* @param {*} [options] Override http request option.
5925+
* @throws {RequiredError}
5926+
*/
5927+
async sandboxZenApiRetrieve(
5928+
id: number,
5929+
options?: RawAxiosRequestConfig,
5930+
): Promise<
5931+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SandboxValues>
5932+
> {
5933+
const localVarAxiosArgs =
5934+
await localVarAxiosParamCreator.sandboxZenApiRetrieve(id, options)
5935+
const index = configuration?.serverIndex ?? 0
5936+
const operationBasePath =
5937+
operationServerMap["SandboxApi.sandboxZenApiRetrieve"]?.[index]?.url
5938+
return (axios, basePath) =>
5939+
createRequestFunction(
5940+
localVarAxiosArgs,
5941+
globalAxios,
5942+
BASE_PATH,
5943+
configuration,
5944+
)(axios, operationBasePath || basePath)
5945+
},
5946+
}
5947+
}
5948+
5949+
/**
5950+
* SandboxApi - factory interface
5951+
* @export
5952+
*/
5953+
export const SandboxApiFactory = function (
5954+
configuration?: Configuration,
5955+
basePath?: string,
5956+
axios?: AxiosInstance,
5957+
) {
5958+
const localVarFp = SandboxApiFp(configuration)
5959+
return {
5960+
/**
5961+
* Retrieves the list of sandbox values.
5962+
* @param {*} [options] Override http request option.
5963+
* @throws {RequiredError}
5964+
*/
5965+
sandboxZenApiList(
5966+
options?: RawAxiosRequestConfig,
5967+
): AxiosPromise<Array<SandboxValues>> {
5968+
return localVarFp
5969+
.sandboxZenApiList(options)
5970+
.then((request) => request(axios, basePath))
5971+
},
5972+
/**
5973+
* Retrieves a single sandbox value.
5974+
* @param {SandboxApiSandboxZenApiRetrieveRequest} requestParameters Request parameters.
5975+
* @param {*} [options] Override http request option.
5976+
* @throws {RequiredError}
5977+
*/
5978+
sandboxZenApiRetrieve(
5979+
requestParameters: SandboxApiSandboxZenApiRetrieveRequest,
5980+
options?: RawAxiosRequestConfig,
5981+
): AxiosPromise<SandboxValues> {
5982+
return localVarFp
5983+
.sandboxZenApiRetrieve(requestParameters.id, options)
5984+
.then((request) => request(axios, basePath))
5985+
},
5986+
}
5987+
}
5988+
5989+
/**
5990+
* Request parameters for sandboxZenApiRetrieve operation in SandboxApi.
5991+
* @export
5992+
* @interface SandboxApiSandboxZenApiRetrieveRequest
5993+
*/
5994+
export interface SandboxApiSandboxZenApiRetrieveRequest {
5995+
/**
5996+
*
5997+
* @type {number}
5998+
* @memberof SandboxApiSandboxZenApiRetrieve
5999+
*/
6000+
readonly id: number
6001+
}
6002+
6003+
/**
6004+
* SandboxApi - object-oriented interface
6005+
* @export
6006+
* @class SandboxApi
6007+
* @extends {BaseAPI}
6008+
*/
6009+
export class SandboxApi extends BaseAPI {
6010+
/**
6011+
* Retrieves the list of sandbox values.
6012+
* @param {*} [options] Override http request option.
6013+
* @throws {RequiredError}
6014+
* @memberof SandboxApi
6015+
*/
6016+
public sandboxZenApiList(options?: RawAxiosRequestConfig) {
6017+
return SandboxApiFp(this.configuration)
6018+
.sandboxZenApiList(options)
6019+
.then((request) => request(this.axios, this.basePath))
6020+
}
6021+
6022+
/**
6023+
* Retrieves a single sandbox value.
6024+
* @param {SandboxApiSandboxZenApiRetrieveRequest} requestParameters Request parameters.
6025+
* @param {*} [options] Override http request option.
6026+
* @throws {RequiredError}
6027+
* @memberof SandboxApi
6028+
*/
6029+
public sandboxZenApiRetrieve(
6030+
requestParameters: SandboxApiSandboxZenApiRetrieveRequest,
6031+
options?: RawAxiosRequestConfig,
6032+
) {
6033+
return SandboxApiFp(this.configuration)
6034+
.sandboxZenApiRetrieve(requestParameters.id, options)
6035+
.then((request) => request(this.axios, this.basePath))
6036+
}
6037+
}
6038+
57636039
/**
57646040
* UsersApi - axios parameter creator
57656041
* @export

0 commit comments

Comments
 (0)