这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 10 additions & 9 deletions dev/openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ export default defineConfig(() => {
// 'circular.yaml',
// 'dutchie.json',
// 'invalid',
// 'full.yaml',
'full.yaml',
// 'object-property-names.yaml',
// 'openai.yaml',
// 'opencode.yaml',
// 'pagination-ref.yaml',
// 'sdk-instance.yaml',
// 'string-with-format.yaml',
'transformers.json',
// 'transformers.json',
// 'type-format.yaml',
// 'validators.yaml',
// 'validators-circular-ref.json',
Expand Down Expand Up @@ -225,17 +226,17 @@ export default defineConfig(() => {
{
// case: 'snake_case',
// definitions: '你_snake_{{name}}',
// enums: {
// // case: 'PascalCase',
// // constantsIgnoreNull: true,
// // enabled: false,
// mode: 'javascript',
// },
enums: {
// case: 'PascalCase',
// constantsIgnoreNull: true,
// enabled: false,
// mode: 'typescript',
},
// errors: {
// error: '他們_error_{{name}}',
// name: '你們_errors_{{name}}',
// },
// name: '@hey-api/typescript',
name: '@hey-api/typescript',
// requests: '我們_data_{{name}}',
// responses: {
// name: '我_responses_{{name}}',
Expand Down
9 changes: 2 additions & 7 deletions examples/openapi-ts-openai/src/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7373,10 +7373,7 @@ export type ImageGenToolCall = {
* for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
*
*/
export const ImageInputFidelity = {
HIGH: 'high',
LOW: 'low',
} as const;
export const ImageInputFidelity = { HIGH: 'high', LOW: 'low' } as const;

/**
* Control how much effort the model will exert to match the style and features,
Expand Down Expand Up @@ -16101,9 +16098,7 @@ export type TranscriptTextUsageTokens = {
*/
export type TranscriptionChunkingStrategy = 'auto' | VadConfig;

export const TranscriptionInclude = {
LOGPROBS: 'logprobs',
} as const;
export const TranscriptionInclude = { LOGPROBS: 'logprobs' } as const;

export type TranscriptionInclude =
(typeof TranscriptionInclude)[keyof typeof TranscriptionInclude];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const postFoo = <ThrowOnError extends boolean = false>(options: Options<P
url: "/foo",
...options,
headers: {
'Content-Type': "text/plain",
"Content-Type": "text/plain",
...options.headers
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type PostFooData = {
body: string;
path?: never;
query?: never;
url: '/foo';
url: "/foo";
};

export type PostFooResponses = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@ export type ClientOptions = {
baseUrl: string;
};

export const _110 = {
110: '1-10',
1120: '11-20'
} as const;
export const _110 = { 110: "1-10", 1120: "11-20" } as const;

export type _110 = typeof _110[keyof typeof _110];

export const MyFoo = {
MyFoo: 'myFoo',
MyBar: 'myBar'
} as const;
export const MyFoo = { MyFoo: "myFoo", MyBar: "myBar" } as const;

export type MyFoo = typeof MyFoo[keyof typeof MyFoo];

export const MyFoo2 = {
MyFoo: 'MyFoo',
MyBar: 'MyBar'
} as const;
export const MyFoo2 = { MyFoo: "MyFoo", MyBar: "MyBar" } as const;

export type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];

export const Foo = {
Foo: 'foo',
Bar: 'bar',
'': '',
Foo: "foo",
Bar: "bar",
"": "",
True: true,
False: false
} as const;
Expand All @@ -39,17 +30,17 @@ export const Numbers = {
100: 100,
200: 200,
300: 300,
'-100': -100,
'-200': -200,
'-300': -300
"-100": -100,
"-200": -200,
"-300": -300
} as const;

export type Numbers = typeof Numbers[keyof typeof Numbers];

export const Arrays = {
0: ['foo'],
1: ['bar'],
2: ['baz']
0: ["foo"],
1: ["bar"],
2: ["baz"]
} as const;

export type Arrays = typeof Arrays[keyof typeof Arrays];
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@ export type ClientOptions = {
baseUrl: string;
};

export const _110 = {
'1_10': '1-10',
'11_20': '11-20'
} as const;
export const _110 = { "1_10": "1-10", "11_20": "11-20" } as const;

export type _110 = typeof _110[keyof typeof _110];

export const MyFoo = {
MY_FOO: 'myFoo',
MY_BAR: 'myBar'
} as const;
export const MyFoo = { MY_FOO: "myFoo", MY_BAR: "myBar" } as const;

export type MyFoo = typeof MyFoo[keyof typeof MyFoo];

export const MyFoo2 = {
MY_FOO: 'MyFoo',
MY_BAR: 'MyBar'
} as const;
export const MyFoo2 = { MY_FOO: "MyFoo", MY_BAR: "MyBar" } as const;

export type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];

export const Foo = {
FOO: 'foo',
BAR: 'bar',
'': '',
FOO: "foo",
BAR: "bar",
"": "",
TRUE: true,
FALSE: false
} as const;
Expand All @@ -39,17 +30,17 @@ export const Numbers = {
100: 100,
200: 200,
300: 300,
'-100': -100,
'-200': -200,
'-300': -300
"-100": -100,
"-200": -200,
"-300": -300
} as const;

export type Numbers = typeof Numbers[keyof typeof Numbers];

export const Arrays = {
0: ['foo'],
1: ['bar'],
2: ['baz']
0: ["foo"],
1: ["bar"],
2: ["baz"]
} as const;

export type Arrays = typeof Arrays[keyof typeof Arrays];
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@ export type ClientOptions = {
baseUrl: string;
};

export const _110 = {
110: '1-10',
1120: '11-20'
} as const;
export const _110 = { 110: "1-10", 1120: "11-20" } as const;

export type _110 = typeof _110[keyof typeof _110];

export const MyFoo = {
myFoo: 'myFoo',
myBar: 'myBar'
} as const;
export const MyFoo = { myFoo: "myFoo", myBar: "myBar" } as const;

export type MyFoo = typeof MyFoo[keyof typeof MyFoo];

export const MyFoo2 = {
myFoo: 'MyFoo',
myBar: 'MyBar'
} as const;
export const MyFoo2 = { myFoo: "MyFoo", myBar: "MyBar" } as const;

export type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];

export const Foo = {
foo: 'foo',
bar: 'bar',
'': '',
foo: "foo",
bar: "bar",
"": "",
true: true,
false: false
} as const;
Expand All @@ -39,17 +30,17 @@ export const Numbers = {
100: 100,
200: 200,
300: 300,
'-100': -100,
'-200': -200,
'-300': -300
"-100": -100,
"-200": -200,
"-300": -300
} as const;

export type Numbers = typeof Numbers[keyof typeof Numbers];

export const Arrays = {
0: ['foo'],
1: ['bar'],
2: ['baz']
0: ["foo"],
1: ["bar"],
2: ["baz"]
} as const;

export type Arrays = typeof Arrays[keyof typeof Arrays];
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@ export type ClientOptions = {
baseUrl: string;
};

export const _110 = {
'1-10': '1-10',
'11-20': '11-20'
} as const;
export const _110 = { "1-10": "1-10", "11-20": "11-20" } as const;

export type _110 = typeof _110[keyof typeof _110];

export const MyFoo = {
myFoo: 'myFoo',
myBar: 'myBar'
} as const;
export const MyFoo = { myFoo: "myFoo", myBar: "myBar" } as const;

export type MyFoo = typeof MyFoo[keyof typeof MyFoo];

export const MyFoo2 = {
MyFoo: 'MyFoo',
MyBar: 'MyBar'
} as const;
export const MyFoo2 = { MyFoo: "MyFoo", MyBar: "MyBar" } as const;

export type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];

export const Foo = {
foo: 'foo',
bar: 'bar',
'': '',
foo: "foo",
bar: "bar",
"": "",
true: true,
false: false
} as const;
Expand All @@ -39,17 +30,17 @@ export const Numbers = {
100: 100,
200: 200,
300: 300,
'-100': -100,
'-200': -200,
'-300': -300
"-100": -100,
"-200": -200,
"-300": -300
} as const;

export type Numbers = typeof Numbers[keyof typeof Numbers];

export const Arrays = {
0: ['foo'],
1: ['bar'],
2: ['baz']
0: ["foo"],
1: ["bar"],
2: ["baz"]
} as const;

export type Arrays = typeof Arrays[keyof typeof Arrays];
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,22 @@ export type ClientOptions = {
baseUrl: string;
};

export const _110 = {
'1_10': '1-10',
'11_20': '11-20'
} as const;
export const _110 = { "1_10": "1-10", "11_20": "11-20" } as const;

export type _110 = typeof _110[keyof typeof _110];

export const MyFoo = {
my_foo: 'myFoo',
my_bar: 'myBar'
} as const;
export const MyFoo = { my_foo: "myFoo", my_bar: "myBar" } as const;

export type MyFoo = typeof MyFoo[keyof typeof MyFoo];

export const MyFoo2 = {
my_foo: 'MyFoo',
my_bar: 'MyBar'
} as const;
export const MyFoo2 = { my_foo: "MyFoo", my_bar: "MyBar" } as const;

export type MyFoo2 = typeof MyFoo2[keyof typeof MyFoo2];

export const Foo = {
foo: 'foo',
bar: 'bar',
'': '',
foo: "foo",
bar: "bar",
"": "",
true: true,
false: false
} as const;
Expand All @@ -39,17 +30,17 @@ export const Numbers = {
100: 100,
200: 200,
300: 300,
'-100': -100,
'-200': -200,
'-300': -300
"-100": -100,
"-200": -200,
"-300": -300
} as const;

export type Numbers = typeof Numbers[keyof typeof Numbers];

export const Arrays = {
0: ['foo'],
1: ['bar'],
2: ['baz']
0: ["foo"],
1: ["bar"],
2: ["baz"]
} as const;

export type Arrays = typeof Arrays[keyof typeof Arrays];
Loading
Loading