Skip to content

Commit 75f6853

Browse files
committed
OpenAPI spec 1.2 (Added chatgpt and asr APIs)
1 parent fa13b7a commit 75f6853

File tree

12 files changed

+1287
-159
lines changed

12 files changed

+1287
-159
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.2.1
1+
6.4.0

api.ts

Lines changed: 567 additions & 58 deletions
Large diffs are not rendered by default.

base.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OpenAI API
55
* APIs for sampling from and fine-tuning language models
66
*
7-
* The version of the OpenAPI document: 1.1.0
7+
* The version of the OpenAPI document: 1.2.0
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,10 +13,11 @@
1313
*/
1414

1515

16-
import { Configuration } from "./configuration";
16+
import type { Configuration } from './configuration';
1717
// Some imports not used depending on template conditions
1818
// @ts-ignore
19-
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
19+
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
20+
import globalAxios from 'axios';
2021

2122
export const BASE_PATH = "https://api.openai.com/v1".replace(/\/+$/, "");
2223

@@ -64,8 +65,8 @@ export class BaseAPI {
6465
* @extends {Error}
6566
*/
6667
export class RequiredError extends Error {
67-
name: "RequiredError" = "RequiredError";
6868
constructor(public field: string, msg?: string) {
6969
super(msg);
70+
this.name = "RequiredError"
7071
}
7172
}

common.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OpenAI API
55
* APIs for sampling from and fine-tuning language models
66
*
7-
* The version of the OpenAPI document: 1.1.0
7+
* The version of the OpenAPI document: 1.2.0
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,9 +13,10 @@
1313
*/
1414

1515

16-
import { Configuration } from "./configuration";
17-
import { RequiredError, RequestArgs } from "./base";
18-
import { AxiosInstance, AxiosResponse } from 'axios';
16+
import type { Configuration } from "./configuration";
17+
import type { RequestArgs } from "./base";
18+
import type { AxiosInstance, AxiosResponse } from 'axios';
19+
import { RequiredError } from "./base";
1920

2021
/**
2122
*
@@ -84,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
8485
}
8586

8687
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
88+
if (parameter == null) return;
8789
if (typeof parameter === "object") {
8890
if (Array.isArray(parameter)) {
8991
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));

configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* OpenAI API
55
* APIs for sampling from and fine-tuning language models
66
*
7-
* The version of the OpenAPI document: 1.1.0
7+
* The version of the OpenAPI document: 1.2.0
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)