Skip to content

Commit dd48a08

Browse files
Copilotmrlubos
andcommitted
Update test snapshots for conditional schema prefixing
Ran `pnpm test:update` to regenerate all test snapshots after implementing conditional schema name prefixing. External schemas now use unprefixed names (e.g., "Foo") instead of prefixed names (e.g., "external_Foo") when there are no naming conflicts. This affects all OpenAPI test snapshots across 2.0.x, 3.0.x, and 3.1.x versions. Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
1 parent f3a264b commit dd48a08

312 files changed

Lines changed: 873 additions & 873 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
export type { ClientOptions, ExternalAllOfSchema, ExternalAnyOfSchema, ExternalArraySchema, ExternalDoubleNestedNumeric, ExternalDoubleNestedProp, ExternalMixedProperties, ExternalNestedNumericObjectA, ExternalNestedNumericObjectB, ExternalNestedObjectA, ExternalNestedObjectB, ExternalSchemaA, ExternalSchemaB, ExternalSchemaC, ExternalSchemaExternalProp, ExternalSchemaExternalPropAlias, ExternalSchemaPathA, ExternalSchemaPathB, ExternalSchemaPropertyA, ExternalSchemaPropertyB, ExternalSchemaPropertyC, ExternalSchemaPropertyD, ExternalShared1, ExternalSharedDeep, ExternalSharedExternalNested, ExternalSharedExternalNestedNumeric, ExternalSharedExternalSharedModel, ExternalSharedExternalSharedModelWithUuid, ExternalSharedId, ExternalSharedName, ExternalUnionSchema, GetExternalArrayData, GetExternalArrayResponse, GetExternalArrayResponses, GetExternalMixedData, GetExternalMixedResponse, GetExternalMixedResponses, GetExternalModelData, GetExternalModelError, GetExternalModelErrors, GetExternalModelResponse, GetExternalModelResponses, GetExternalNestedData, GetExternalNestedResponse, GetExternalNestedResponses, GetExternalPropertiesByIdData, GetExternalPropertiesByIdResponse, GetExternalPropertiesByIdResponses, GetExternalUnionData, GetExternalUnionResponses, GetExternalUuidData, GetExternalUuidResponse, GetExternalUuidResponses, PostExternalArrayData, PostExternalArrayResponse, PostExternalArrayResponses, PostExternalMixedData, PostExternalMixedResponse, PostExternalMixedResponses, PostExternalModelData, PostExternalModelErrors, PostExternalModelResponse, PostExternalModelResponses, PostExternalNestedData, PostExternalNestedResponse, PostExternalNestedResponses, PostExternalUnionData, PostExternalUnionResponses, PutExternalUuidData, PutExternalUuidResponse, PutExternalUuidResponses } from './types.gen';
3+
export type { _1, ClientOptions, Deep, ExternalAllOfSchema, ExternalAnyOfSchema, ExternalArraySchema, ExternalDoubleNestedNumeric, ExternalDoubleNestedProp, ExternalMixedProperties, ExternalNested, ExternalNestedNumeric, ExternalNestedNumericObjectA, ExternalNestedNumericObjectB, ExternalNestedObjectA, ExternalNestedObjectB, ExternalSchemaA, ExternalSchemaB, ExternalSchemaC, ExternalSchemaExternalProp, ExternalSchemaExternalPropAlias, ExternalSchemaPathA, ExternalSchemaPathB, ExternalSchemaPropertyA, ExternalSchemaPropertyB, ExternalSchemaPropertyC, ExternalSchemaPropertyD, ExternalSharedModel, ExternalSharedModelWithUuid, ExternalUnionSchema, GetExternalArrayData, GetExternalArrayResponse, GetExternalArrayResponses, GetExternalMixedData, GetExternalMixedResponse, GetExternalMixedResponses, GetExternalModelData, GetExternalModelError, GetExternalModelErrors, GetExternalModelResponse, GetExternalModelResponses, GetExternalNestedData, GetExternalNestedResponse, GetExternalNestedResponses, GetExternalPropertiesByIdData, GetExternalPropertiesByIdResponse, GetExternalPropertiesByIdResponses, GetExternalUnionData, GetExternalUnionResponses, GetExternalUuidData, GetExternalUuidResponse, GetExternalUuidResponses, Id, Name, PostExternalArrayData, PostExternalArrayResponse, PostExternalArrayResponses, PostExternalMixedData, PostExternalMixedResponse, PostExternalMixedResponses, PostExternalModelData, PostExternalModelErrors, PostExternalModelResponse, PostExternalModelResponses, PostExternalNestedData, PostExternalNestedResponse, PostExternalNestedResponses, PostExternalUnionData, PostExternalUnionResponses, PutExternalUuidData, PutExternalUuidResponse, PutExternalUuidResponses } from './types.gen';

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/external/types.gen.ts

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -4,102 +4,104 @@ export type ClientOptions = {
44
baseUrl: string;
55
};
66

7-
export type ExternalSchemaA = ExternalSharedExternalSharedModel;
7+
export type _1 = string;
88

9-
export type ExternalSchemaB = ExternalSharedExternalSharedModel;
9+
export type ExternalSchemaA = ExternalSharedModel;
1010

11-
export type ExternalSchemaC = ExternalSharedExternalSharedModel;
11+
export type ExternalSchemaB = ExternalSharedModel;
1212

13-
export type ExternalSchemaPathA = ExternalSharedExternalSharedModel;
13+
export type ExternalSchemaC = ExternalSharedModel;
1414

15-
export type ExternalSchemaPathB = ExternalSharedExternalSharedModel;
15+
export type ExternalSchemaPathA = ExternalSharedModel;
16+
17+
export type ExternalSchemaPathB = ExternalSharedModel;
1618

1719
/**
1820
* External schema property (A)
1921
*/
2022
export type ExternalSchemaPropertyA = {
21-
uuid1?: ExternalSharedExternalSharedModelWithUuid;
23+
uuid1?: ExternalSharedModelWithUuid;
2224
};
2325

2426
/**
2527
* External schema property (B) - second use of UUID
2628
*/
2729
export type ExternalSchemaPropertyB = {
28-
uuid2?: ExternalSharedExternalSharedModelWithUuid;
30+
uuid2?: ExternalSharedModelWithUuid;
2931
};
3032

3133
/**
3234
* External schema property (C) - third use of UUID
3335
*/
3436
export type ExternalSchemaPropertyC = {
35-
uuid3?: ExternalSharedExternalSharedModelWithUuid;
37+
uuid3?: ExternalSharedModelWithUuid;
3638
};
3739

3840
/**
3941
* External schema property with duplicate refs (D)
4042
*/
4143
export type ExternalSchemaPropertyD = {
42-
uuid4?: ExternalSharedExternalSharedModelWithUuid;
43-
uuid5?: ExternalSharedExternalSharedModelWithUuid;
44+
uuid4?: ExternalSharedModelWithUuid;
45+
uuid5?: ExternalSharedModelWithUuid;
4446
};
4547

4648
/**
4749
* External schema property via external property ref (id)
4850
*/
4951
export type ExternalSchemaExternalProp = {
50-
id3?: ExternalSharedId;
51-
id4?: ExternalSharedId;
52+
id3?: Id;
53+
id4?: Id;
5254
};
5355

5456
/**
5557
* Alias to external property via component property ref
5658
*/
5759
export type ExternalSchemaExternalPropAlias = {
58-
id5?: ExternalSharedId;
59-
id6?: ExternalSharedId;
60+
id5?: Id;
61+
id6?: Id;
6062
};
6163

6264
/**
6365
* External double nested prop via property ref
6466
*/
6567
export type ExternalDoubleNestedProp = {
66-
deep1?: ExternalSharedDeep;
67-
deep2?: ExternalSharedDeep;
68+
deep1?: Deep;
69+
deep2?: Deep;
6870
};
6971

7072
/**
7173
* External double nested numeric properties
7274
*/
7375
export type ExternalDoubleNestedNumeric = {
74-
numeric1?: ExternalShared1;
75-
numeric2?: ExternalShared1;
76+
numeric1?: _1;
77+
numeric2?: _1;
7678
};
7779

78-
export type ExternalNestedObjectA = ExternalSharedExternalNested;
80+
export type ExternalNestedObjectA = ExternalNested;
7981

80-
export type ExternalNestedObjectB = ExternalSharedExternalNested;
82+
export type ExternalNestedObjectB = ExternalNested;
8183

82-
export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric;
84+
export type ExternalNestedNumericObjectA = ExternalNestedNumeric;
8385

84-
export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric;
86+
export type ExternalNestedNumericObjectB = ExternalNestedNumeric;
8587

8688
/**
8789
* Mixed external property references
8890
*/
8991
export type ExternalMixedProperties = {
90-
id7?: ExternalSharedId;
91-
name1?: ExternalSharedName;
92-
uuid6?: ExternalSharedExternalSharedModelWithUuid;
93-
deep3?: ExternalSharedDeep;
94-
numeric3?: ExternalShared1;
92+
id7?: Id;
93+
name1?: Name;
94+
uuid6?: ExternalSharedModelWithUuid;
95+
deep3?: Deep;
96+
numeric3?: _1;
9597
};
9698

9799
/**
98100
* Array containing external references
99101
*/
100102
export type ExternalArraySchema = {
101-
items?: Array<ExternalSharedExternalSharedModel>;
102-
uuidItems?: Array<ExternalSharedExternalSharedModelWithUuid>;
103+
items?: Array<ExternalSharedModel>;
104+
uuidItems?: Array<ExternalSharedModelWithUuid>;
103105
};
104106

105107
/**
@@ -110,41 +112,39 @@ export type ExternalUnionSchema = unknown;
110112
/**
111113
* AllOf with external references
112114
*/
113-
export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & {
114-
additional?: ExternalSharedExternalSharedModelWithUuid;
115+
export type ExternalAllOfSchema = ExternalSharedModel & {
116+
additional?: ExternalSharedModelWithUuid;
115117
};
116118

117119
/**
118120
* AnyOf with external references
119121
*/
120122
export type ExternalAnyOfSchema = unknown;
121123

122-
export type ExternalSharedExternalNested = {
124+
export type ExternalNested = {
123125
inner?: {
124126
deep?: string;
125127
};
126128
};
127129

128-
export type ExternalSharedDeep = string;
130+
export type Deep = string;
129131

130-
export type ExternalSharedExternalNestedNumeric = {
132+
export type ExternalNestedNumeric = {
131133
0?: {
132134
1?: string;
133135
};
134136
};
135137

136-
export type ExternalShared1 = string;
137-
138-
export type ExternalSharedExternalSharedModel = {
138+
export type ExternalSharedModel = {
139139
id: string;
140140
name?: string;
141141
};
142142

143-
export type ExternalSharedId = string;
143+
export type Id = string;
144144

145-
export type ExternalSharedName = string;
145+
export type Name = string;
146146

147-
export type ExternalSharedExternalSharedModelWithUuid = string;
147+
export type ExternalSharedModelWithUuid = string;
148148

149149
export type GetExternalModelData = {
150150
body?: never;
@@ -161,7 +161,7 @@ export type GetExternalModelErrors = {
161161
/**
162162
* Response using external UUID
163163
*/
164-
400: ExternalSharedExternalSharedModelWithUuid;
164+
400: ExternalSharedModelWithUuid;
165165
};
166166

167167
export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors];
@@ -170,7 +170,7 @@ export type GetExternalModelResponses = {
170170
/**
171171
* Response using external model
172172
*/
173-
200: ExternalSharedExternalSharedModel;
173+
200: ExternalSharedModel;
174174
};
175175

176176
export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses];
@@ -179,7 +179,7 @@ export type PostExternalModelData = {
179179
/**
180180
* Request body using external model
181181
*/
182-
body: ExternalSharedExternalSharedModel;
182+
body: ExternalSharedModel;
183183
path?: never;
184184
query?: never;
185185
url: '/external-model';
@@ -196,7 +196,7 @@ export type PostExternalModelResponses = {
196196
/**
197197
* Response using external model
198198
*/
199-
201: ExternalSharedExternalSharedModel;
199+
201: ExternalSharedModel;
200200
};
201201

202202
export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses];
@@ -214,7 +214,7 @@ export type GetExternalUuidResponses = {
214214
/**
215215
* Response using external UUID
216216
*/
217-
200: ExternalSharedExternalSharedModelWithUuid;
217+
200: ExternalSharedModelWithUuid;
218218
};
219219

220220
export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses];
@@ -223,7 +223,7 @@ export type PutExternalUuidData = {
223223
/**
224224
* Request body using external UUID
225225
*/
226-
body?: ExternalSharedExternalSharedModelWithUuid;
226+
body?: ExternalSharedModelWithUuid;
227227
path?: never;
228228
query?: never;
229229
url: '/external-uuid';
@@ -233,7 +233,7 @@ export type PutExternalUuidResponses = {
233233
/**
234234
* Response using external UUID
235235
*/
236-
200: ExternalSharedExternalSharedModelWithUuid;
236+
200: ExternalSharedModelWithUuid;
237237
};
238238

239239
export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses];
@@ -252,7 +252,7 @@ export type GetExternalNestedResponses = {
252252
/**
253253
* Response using external nested object
254254
*/
255-
200: ExternalSharedExternalNested;
255+
200: ExternalNested;
256256
};
257257

258258
export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses];
@@ -261,7 +261,7 @@ export type PostExternalNestedData = {
261261
/**
262262
* Request body using external nested object
263263
*/
264-
body?: ExternalSharedExternalNested;
264+
body?: ExternalNested;
265265
path?: never;
266266
query?: never;
267267
url: '/external-nested';
@@ -271,7 +271,7 @@ export type PostExternalNestedResponses = {
271271
/**
272272
* Response using external nested object
273273
*/
274-
201: ExternalSharedExternalNested;
274+
201: ExternalNested;
275275
};
276276

277277
export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses];
@@ -295,7 +295,7 @@ export type GetExternalMixedResponses = {
295295
/**
296296
* Response with array of external models
297297
*/
298-
200: Array<ExternalSharedExternalSharedModel>;
298+
200: Array<ExternalSharedModel>;
299299
};
300300

301301
export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses];
@@ -305,10 +305,10 @@ export type PostExternalMixedData = {
305305
* Request body with mixed external properties
306306
*/
307307
body?: {
308-
id?: ExternalSharedId;
309-
name?: ExternalSharedName;
310-
uuid?: ExternalSharedExternalSharedModelWithUuid;
311-
deep?: ExternalSharedDeep;
308+
id?: Id;
309+
name?: Name;
310+
uuid?: ExternalSharedModelWithUuid;
311+
deep?: Deep;
312312
};
313313
path?: never;
314314
query?: never;
@@ -319,7 +319,7 @@ export type PostExternalMixedResponses = {
319319
/**
320320
* Response using external model
321321
*/
322-
201: ExternalSharedExternalSharedModel;
322+
201: ExternalSharedModel;
323323
};
324324

325325
export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses];
@@ -335,13 +335,13 @@ export type GetExternalArrayResponses = {
335335
/**
336336
* Response with array of external models
337337
*/
338-
200: Array<ExternalSharedExternalSharedModel>;
338+
200: Array<ExternalSharedModel>;
339339
};
340340

341341
export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses];
342342

343343
export type PostExternalArrayData = {
344-
body: Array<ExternalSharedExternalSharedModel>;
344+
body: Array<ExternalSharedModel>;
345345
path?: never;
346346
query?: never;
347347
url: '/external-array';
@@ -351,7 +351,7 @@ export type PostExternalArrayResponses = {
351351
/**
352352
* Response with array of external models
353353
*/
354-
201: Array<ExternalSharedExternalSharedModel>;
354+
201: Array<ExternalSharedModel>;
355355
};
356356

357357
export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses];
@@ -400,11 +400,11 @@ export type GetExternalPropertiesByIdData = {
400400

401401
export type GetExternalPropertiesByIdResponses = {
402402
200: {
403-
id?: ExternalSharedId;
404-
name?: ExternalSharedName;
405-
uuid?: ExternalSharedExternalSharedModelWithUuid;
406-
deep?: ExternalSharedDeep;
407-
numeric?: ExternalShared1;
403+
id?: Id;
404+
name?: Name;
405+
uuid?: ExternalSharedModelWithUuid;
406+
deep?: Deep;
407+
numeric?: _1;
408408
};
409409
};
410410

0 commit comments

Comments
 (0)