Skip to content

Commit 7a8b34a

Browse files
committed
chore(tests): Update pinia colada tests
1 parent 4c9fa63 commit 7a8b34a

File tree

6 files changed

+210
-952
lines changed

6 files changed

+210
-952
lines changed

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/types.gen.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,33 @@ export type FailureFailure = {
406406
reference_code?: string;
407407
};
408408

409+
/**
410+
* This is a model with one nested property
411+
*/
412+
export type ModelWithPropertiesWritable = {
413+
required: string;
414+
string?: string;
415+
number?: number;
416+
boolean?: boolean;
417+
reference?: ModelWithString;
418+
'property with space'?: string;
419+
default?: string;
420+
try?: string;
421+
};
422+
423+
/**
424+
* This is a model that contains a some patterns
425+
*/
426+
export type ModelWithPatternWritable = {
427+
key: string;
428+
name: string;
429+
id?: string;
430+
text?: string;
431+
patternWithSingleQuotes?: string;
432+
patternWithNewline?: string;
433+
patternWithBacktick?: string;
434+
};
435+
409436
export type ServiceWithEmptyTagData = {
410437
body?: never;
411438
path?: never;

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/group-by-tag/types.gen.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,33 @@ export type FailureFailure = {
406406
reference_code?: string;
407407
};
408408

409+
/**
410+
* This is a model with one nested property
411+
*/
412+
export type ModelWithPropertiesWritable = {
413+
required: string;
414+
string?: string;
415+
number?: number;
416+
boolean?: boolean;
417+
reference?: ModelWithString;
418+
'property with space'?: string;
419+
default?: string;
420+
try?: string;
421+
};
422+
423+
/**
424+
* This is a model that contains a some patterns
425+
*/
426+
export type ModelWithPatternWritable = {
427+
key: string;
428+
name: string;
429+
id?: string;
430+
text?: string;
431+
patternWithSingleQuotes?: string;
432+
patternWithNewline?: string;
433+
patternWithBacktick?: string;
434+
};
435+
409436
export type ServiceWithEmptyTagData = {
410437
body?: never;
411438
path?: never;

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/types.gen.ts

Lines changed: 39 additions & 238 deletions
Original file line numberDiff line numberDiff line change
@@ -955,260 +955,61 @@ export type GenericSchemaDuplicateIssue1SystemString = {
955955
};
956956

957957
/**
958-
* Model with number-only name
959-
*/
960-
export type _400Writable = string;
961-
962-
/**
963-
* Testing multiline comments in string: First line
964-
* Second line
965-
*
966-
* Fourth line
967-
*/
968-
export type CamelCaseCommentWithBreaksWritable = number;
969-
970-
/**
971-
* Testing multiline comments in string: First line
972-
* Second line
973-
*
974-
* Fourth line
975-
*/
976-
export type CommentWithBreaksWritable = number;
977-
978-
/**
979-
* Testing backticks in string: `backticks` and ```multiple backticks``` should work
980-
*/
981-
export type CommentWithBackticksWritable = number;
982-
983-
/**
984-
* Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work
985-
*/
986-
export type CommentWithBackticksAndQuotesWritable = number;
987-
988-
/**
989-
* Testing slashes in string: \backwards\\\ and /forwards/// should work
990-
*/
991-
export type CommentWithSlashesWritable = number;
992-
993-
/**
994-
* Testing expression placeholders in string: ${expression} should work
995-
*/
996-
export type CommentWithExpressionPlaceholdersWritable = number;
997-
998-
/**
999-
* Testing quotes in string: 'single quote''' and "double quotes""" should work
1000-
*/
1001-
export type CommentWithQuotesWritable = number;
1002-
1003-
/**
1004-
* Testing reserved characters in string: * inline * and ** inline ** should work
1005-
*/
1006-
export type CommentWithReservedCharactersWritable = number;
1007-
1008-
/**
1009-
* This is a simple number
1010-
*/
1011-
export type SimpleIntegerWritable = number;
1012-
1013-
/**
1014-
* This is a simple boolean
1015-
*/
1016-
export type SimpleBooleanWritable = boolean;
1017-
1018-
/**
1019-
* This is a simple string
1020-
*/
1021-
export type SimpleStringWritable = string;
1022-
1023-
/**
1024-
* A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)
1025-
*/
1026-
export type NonAsciiStringæøåÆøÅöôêÊ字符串Writable = string;
1027-
1028-
/**
1029-
* This is a simple file
1030-
*/
1031-
export type SimpleFileWritable = Blob | File;
1032-
1033-
/**
1034-
* This is a simple string
1035-
*/
1036-
export type SimpleStringWithPatternWritable = string | null;
1037-
1038-
/**
1039-
* This is a simple enum with strings
1040-
*/
1041-
export type EnumWithStringsWritable = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串';
1042-
1043-
export type EnumWithReplacedCharactersWritable = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | '';
1044-
1045-
/**
1046-
* This is a simple enum with numbers
1047-
*/
1048-
export type EnumWithNumbersWritable = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3;
1049-
1050-
/**
1051-
* Success=1,Warning=2,Error=3
1052-
*/
1053-
export type EnumFromDescriptionWritable = number;
1054-
1055-
/**
1056-
* This is a simple enum with numbers
1057-
*/
1058-
export type EnumWithExtensionsWritable = 200 | 400 | 500;
1059-
1060-
export type EnumWithXEnumNamesWritable = 0 | 1 | 2;
1061-
1062-
/**
1063-
* This is a simple array with numbers
1064-
*/
1065-
export type ArrayWithNumbersWritable = Array<number>;
1066-
1067-
/**
1068-
* This is a simple array with booleans
1069-
*/
1070-
export type ArrayWithBooleansWritable = Array<boolean>;
1071-
1072-
/**
1073-
* This is a simple array with strings
1074-
*/
1075-
export type ArrayWithStringsWritable = Array<string>;
1076-
1077-
/**
1078-
* This is a string dictionary
1079-
*/
1080-
export type DictionaryWithStringWritable = {
1081-
[key: string]: string;
1082-
};
1083-
1084-
/**
1085-
* This is a string dictionary
1086-
*/
1087-
export type DictionaryWithDictionaryWritable = {
1088-
[key: string]: {
1089-
[key: string]: string;
1090-
};
1091-
};
1092-
1093-
/**
1094-
* `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)
1095-
*/
1096-
export type ModelFromZendeskWritable = string;
1097-
1098-
/**
1099-
* This is a model with one property containing an array
1100-
*/
1101-
export type ModelWithArrayReadOnlyAndWriteOnlyWritable = {
1102-
prop?: Array<ModelWithReadOnlyAndWriteOnlyWritable>;
1103-
propWithFile?: Array<Blob | File>;
1104-
propWithNumber?: Array<number>;
1105-
};
1106-
1107-
export type _3eNum1ПериодWritable = 'Bird' | 'Dog';
1108-
1109-
export type ConstValueWritable = 'ConstValue';
1110-
1111-
/**
1112-
* This is a free-form object without additionalProperties.
958+
* This is a model with one nested property
1113959
*/
1114-
export type FreeFormObjectWithoutAdditionalPropertiesWritable = {
1115-
[key: string]: unknown;
960+
export type ModelWithPropertiesWritable = {
961+
required: string;
962+
requiredAndNullable: string | null;
963+
string?: string;
964+
number?: number;
965+
boolean?: boolean;
966+
reference?: ModelWithString;
967+
'property with space'?: string;
968+
default?: string;
969+
try?: string;
1116970
};
1117971

1118972
/**
1119-
* This is a free-form object with additionalProperties: true.
973+
* This is a model that contains a some patterns
1120974
*/
1121-
export type FreeFormObjectWithAdditionalPropertiesEqTrueWritable = {
1122-
[key: string]: unknown;
975+
export type ModelWithPatternWritable = {
976+
key: string;
977+
name: string;
978+
id?: string;
979+
text?: string;
980+
patternWithSingleQuotes?: string;
981+
patternWithNewline?: string;
982+
patternWithBacktick?: string;
1123983
};
1124984

1125-
/**
1126-
* This is a free-form object with additionalProperties: {}.
1127-
*/
1128-
export type FreeFormObjectWithAdditionalPropertiesEqEmptyObjectWritable = {
1129-
[key: string]: unknown;
985+
export type FileWritable = {
986+
/**
987+
* Mime
988+
*/
989+
mime: string;
1130990
};
1131991

1132-
/**
1133-
* Some % character
1134-
*/
1135-
export type CharactersInDescriptionWritable = string;
1136-
1137-
export type ModelWithNestedArrayEnumsDataFooWritable = 'foo' | 'bar';
1138-
1139-
export type ModelWithNestedArrayEnumsDataBarWritable = 'baz' | 'qux';
1140-
1141992
export type ModelWithReadOnlyAndWriteOnlyWritable = {
1142993
foo: string;
1143994
baz: string;
1144995
};
1145996

1146-
export type ModelWithConstantSizeArrayWritable = [
1147-
number,
1148-
number
1149-
];
1150-
1151-
export type ModelWithAnyOfConstantSizeArrayWritable = [
1152-
number | string,
1153-
number | string,
1154-
number | string
1155-
];
1156-
1157-
export type ModelWithAnyOfConstantSizeArrayNullableWritable = [
1158-
number | null | string,
1159-
number | null | string,
1160-
number | null | string
1161-
];
1162-
1163-
export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [
1164-
number | ImportWritable,
1165-
number | ImportWritable
1166-
];
1167-
1168-
export type ModelWithAnyOfConstantSizeArrayAndIntersectWritable = [
1169-
number & string,
1170-
number & string
1171-
];
1172-
1173-
/**
1174-
* Model used to test deduplication strategy (unused)
1175-
*/
1176-
export type ParameterSimpleParameterUnusedWritable = string;
1177-
1178-
/**
1179-
* Model used to test deduplication strategy
1180-
*/
1181-
export type PostServiceWithEmptyTagResponseWritable = string;
1182-
1183-
/**
1184-
* Model used to test deduplication strategy
1185-
*/
1186-
export type PostServiceWithEmptyTagResponse2Writable = string;
1187-
1188-
/**
1189-
* Model used to test deduplication strategy
1190-
*/
1191-
export type DeleteFooDataWritable = string;
1192-
1193-
/**
1194-
* Model used to test deduplication strategy
1195-
*/
1196-
export type DeleteFooData2Writable = string;
1197-
1198-
/**
1199-
* Model with restricted keyword name
1200-
*/
1201-
export type ImportWritable = string;
1202-
1203997
export type AdditionalPropertiesUnknownIssueWritable = {
1204998
[key: string]: string | number;
1205999
};
12061000

1207-
export type AdditionalPropertiesUnknownIssue2Writable = {
1208-
[key: string]: string | number;
1001+
export type GenericSchemaDuplicateIssue1SystemBooleanWritable = {
1002+
item?: boolean;
1003+
error?: string | null;
1004+
data?: {
1005+
[key: string]: never;
1006+
};
12091007
};
12101008

1211-
export type OneOfAllOfIssueWritable = ((ConstValueWritable | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;
1009+
export type GenericSchemaDuplicateIssue1SystemStringWritable = {
1010+
item?: string | null;
1011+
error?: string | null;
1012+
};
12121013

12131014
/**
12141015
* This is a reusable parameter
@@ -1246,7 +1047,7 @@ export type PatchApiVbyApiVersionNoTagResponses = {
12461047
};
12471048

12481049
export type ImportData = {
1249-
body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;
1050+
body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnly;
12501051
path?: never;
12511052
query?: never;
12521053
url: '/api/v{api-version}/no+tag';
@@ -1469,8 +1270,8 @@ export type CallWithParametersData = {
14691270
'api-version': string | null;
14701271
};
14711272
query: {
1472-
foo_ref_enum?: ModelWithNestedArrayEnumsDataFooWritable;
1473-
foo_all_of_enum: ModelWithNestedArrayEnumsDataFooWritable;
1273+
foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;
1274+
foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;
14741275
/**
14751276
* This is the parameter that goes into the query params
14761277
*/
@@ -2225,7 +2026,7 @@ export type NonAsciiæøåÆøÅöôêÊ字符串Responses = {
22252026
export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];
22262027

22272028
export type PutWithFormUrlEncodedData = {
2228-
body: ArrayWithStringsWritable;
2029+
body: ArrayWithStrings;
22292030
path?: never;
22302031
query?: never;
22312032
url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';

0 commit comments

Comments
 (0)