Skip to content

Commit

Permalink
Merge pull request #6 from kinde-oss/feat/update-api
Browse files Browse the repository at this point in the history
update openapi-ts generator
  • Loading branch information
DanielRivers authored May 10, 2024
2 parents 359c43a + f141edf commit e26cb0e
Show file tree
Hide file tree
Showing 11 changed files with 9,710 additions and 5,650 deletions.
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
generated

pnpm-lock.yaml
spec/kinde-mgmt-api-specs.yaml
5 changes: 4 additions & 1 deletion lib/api/core/OpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ export const OpenAPI: OpenAPIConfig = {
USERNAME: undefined,
VERSION: "1",
WITH_CREDENTIALS: false,
interceptors: { request: new Interceptors(), response: new Interceptors() },
interceptors: {
request: new Interceptors(),
response: new Interceptors(),
},
};
4 changes: 3 additions & 1 deletion lib/api/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const getQueryString = (params: Record<string, unknown>): string => {
return;
}

if (Array.isArray(value)) {
if (value instanceof Date) {
append(key, value.toISOString());
} else if (Array.isArray(value)) {
value.forEach((v) => encodePair(key, v));
} else if (typeof value === "object") {
Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v));
Expand Down
7 changes: 3 additions & 4 deletions lib/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts

export { ApiError } from "./core/ApiError";
export { CancelablePromise, CancelError } from "./core/CancelablePromise";
export { OpenAPI, type OpenAPIConfig } from "./core/OpenAPI";
export * from "./models";
export * from "./schemas";
export * from "./services";
export * from "./schemas.gen";
export * from "./services.gen";
export * from "./types.gen";
Loading

0 comments on commit e26cb0e

Please sign in to comment.