@fern-api/fern-api-dev 5.121.1 → 5.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +1057 -313
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -54577,12 +54577,20 @@ var init_ProtobufTypeSchema = __esm({
|
|
|
54577
54577
|
}
|
|
54578
54578
|
});
|
|
54579
54579
|
|
|
54580
|
+
// ../fern-definition/schema/lib/schemas/api/resources/encoding/types/XmlEncodingSchema.js
|
|
54581
|
+
var init_XmlEncodingSchema = __esm({
|
|
54582
|
+
"../fern-definition/schema/lib/schemas/api/resources/encoding/types/XmlEncodingSchema.js"() {
|
|
54583
|
+
"use strict";
|
|
54584
|
+
}
|
|
54585
|
+
});
|
|
54586
|
+
|
|
54580
54587
|
// ../fern-definition/schema/lib/schemas/api/resources/encoding/types/index.js
|
|
54581
54588
|
var init_types5 = __esm({
|
|
54582
54589
|
"../fern-definition/schema/lib/schemas/api/resources/encoding/types/index.js"() {
|
|
54583
54590
|
"use strict";
|
|
54584
54591
|
init_EncodingSchema();
|
|
54585
54592
|
init_ProtobufTypeSchema();
|
|
54593
|
+
init_XmlEncodingSchema();
|
|
54586
54594
|
}
|
|
54587
54595
|
});
|
|
54588
54596
|
|
|
@@ -59099,6 +59107,24 @@ var init_ProtobufTypeSchema2 = __esm({
|
|
|
59099
59107
|
}
|
|
59100
59108
|
});
|
|
59101
59109
|
|
|
59110
|
+
// ../fern-definition/schema/lib/schemas/serialization/resources/encoding/types/XmlEncodingSchema.js
|
|
59111
|
+
var XmlEncodingSchema;
|
|
59112
|
+
var init_XmlEncodingSchema2 = __esm({
|
|
59113
|
+
"../fern-definition/schema/lib/schemas/serialization/resources/encoding/types/XmlEncodingSchema.js"() {
|
|
59114
|
+
"use strict";
|
|
59115
|
+
init_core();
|
|
59116
|
+
XmlEncodingSchema = schemas_exports.object({
|
|
59117
|
+
name: schemas_exports.string().optional(),
|
|
59118
|
+
namespace: schemas_exports.string().optional(),
|
|
59119
|
+
prefix: schemas_exports.string().optional(),
|
|
59120
|
+
attribute: schemas_exports.boolean().optional(),
|
|
59121
|
+
text: schemas_exports.boolean().optional(),
|
|
59122
|
+
wrapped: schemas_exports.boolean().optional(),
|
|
59123
|
+
separator: schemas_exports.string().optional()
|
|
59124
|
+
});
|
|
59125
|
+
}
|
|
59126
|
+
});
|
|
59127
|
+
|
|
59102
59128
|
// ../fern-definition/schema/lib/schemas/serialization/resources/encoding/types/EncodingSchema.js
|
|
59103
59129
|
var EncodingSchema;
|
|
59104
59130
|
var init_EncodingSchema2 = __esm({
|
|
@@ -59106,8 +59132,10 @@ var init_EncodingSchema2 = __esm({
|
|
|
59106
59132
|
"use strict";
|
|
59107
59133
|
init_core();
|
|
59108
59134
|
init_ProtobufTypeSchema2();
|
|
59135
|
+
init_XmlEncodingSchema2();
|
|
59109
59136
|
EncodingSchema = schemas_exports.object({
|
|
59110
|
-
proto: ProtobufTypeSchema.optional()
|
|
59137
|
+
proto: ProtobufTypeSchema.optional(),
|
|
59138
|
+
xml: XmlEncodingSchema.optional()
|
|
59111
59139
|
});
|
|
59112
59140
|
}
|
|
59113
59141
|
});
|
|
@@ -59118,6 +59146,7 @@ var init_types25 = __esm({
|
|
|
59118
59146
|
"use strict";
|
|
59119
59147
|
init_EncodingSchema2();
|
|
59120
59148
|
init_ProtobufTypeSchema2();
|
|
59149
|
+
init_XmlEncodingSchema2();
|
|
59121
59150
|
}
|
|
59122
59151
|
});
|
|
59123
59152
|
|
|
@@ -59125,7 +59154,8 @@ var init_types25 = __esm({
|
|
|
59125
59154
|
var encoding_exports2 = {};
|
|
59126
59155
|
__export(encoding_exports2, {
|
|
59127
59156
|
EncodingSchema: () => EncodingSchema,
|
|
59128
|
-
ProtobufTypeSchema: () => ProtobufTypeSchema
|
|
59157
|
+
ProtobufTypeSchema: () => ProtobufTypeSchema,
|
|
59158
|
+
XmlEncodingSchema: () => XmlEncodingSchema
|
|
59129
59159
|
});
|
|
59130
59160
|
var init_encoding2 = __esm({
|
|
59131
59161
|
"../fern-definition/schema/lib/schemas/serialization/resources/encoding/index.js"() {
|
|
@@ -62073,6 +62103,7 @@ __export(serialization_exports, {
|
|
|
62073
62103
|
WithName: () => WithName,
|
|
62074
62104
|
WithPlaygroundDocsSchema: () => WithPlaygroundDocsSchema,
|
|
62075
62105
|
WithValidation: () => WithValidation,
|
|
62106
|
+
XmlEncodingSchema: () => XmlEncodingSchema,
|
|
62076
62107
|
auth: () => auth_exports2,
|
|
62077
62108
|
availability: () => availability_exports2,
|
|
62078
62109
|
commons: () => commons_exports2,
|
|
@@ -70429,6 +70460,54 @@ var init_UuidType = __esm({
|
|
|
70429
70460
|
}
|
|
70430
70461
|
});
|
|
70431
70462
|
|
|
70463
|
+
// ../../ir-sdk/lib/sdk/api/resources/types/types/XmlEncoding.js
|
|
70464
|
+
var init_XmlEncoding = __esm({
|
|
70465
|
+
"../../ir-sdk/lib/sdk/api/resources/types/types/XmlEncoding.js"() {
|
|
70466
|
+
"use strict";
|
|
70467
|
+
}
|
|
70468
|
+
});
|
|
70469
|
+
|
|
70470
|
+
// ../../ir-sdk/lib/sdk/api/resources/types/types/XmlPropertyEncoding.js
|
|
70471
|
+
var init_XmlPropertyEncoding = __esm({
|
|
70472
|
+
"../../ir-sdk/lib/sdk/api/resources/types/types/XmlPropertyEncoding.js"() {
|
|
70473
|
+
"use strict";
|
|
70474
|
+
}
|
|
70475
|
+
});
|
|
70476
|
+
|
|
70477
|
+
// ../../ir-sdk/lib/sdk/api/resources/types/types/XmlPropertyKind.js
|
|
70478
|
+
var XmlPropertyKindValues, XmlPropertyKind;
|
|
70479
|
+
var init_XmlPropertyKind = __esm({
|
|
70480
|
+
"../../ir-sdk/lib/sdk/api/resources/types/types/XmlPropertyKind.js"() {
|
|
70481
|
+
"use strict";
|
|
70482
|
+
XmlPropertyKindValues = {
|
|
70483
|
+
/**
|
|
70484
|
+
* Serialized as an attribute on the parent element. */
|
|
70485
|
+
Attribute: "ATTRIBUTE",
|
|
70486
|
+
/**
|
|
70487
|
+
* Serialized as the text content of the parent element. */
|
|
70488
|
+
Text: "TEXT",
|
|
70489
|
+
/**
|
|
70490
|
+
* Serialized as a child element (or ordered list of child elements). */
|
|
70491
|
+
Element: "ELEMENT"
|
|
70492
|
+
};
|
|
70493
|
+
XmlPropertyKind = {
|
|
70494
|
+
...XmlPropertyKindValues,
|
|
70495
|
+
_visit: (value2, visitor) => {
|
|
70496
|
+
switch (value2) {
|
|
70497
|
+
case XmlPropertyKind.Attribute:
|
|
70498
|
+
return visitor.attribute();
|
|
70499
|
+
case XmlPropertyKind.Text:
|
|
70500
|
+
return visitor.text();
|
|
70501
|
+
case XmlPropertyKind.Element:
|
|
70502
|
+
return visitor.element();
|
|
70503
|
+
default:
|
|
70504
|
+
return visitor._other();
|
|
70505
|
+
}
|
|
70506
|
+
}
|
|
70507
|
+
};
|
|
70508
|
+
}
|
|
70509
|
+
});
|
|
70510
|
+
|
|
70432
70511
|
// ../../ir-sdk/lib/sdk/api/resources/types/types/index.js
|
|
70433
70512
|
var init_types66 = __esm({
|
|
70434
70513
|
"../../ir-sdk/lib/sdk/api/resources/types/types/index.js"() {
|
|
@@ -70514,6 +70593,9 @@ var init_types66 = __esm({
|
|
|
70514
70593
|
init_UnionDiscriminatorContext3();
|
|
70515
70594
|
init_UnionTypeDeclaration();
|
|
70516
70595
|
init_UuidType();
|
|
70596
|
+
init_XmlEncoding();
|
|
70597
|
+
init_XmlPropertyEncoding();
|
|
70598
|
+
init_XmlPropertyKind();
|
|
70517
70599
|
}
|
|
70518
70600
|
});
|
|
70519
70601
|
|
|
@@ -70537,7 +70619,8 @@ __export(types_exports4, {
|
|
|
70537
70619
|
Source: () => Source,
|
|
70538
70620
|
Type: () => Type,
|
|
70539
70621
|
TypeReference: () => TypeReference2,
|
|
70540
|
-
UnionDiscriminatorContext: () => UnionDiscriminatorContext3
|
|
70622
|
+
UnionDiscriminatorContext: () => UnionDiscriminatorContext3,
|
|
70623
|
+
XmlPropertyKind: () => XmlPropertyKind
|
|
70541
70624
|
});
|
|
70542
70625
|
var init_types67 = __esm({
|
|
70543
70626
|
"../../ir-sdk/lib/sdk/api/resources/types/index.js"() {
|
|
@@ -71455,6 +71538,7 @@ __export(api_exports, {
|
|
|
71455
71538
|
WebhookSignatureVerification: () => WebhookSignatureVerification,
|
|
71456
71539
|
WebhookTimestampFormat: () => WebhookTimestampFormat,
|
|
71457
71540
|
WellKnownProtobufType: () => WellKnownProtobufType,
|
|
71541
|
+
XmlPropertyKind: () => XmlPropertyKind,
|
|
71458
71542
|
audience: () => audience_exports,
|
|
71459
71543
|
auth: () => auth_exports3,
|
|
71460
71544
|
commons: () => commons_exports3,
|
|
@@ -73912,6 +73996,32 @@ var init_ObjectPropertyAccess5 = __esm({
|
|
|
73912
73996
|
}
|
|
73913
73997
|
});
|
|
73914
73998
|
|
|
73999
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlPropertyKind.js
|
|
74000
|
+
var XmlPropertyKind2;
|
|
74001
|
+
var init_XmlPropertyKind2 = __esm({
|
|
74002
|
+
"../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlPropertyKind.js"() {
|
|
74003
|
+
"use strict";
|
|
74004
|
+
init_core2();
|
|
74005
|
+
XmlPropertyKind2 = schemas_exports3.enum_(["ATTRIBUTE", "TEXT", "ELEMENT"]);
|
|
74006
|
+
}
|
|
74007
|
+
});
|
|
74008
|
+
|
|
74009
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlPropertyEncoding.js
|
|
74010
|
+
var XmlPropertyEncoding;
|
|
74011
|
+
var init_XmlPropertyEncoding2 = __esm({
|
|
74012
|
+
"../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlPropertyEncoding.js"() {
|
|
74013
|
+
"use strict";
|
|
74014
|
+
init_core2();
|
|
74015
|
+
init_XmlPropertyKind2();
|
|
74016
|
+
XmlPropertyEncoding = schemas_exports3.objectWithoutOptionalProperties({
|
|
74017
|
+
kind: XmlPropertyKind2,
|
|
74018
|
+
name: schemas_exports3.string().optional(),
|
|
74019
|
+
wrapped: schemas_exports3.boolean().optional(),
|
|
74020
|
+
listSeparator: schemas_exports3.string().optional()
|
|
74021
|
+
});
|
|
74022
|
+
}
|
|
74023
|
+
});
|
|
74024
|
+
|
|
73915
74025
|
// ../../ir-sdk/lib/sdk/serialization/resources/types/types/ObjectProperty.js
|
|
73916
74026
|
var ObjectProperty;
|
|
73917
74027
|
var init_ObjectProperty2 = __esm({
|
|
@@ -73923,12 +74033,14 @@ var init_ObjectProperty2 = __esm({
|
|
|
73923
74033
|
init_NameAndWireValueOrString3();
|
|
73924
74034
|
init_V2SchemaExamples2();
|
|
73925
74035
|
init_ObjectPropertyAccess5();
|
|
74036
|
+
init_XmlPropertyEncoding2();
|
|
73926
74037
|
ObjectProperty = schemas_exports3.objectWithoutOptionalProperties({
|
|
73927
74038
|
name: NameAndWireValueOrString,
|
|
73928
74039
|
valueType: schemas_exports3.lazy(() => TypeReference3),
|
|
73929
74040
|
propertyAccess: ObjectPropertyAccess5.optional(),
|
|
73930
74041
|
defaultValue: schemas_exports3.unknown().optional(),
|
|
73931
|
-
v2Examples: V2SchemaExamples.optional()
|
|
74042
|
+
v2Examples: V2SchemaExamples.optional(),
|
|
74043
|
+
xml: XmlPropertyEncoding.optional()
|
|
73932
74044
|
}).extend(Declaration);
|
|
73933
74045
|
}
|
|
73934
74046
|
});
|
|
@@ -80024,6 +80136,20 @@ var init_ProtoEncoding2 = __esm({
|
|
|
80024
80136
|
}
|
|
80025
80137
|
});
|
|
80026
80138
|
|
|
80139
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlEncoding.js
|
|
80140
|
+
var XmlEncoding;
|
|
80141
|
+
var init_XmlEncoding2 = __esm({
|
|
80142
|
+
"../../ir-sdk/lib/sdk/serialization/resources/types/types/XmlEncoding.js"() {
|
|
80143
|
+
"use strict";
|
|
80144
|
+
init_core2();
|
|
80145
|
+
XmlEncoding = schemas_exports3.objectWithoutOptionalProperties({
|
|
80146
|
+
name: schemas_exports3.string(),
|
|
80147
|
+
namespace: schemas_exports3.string().optional(),
|
|
80148
|
+
prefix: schemas_exports3.string().optional()
|
|
80149
|
+
});
|
|
80150
|
+
}
|
|
80151
|
+
});
|
|
80152
|
+
|
|
80027
80153
|
// ../../ir-sdk/lib/sdk/serialization/resources/types/types/Encoding.js
|
|
80028
80154
|
var Encoding;
|
|
80029
80155
|
var init_Encoding2 = __esm({
|
|
@@ -80032,9 +80158,11 @@ var init_Encoding2 = __esm({
|
|
|
80032
80158
|
init_core2();
|
|
80033
80159
|
init_JsonEncoding2();
|
|
80034
80160
|
init_ProtoEncoding2();
|
|
80161
|
+
init_XmlEncoding2();
|
|
80035
80162
|
Encoding = schemas_exports3.objectWithoutOptionalProperties({
|
|
80036
80163
|
json: JsonEncoding.optional(),
|
|
80037
|
-
proto: ProtoEncoding.optional()
|
|
80164
|
+
proto: ProtoEncoding.optional(),
|
|
80165
|
+
xml: XmlEncoding.optional()
|
|
80038
80166
|
});
|
|
80039
80167
|
}
|
|
80040
80168
|
});
|
|
@@ -83516,6 +83644,9 @@ var init_types95 = __esm({
|
|
|
83516
83644
|
init_UnionDiscriminatorContext4();
|
|
83517
83645
|
init_UnionTypeDeclaration2();
|
|
83518
83646
|
init_UuidType2();
|
|
83647
|
+
init_XmlEncoding2();
|
|
83648
|
+
init_XmlPropertyEncoding2();
|
|
83649
|
+
init_XmlPropertyKind2();
|
|
83519
83650
|
}
|
|
83520
83651
|
});
|
|
83521
83652
|
|
|
@@ -83602,7 +83733,10 @@ __export(types_exports6, {
|
|
|
83602
83733
|
UndiscriminatedUnionTypeDeclaration: () => UndiscriminatedUnionTypeDeclaration,
|
|
83603
83734
|
UnionDiscriminatorContext: () => UnionDiscriminatorContext4,
|
|
83604
83735
|
UnionTypeDeclaration: () => UnionTypeDeclaration,
|
|
83605
|
-
UuidType: () => UuidType
|
|
83736
|
+
UuidType: () => UuidType,
|
|
83737
|
+
XmlEncoding: () => XmlEncoding,
|
|
83738
|
+
XmlPropertyEncoding: () => XmlPropertyEncoding,
|
|
83739
|
+
XmlPropertyKind: () => XmlPropertyKind2
|
|
83606
83740
|
});
|
|
83607
83741
|
var init_types96 = __esm({
|
|
83608
83742
|
"../../ir-sdk/lib/sdk/serialization/resources/types/index.js"() {
|
|
@@ -84140,6 +84274,9 @@ __export(serialization_exports2, {
|
|
|
84140
84274
|
WithDocsAndAvailability: () => WithDocsAndAvailability,
|
|
84141
84275
|
WithJsonExample: () => WithJsonExample,
|
|
84142
84276
|
WithV2Examples: () => WithV2Examples,
|
|
84277
|
+
XmlEncoding: () => XmlEncoding,
|
|
84278
|
+
XmlPropertyEncoding: () => XmlPropertyEncoding,
|
|
84279
|
+
XmlPropertyKind: () => XmlPropertyKind2,
|
|
84143
84280
|
audience: () => audience_exports2,
|
|
84144
84281
|
auth: () => auth_exports5,
|
|
84145
84282
|
commons: () => commons_exports5,
|
|
@@ -132868,10 +133005,21 @@ var init_Encoding3 = __esm({
|
|
|
132868
133005
|
}
|
|
132869
133006
|
};
|
|
132870
133007
|
},
|
|
133008
|
+
xml: (value2) => {
|
|
133009
|
+
return {
|
|
133010
|
+
...value2,
|
|
133011
|
+
type: "xml",
|
|
133012
|
+
_visit: function(visitor) {
|
|
133013
|
+
return Encoding2._visit(this, visitor);
|
|
133014
|
+
}
|
|
133015
|
+
};
|
|
133016
|
+
},
|
|
132871
133017
|
_visit: (value2, visitor) => {
|
|
132872
133018
|
switch (value2.type) {
|
|
132873
133019
|
case "protobuf":
|
|
132874
133020
|
return visitor.protobuf(value2);
|
|
133021
|
+
case "xml":
|
|
133022
|
+
return visitor.xml(value2);
|
|
132875
133023
|
default:
|
|
132876
133024
|
return visitor._other(value2);
|
|
132877
133025
|
}
|
|
@@ -133187,6 +133335,20 @@ var init_WithTitle = __esm({
|
|
|
133187
133335
|
}
|
|
133188
133336
|
});
|
|
133189
133337
|
|
|
133338
|
+
// ../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/XmlEncoding.js
|
|
133339
|
+
var init_XmlEncoding3 = __esm({
|
|
133340
|
+
"../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/XmlEncoding.js"() {
|
|
133341
|
+
"use strict";
|
|
133342
|
+
}
|
|
133343
|
+
});
|
|
133344
|
+
|
|
133345
|
+
// ../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/XmlPropertyEncoding.js
|
|
133346
|
+
var init_XmlPropertyEncoding3 = __esm({
|
|
133347
|
+
"../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/XmlPropertyEncoding.js"() {
|
|
133348
|
+
"use strict";
|
|
133349
|
+
}
|
|
133350
|
+
});
|
|
133351
|
+
|
|
133190
133352
|
// ../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/index.js
|
|
133191
133353
|
var init_types136 = __esm({
|
|
133192
133354
|
"../api-importers/openapi/openapi-ir/lib/sdk/api/resources/commons/types/index.js"() {
|
|
@@ -133224,6 +133386,8 @@ var init_types136 = __esm({
|
|
|
133224
133386
|
init_WithSource();
|
|
133225
133387
|
init_WithStatusCode();
|
|
133226
133388
|
init_WithTitle();
|
|
133389
|
+
init_XmlEncoding3();
|
|
133390
|
+
init_XmlPropertyEncoding3();
|
|
133227
133391
|
}
|
|
133228
133392
|
});
|
|
133229
133393
|
|
|
@@ -138526,6 +138690,20 @@ var init_ProtobufEncoding2 = __esm({
|
|
|
138526
138690
|
}
|
|
138527
138691
|
});
|
|
138528
138692
|
|
|
138693
|
+
// ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/XmlEncoding.js
|
|
138694
|
+
var XmlEncoding2;
|
|
138695
|
+
var init_XmlEncoding4 = __esm({
|
|
138696
|
+
"../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/XmlEncoding.js"() {
|
|
138697
|
+
"use strict";
|
|
138698
|
+
init_core7();
|
|
138699
|
+
XmlEncoding2 = schemas_exports9.objectWithoutOptionalProperties({
|
|
138700
|
+
name: schemas_exports9.string(),
|
|
138701
|
+
namespace: schemas_exports9.string().optional(),
|
|
138702
|
+
prefix: schemas_exports9.string().optional()
|
|
138703
|
+
});
|
|
138704
|
+
}
|
|
138705
|
+
});
|
|
138706
|
+
|
|
138529
138707
|
// ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/Encoding.js
|
|
138530
138708
|
var Encoding3;
|
|
138531
138709
|
var init_Encoding4 = __esm({
|
|
@@ -138534,13 +138712,17 @@ var init_Encoding4 = __esm({
|
|
|
138534
138712
|
init_api6();
|
|
138535
138713
|
init_core7();
|
|
138536
138714
|
init_ProtobufEncoding2();
|
|
138715
|
+
init_XmlEncoding4();
|
|
138537
138716
|
Encoding3 = schemas_exports9.union("type", {
|
|
138538
|
-
protobuf: ProtobufEncoding
|
|
138717
|
+
protobuf: ProtobufEncoding,
|
|
138718
|
+
xml: XmlEncoding2
|
|
138539
138719
|
}).transform({
|
|
138540
138720
|
transform: (value2) => {
|
|
138541
138721
|
switch (value2.type) {
|
|
138542
138722
|
case "protobuf":
|
|
138543
138723
|
return Encoding2.protobuf(value2);
|
|
138724
|
+
case "xml":
|
|
138725
|
+
return Encoding2.xml(value2);
|
|
138544
138726
|
default:
|
|
138545
138727
|
return value2;
|
|
138546
138728
|
}
|
|
@@ -139018,6 +139200,22 @@ var init_WithStatusCode2 = __esm({
|
|
|
139018
139200
|
}
|
|
139019
139201
|
});
|
|
139020
139202
|
|
|
139203
|
+
// ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/XmlPropertyEncoding.js
|
|
139204
|
+
var XmlPropertyEncoding2;
|
|
139205
|
+
var init_XmlPropertyEncoding4 = __esm({
|
|
139206
|
+
"../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/XmlPropertyEncoding.js"() {
|
|
139207
|
+
"use strict";
|
|
139208
|
+
init_core7();
|
|
139209
|
+
XmlPropertyEncoding2 = schemas_exports9.objectWithoutOptionalProperties({
|
|
139210
|
+
name: schemas_exports9.string().optional(),
|
|
139211
|
+
attribute: schemas_exports9.boolean().optional(),
|
|
139212
|
+
text: schemas_exports9.boolean().optional(),
|
|
139213
|
+
wrapped: schemas_exports9.boolean().optional(),
|
|
139214
|
+
separator: schemas_exports9.string().optional()
|
|
139215
|
+
});
|
|
139216
|
+
}
|
|
139217
|
+
});
|
|
139218
|
+
|
|
139021
139219
|
// ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/index.js
|
|
139022
139220
|
var init_types140 = __esm({
|
|
139023
139221
|
"../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/types/index.js"() {
|
|
@@ -139055,6 +139253,8 @@ var init_types140 = __esm({
|
|
|
139055
139253
|
init_WithSource2();
|
|
139056
139254
|
init_WithStatusCode2();
|
|
139057
139255
|
init_WithTitle2();
|
|
139256
|
+
init_XmlEncoding4();
|
|
139257
|
+
init_XmlPropertyEncoding4();
|
|
139058
139258
|
}
|
|
139059
139259
|
});
|
|
139060
139260
|
|
|
@@ -139093,7 +139293,9 @@ __export(commons_exports10, {
|
|
|
139093
139293
|
WithSdkMethodName: () => WithSdkMethodName,
|
|
139094
139294
|
WithSource: () => WithSource,
|
|
139095
139295
|
WithStatusCode: () => WithStatusCode,
|
|
139096
|
-
WithTitle: () => WithTitle
|
|
139296
|
+
WithTitle: () => WithTitle,
|
|
139297
|
+
XmlEncoding: () => XmlEncoding2,
|
|
139298
|
+
XmlPropertyEncoding: () => XmlPropertyEncoding2
|
|
139097
139299
|
});
|
|
139098
139300
|
var init_commons10 = __esm({
|
|
139099
139301
|
"../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/commons/index.js"() {
|
|
@@ -140903,6 +141105,7 @@ var init_ObjectProperty4 = __esm({
|
|
|
140903
141105
|
init_serialization5();
|
|
140904
141106
|
init_SchemaId2();
|
|
140905
141107
|
init_WithAvailability6();
|
|
141108
|
+
init_XmlPropertyEncoding4();
|
|
140906
141109
|
init_ObjectPropertyConflictInfo2();
|
|
140907
141110
|
ObjectProperty2 = schemas_exports9.objectWithoutOptionalProperties({
|
|
140908
141111
|
key: schemas_exports9.string(),
|
|
@@ -140912,7 +141115,8 @@ var init_ObjectProperty4 = __esm({
|
|
|
140912
141115
|
conflict: schemas_exports9.record(SchemaId, ObjectPropertyConflictInfo),
|
|
140913
141116
|
generatedName: schemas_exports9.string(),
|
|
140914
141117
|
nameOverride: schemas_exports9.string().optional(),
|
|
140915
|
-
audiences: schemas_exports9.list(schemas_exports9.string())
|
|
141118
|
+
audiences: schemas_exports9.list(schemas_exports9.string()),
|
|
141119
|
+
xml: XmlPropertyEncoding2.optional()
|
|
140916
141120
|
}).extend(WithAvailability3);
|
|
140917
141121
|
}
|
|
140918
141122
|
});
|
|
@@ -142366,6 +142570,7 @@ var init_ObjectPropertyWithExample2 = __esm({
|
|
|
142366
142570
|
init_serialization5();
|
|
142367
142571
|
init_SchemaId2();
|
|
142368
142572
|
init_WithAvailability6();
|
|
142573
|
+
init_XmlPropertyEncoding4();
|
|
142369
142574
|
init_ObjectPropertyConflictInfo2();
|
|
142370
142575
|
ObjectPropertyWithExample = schemas_exports9.objectWithoutOptionalProperties({
|
|
142371
142576
|
key: schemas_exports9.string(),
|
|
@@ -142375,7 +142580,8 @@ var init_ObjectPropertyWithExample2 = __esm({
|
|
|
142375
142580
|
audiences: schemas_exports9.list(schemas_exports9.string()),
|
|
142376
142581
|
conflict: schemas_exports9.record(SchemaId, ObjectPropertyConflictInfo),
|
|
142377
142582
|
nameOverride: schemas_exports9.string().optional(),
|
|
142378
|
-
generatedName: schemas_exports9.string()
|
|
142583
|
+
generatedName: schemas_exports9.string(),
|
|
142584
|
+
xml: XmlPropertyEncoding2.optional()
|
|
142379
142585
|
}).extend(WithAvailability3);
|
|
142380
142586
|
}
|
|
142381
142587
|
});
|
|
@@ -142921,6 +143127,8 @@ __export(serialization_exports5, {
|
|
|
142921
143127
|
WithSource: () => WithSource,
|
|
142922
143128
|
WithStatusCode: () => WithStatusCode,
|
|
142923
143129
|
WithTitle: () => WithTitle,
|
|
143130
|
+
XmlEncoding: () => XmlEncoding2,
|
|
143131
|
+
XmlPropertyEncoding: () => XmlPropertyEncoding2,
|
|
142924
143132
|
commons: () => commons_exports10,
|
|
142925
143133
|
example: () => example_exports2,
|
|
142926
143134
|
finalIr: () => finalIr_exports2,
|
|
@@ -143206,10 +143414,29 @@ function convertToEncodingSchema(encoding) {
|
|
|
143206
143414
|
type: encoding.typeName
|
|
143207
143415
|
}
|
|
143208
143416
|
};
|
|
143417
|
+
case "xml":
|
|
143418
|
+
return {
|
|
143419
|
+
xml: {
|
|
143420
|
+
name: encoding.name,
|
|
143421
|
+
namespace: encoding.namespace,
|
|
143422
|
+
prefix: encoding.prefix
|
|
143423
|
+
}
|
|
143424
|
+
};
|
|
143209
143425
|
default:
|
|
143210
|
-
assertNever(encoding
|
|
143426
|
+
assertNever(encoding);
|
|
143211
143427
|
}
|
|
143212
143428
|
}
|
|
143429
|
+
function convertXmlPropertyToEncodingSchema(xml2) {
|
|
143430
|
+
return {
|
|
143431
|
+
xml: {
|
|
143432
|
+
name: xml2.name,
|
|
143433
|
+
attribute: xml2.attribute,
|
|
143434
|
+
text: xml2.text,
|
|
143435
|
+
wrapped: xml2.wrapped,
|
|
143436
|
+
separator: xml2.separator
|
|
143437
|
+
}
|
|
143438
|
+
};
|
|
143439
|
+
}
|
|
143213
143440
|
var init_convertToEncodingSchema = __esm({
|
|
143214
143441
|
"../api-importers/openapi/openapi-ir-to-fern/lib/utils/convertToEncodingSchema.js"() {
|
|
143215
143442
|
"use strict";
|
|
@@ -144281,12 +144508,14 @@ function buildObjectTypeDeclaration({ schema, context: context3, declarationFile
|
|
|
144281
144508
|
const name3 = property24.nameOverride;
|
|
144282
144509
|
const availability = convertAvailability(property24.availability);
|
|
144283
144510
|
const propertyAccess = getPropertyAccess(property24);
|
|
144511
|
+
const encoding = property24.xml != null ? convertXmlPropertyToEncodingSchema(property24.xml) : void 0;
|
|
144284
144512
|
properties7[property24.key] = convertPropertyTypeReferenceToTypeDefinition({
|
|
144285
144513
|
typeReference: typeReference2,
|
|
144286
144514
|
audiences,
|
|
144287
144515
|
name: name3,
|
|
144288
144516
|
availability,
|
|
144289
|
-
propertyAccess
|
|
144517
|
+
propertyAccess,
|
|
144518
|
+
encoding
|
|
144290
144519
|
});
|
|
144291
144520
|
}
|
|
144292
144521
|
const propertiesToSetToUnknown = /* @__PURE__ */ new Set();
|
|
@@ -144705,8 +144934,8 @@ function getSchemaIdOfResolvedType({ schema, context: context3, namespace }) {
|
|
|
144705
144934
|
}
|
|
144706
144935
|
return schema;
|
|
144707
144936
|
}
|
|
144708
|
-
function convertPropertyTypeReferenceToTypeDefinition({ typeReference: typeReference2, audiences, name: name2, availability, propertyAccess }) {
|
|
144709
|
-
if (audiences.length === 0 && name2 == null && availability == null && propertyAccess == null) {
|
|
144937
|
+
function convertPropertyTypeReferenceToTypeDefinition({ typeReference: typeReference2, audiences, name: name2, availability, propertyAccess, encoding }) {
|
|
144938
|
+
if (audiences.length === 0 && name2 == null && availability == null && propertyAccess == null && encoding == null) {
|
|
144710
144939
|
return typeReference2;
|
|
144711
144940
|
} else {
|
|
144712
144941
|
return {
|
|
@@ -144714,7 +144943,8 @@ function convertPropertyTypeReferenceToTypeDefinition({ typeReference: typeRefer
|
|
|
144714
144943
|
...audiences.length > 0 ? { audiences } : {},
|
|
144715
144944
|
...name2 != null ? { name: name2 } : {},
|
|
144716
144945
|
...availability != null ? { availability } : {},
|
|
144717
|
-
...propertyAccess != null ? { access: propertyAccess } : {}
|
|
144946
|
+
...propertyAccess != null ? { access: propertyAccess } : {},
|
|
144947
|
+
...encoding != null ? { encoding } : {}
|
|
144718
144948
|
};
|
|
144719
144949
|
}
|
|
144720
144950
|
}
|
|
@@ -152872,6 +153102,24 @@ var init_fernExtensions = __esm({
|
|
|
152872
153102
|
* type: user.v1.User
|
|
152873
153103
|
*/
|
|
152874
153104
|
ENCODING: "x-fern-encoding",
|
|
153105
|
+
/**
|
|
153106
|
+
* On a property of an XML element schema (one declaring an OpenAPI `xml` object), marks the
|
|
153107
|
+
* property as the element's text content rather than an attribute or child element.
|
|
153108
|
+
*
|
|
153109
|
+
* Say:
|
|
153110
|
+
* xml:
|
|
153111
|
+
* name: Say
|
|
153112
|
+
* properties:
|
|
153113
|
+
* message:
|
|
153114
|
+
* type: string
|
|
153115
|
+
* x-fern-xml-text: true
|
|
153116
|
+
*/
|
|
153117
|
+
XML_TEXT: "x-fern-xml-text",
|
|
153118
|
+
/**
|
|
153119
|
+
* On a list-valued attribute or text property of an XML element schema, the string used to
|
|
153120
|
+
* join items into a single value (e.g. `" "` for space-delimited lists).
|
|
153121
|
+
*/
|
|
153122
|
+
XML_LIST_SEPARATOR: "x-fern-xml-list-separator",
|
|
152875
153123
|
/**
|
|
152876
153124
|
* Allows users to configure gRPC services. This must be specified on individual service
|
|
152877
153125
|
* declarations.
|
|
@@ -153964,6 +154212,40 @@ var init_convertAvailability2 = __esm({
|
|
|
153964
154212
|
}
|
|
153965
154213
|
});
|
|
153966
154214
|
|
|
154215
|
+
// ../api-importers/openapi/openapi-ir-parser/lib/schema/convertXml.js
|
|
154216
|
+
function getXmlEncoding({ schema, fallbackName }) {
|
|
154217
|
+
if (schema.xml == null) {
|
|
154218
|
+
return void 0;
|
|
154219
|
+
}
|
|
154220
|
+
return Encoding2.xml({
|
|
154221
|
+
name: schema.xml.name ?? fallbackName,
|
|
154222
|
+
namespace: schema.xml.namespace,
|
|
154223
|
+
prefix: schema.xml.prefix
|
|
154224
|
+
});
|
|
154225
|
+
}
|
|
154226
|
+
function getXmlPropertyEncoding({ propertySchema, resolvedPropertySchema }) {
|
|
154227
|
+
const inlineXml = "xml" in propertySchema ? propertySchema.xml : void 0;
|
|
154228
|
+
const xml2 = inlineXml ?? resolvedPropertySchema.xml;
|
|
154229
|
+
const text9 = getExtension(propertySchema, FernOpenAPIExtension.XML_TEXT) ?? getExtension(resolvedPropertySchema, FernOpenAPIExtension.XML_TEXT);
|
|
154230
|
+
const separator = getExtension(propertySchema, FernOpenAPIExtension.XML_LIST_SEPARATOR) ?? getExtension(resolvedPropertySchema, FernOpenAPIExtension.XML_LIST_SEPARATOR);
|
|
154231
|
+
const encoding = {
|
|
154232
|
+
name: xml2?.name,
|
|
154233
|
+
attribute: xml2?.attribute,
|
|
154234
|
+
text: text9 ?? void 0,
|
|
154235
|
+
wrapped: xml2?.wrapped,
|
|
154236
|
+
separator: separator ?? void 0
|
|
154237
|
+
};
|
|
154238
|
+
return Object.values(encoding).every((value2) => value2 == null) ? void 0 : encoding;
|
|
154239
|
+
}
|
|
154240
|
+
var init_convertXml = __esm({
|
|
154241
|
+
"../api-importers/openapi/openapi-ir-parser/lib/schema/convertXml.js"() {
|
|
154242
|
+
"use strict";
|
|
154243
|
+
init_lib13();
|
|
154244
|
+
init_getExtension();
|
|
154245
|
+
init_fernExtensions();
|
|
154246
|
+
}
|
|
154247
|
+
});
|
|
154248
|
+
|
|
153967
154249
|
// ../api-importers/openapi/openapi-ir-parser/lib/schema/utils/getBreadcrumbsFromReference.js
|
|
153968
154250
|
function getBreadcrumbsFromReference(reference4) {
|
|
153969
154251
|
let refUnderProcessing = reference4.split("/").map((breadcrumb) => breadcrumb.replace(/~1/g, "/"));
|
|
@@ -154361,6 +154643,7 @@ function convertToObjectProperty(objectProperty) {
|
|
|
154361
154643
|
conflict: objectProperty.conflict,
|
|
154362
154644
|
generatedName: objectProperty.generatedName,
|
|
154363
154645
|
key: objectProperty.key,
|
|
154646
|
+
xml: objectProperty.xml,
|
|
154364
154647
|
schema: convertSchemaWithExampleToSchema(objectProperty.schema),
|
|
154365
154648
|
audiences: objectProperty.audiences,
|
|
154366
154649
|
nameOverride: objectProperty.nameOverride,
|
|
@@ -154580,7 +154863,8 @@ function convertObject3({ nameOverride, generatedName, title: title2, breadcrumb
|
|
|
154580
154863
|
generatedName: generatedName2,
|
|
154581
154864
|
availability: availability2,
|
|
154582
154865
|
readonly: readonly2,
|
|
154583
|
-
writeonly
|
|
154866
|
+
writeonly,
|
|
154867
|
+
xml: encoding?.type === "xml" ? getXmlPropertyEncoding({ propertySchema, resolvedPropertySchema }) : void 0
|
|
154584
154868
|
};
|
|
154585
154869
|
});
|
|
154586
154870
|
convertedProperties.push(...inlinedParentProperties.map((property24) => {
|
|
@@ -154727,6 +155011,7 @@ var init_convertObject = __esm({
|
|
|
154727
155011
|
init_convertAdditionalProperties();
|
|
154728
155012
|
init_convertAvailability2();
|
|
154729
155013
|
init_convertSchemas();
|
|
155014
|
+
init_convertXml();
|
|
154730
155015
|
init_getBreadcrumbsFromReference();
|
|
154731
155016
|
init_getSchemaName();
|
|
154732
155017
|
init_isReferenceObject();
|
|
@@ -155201,12 +155486,19 @@ var init_convertDiscriminatedOneOf = __esm({
|
|
|
155201
155486
|
});
|
|
155202
155487
|
|
|
155203
155488
|
// ../api-importers/openapi/openapi-ir-parser/lib/schema/convertEncoding.js
|
|
155204
|
-
function convertEncoding(encodingSchema) {
|
|
155489
|
+
function convertEncoding({ encodingSchema, fallbackXmlName }) {
|
|
155205
155490
|
if (encodingSchema.proto != null) {
|
|
155206
155491
|
return Encoding2.protobuf({
|
|
155207
155492
|
typeName: encodingSchema.proto.type
|
|
155208
155493
|
});
|
|
155209
155494
|
}
|
|
155495
|
+
if (encodingSchema.xml != null) {
|
|
155496
|
+
return Encoding2.xml({
|
|
155497
|
+
name: encodingSchema.xml.name ?? fallbackXmlName,
|
|
155498
|
+
namespace: encodingSchema.xml.namespace,
|
|
155499
|
+
prefix: encodingSchema.xml.prefix
|
|
155500
|
+
});
|
|
155501
|
+
}
|
|
155210
155502
|
return void 0;
|
|
155211
155503
|
}
|
|
155212
155504
|
var init_convertEncoding = __esm({
|
|
@@ -156039,7 +156331,11 @@ function shouldResolveAlias(schemaId, schema, context3) {
|
|
|
156039
156331
|
}
|
|
156040
156332
|
function convertSchema2(schema, wrapAsOptional, wrapAsNullable, context3, breadcrumbs, fileSource, namespace, referencedAsRequest = false, propertiesToExclude = /* @__PURE__ */ new Set(), fallback2) {
|
|
156041
156333
|
const source2 = getSourceExtension(schema) ?? fileSource;
|
|
156042
|
-
const encoding = getEncoding({
|
|
156334
|
+
const encoding = getEncoding({
|
|
156335
|
+
schema,
|
|
156336
|
+
fallbackXmlName: getGeneratedTypeName(breadcrumbs, context3.options.preserveSchemaIds),
|
|
156337
|
+
logger: context3.logger
|
|
156338
|
+
});
|
|
156043
156339
|
let effectiveFallback = fallback2;
|
|
156044
156340
|
if (isReferenceObject(schema)) {
|
|
156045
156341
|
const siblingExample = getSiblingExampleFromRef(schema);
|
|
@@ -156969,7 +157265,7 @@ function convertSchemaObject(schema, wrapAsOptional, wrapAsNullable, context3, b
|
|
|
156969
157265
|
fullExamples,
|
|
156970
157266
|
additionalProperties: schema.additionalProperties,
|
|
156971
157267
|
availability,
|
|
156972
|
-
encoding,
|
|
157268
|
+
encoding: encoding ?? getXmlEncoding({ schema, fallbackName: nameOverride ?? generatedName }),
|
|
156973
157269
|
source: source2,
|
|
156974
157270
|
minProperties: schema.minProperties,
|
|
156975
157271
|
maxProperties: schema.maxProperties
|
|
@@ -157428,12 +157724,12 @@ function getProperty(object23, property24) {
|
|
|
157428
157724
|
}
|
|
157429
157725
|
return void 0;
|
|
157430
157726
|
}
|
|
157431
|
-
function getEncoding({ schema, logger: logger4 }) {
|
|
157727
|
+
function getEncoding({ schema, fallbackXmlName, logger: logger4 }) {
|
|
157432
157728
|
const encoding = getFernEncoding({ schema, logger: logger4 });
|
|
157433
157729
|
if (encoding == null) {
|
|
157434
157730
|
return void 0;
|
|
157435
157731
|
}
|
|
157436
|
-
return convertEncoding(encoding);
|
|
157732
|
+
return convertEncoding({ encodingSchema: encoding, fallbackXmlName });
|
|
157437
157733
|
}
|
|
157438
157734
|
var SCHEMA_REFERENCE_PREFIX, globalTitleCollisionTracker;
|
|
157439
157735
|
var init_convertSchemas = __esm({
|
|
@@ -157464,6 +157760,7 @@ var init_convertSchemas = __esm({
|
|
|
157464
157760
|
init_convertNumber();
|
|
157465
157761
|
init_convertObject();
|
|
157466
157762
|
init_convertUndiscriminatedOneOf();
|
|
157763
|
+
init_convertXml();
|
|
157467
157764
|
init_getDefault();
|
|
157468
157765
|
init_getExample();
|
|
157469
157766
|
init_inferDiscriminatorContext();
|
|
@@ -158473,7 +158770,7 @@ var init_ExampleTypeFactory = __esm({
|
|
|
158473
158770
|
let requiredProperties = {};
|
|
158474
158771
|
for (const property24 of object23.properties) {
|
|
158475
158772
|
const resolvedSchema = this.getResolvedSchema(property24.schema);
|
|
158476
|
-
if (resolvedSchema.type !== "optional"
|
|
158773
|
+
if (resolvedSchema.type !== "optional") {
|
|
158477
158774
|
requiredProperties[property24.key] = property24.schema;
|
|
158478
158775
|
}
|
|
158479
158776
|
}
|
|
@@ -158936,6 +159233,7 @@ function convertToObjectProperty2(objectProperty) {
|
|
|
158936
159233
|
conflict: objectProperty.conflict,
|
|
158937
159234
|
generatedName: objectProperty.generatedName,
|
|
158938
159235
|
key: objectProperty.key,
|
|
159236
|
+
xml: objectProperty.xml,
|
|
158939
159237
|
schema: convertSchemaToSchemaWithExample(objectProperty.schema),
|
|
158940
159238
|
audiences: objectProperty.audiences,
|
|
158941
159239
|
nameOverride: objectProperty.nameOverride,
|
|
@@ -159152,6 +159450,7 @@ function convertMultipartRequestToSchema(request7) {
|
|
|
159152
159450
|
schema: convertSchemaToSchemaWithExample(property24.schema.value),
|
|
159153
159451
|
audiences: [],
|
|
159154
159452
|
conflict: {},
|
|
159453
|
+
xml: void 0,
|
|
159155
159454
|
generatedName: property24.key,
|
|
159156
159455
|
nameOverride: void 0,
|
|
159157
159456
|
availability: void 0,
|
|
@@ -168048,7 +168347,8 @@ function convertWebhookOperation({ context: context3, operationContext, source:
|
|
|
168048
168347
|
conflict: {},
|
|
168049
168348
|
nameOverride: qp.parameterNameOverride,
|
|
168050
168349
|
generatedName: getGeneratedTypeName([...payloadBreadcrumbs, qp.name], context3.options.preserveSchemaIds),
|
|
168051
|
-
availability: qp.availability
|
|
168350
|
+
availability: qp.availability,
|
|
168351
|
+
xml: void 0
|
|
168052
168352
|
}));
|
|
168053
168353
|
const payload = SchemaWithExample.object({
|
|
168054
168354
|
description: operation.description,
|
|
@@ -268220,256 +268520,6 @@ var init_isTypeReferenceOptional = __esm({
|
|
|
268220
268520
|
}
|
|
268221
268521
|
});
|
|
268222
268522
|
|
|
268223
|
-
// ../../commons/ir-utils/lib/examples/v1/generateContainerExample.js
|
|
268224
|
-
function generateContainerExample({ fieldName, containerType, maxDepth, currentDepth, typeDeclarations, skipOptionalProperties, visitedTypes }) {
|
|
268225
|
-
if (currentDepth >= maxDepth) {
|
|
268226
|
-
return generateEmptyContainerExample({ containerType });
|
|
268227
|
-
}
|
|
268228
|
-
switch (containerType.type) {
|
|
268229
|
-
case "list": {
|
|
268230
|
-
const example = generateTypeReferenceExample({
|
|
268231
|
-
fieldName,
|
|
268232
|
-
typeReference: containerType.list,
|
|
268233
|
-
maxDepth,
|
|
268234
|
-
currentDepth: currentDepth + 1,
|
|
268235
|
-
typeDeclarations,
|
|
268236
|
-
skipOptionalProperties,
|
|
268237
|
-
visitedTypes
|
|
268238
|
-
});
|
|
268239
|
-
if (example.type === "failure") {
|
|
268240
|
-
return generateEmptyContainerExample({ containerType });
|
|
268241
|
-
}
|
|
268242
|
-
return {
|
|
268243
|
-
type: "success",
|
|
268244
|
-
example: ExampleContainer.list({
|
|
268245
|
-
list: [example.example, example.example],
|
|
268246
|
-
itemType: containerType.list
|
|
268247
|
-
}),
|
|
268248
|
-
jsonExample: [example.jsonExample, example.jsonExample]
|
|
268249
|
-
};
|
|
268250
|
-
}
|
|
268251
|
-
case "literal": {
|
|
268252
|
-
return {
|
|
268253
|
-
type: "success",
|
|
268254
|
-
example: ExampleContainer.literal({
|
|
268255
|
-
literal: containerType.literal._visit({
|
|
268256
|
-
boolean: (value2) => ExamplePrimitive.boolean(value2),
|
|
268257
|
-
string: (value2) => ExamplePrimitive.string({ original: value2 }),
|
|
268258
|
-
_other: () => {
|
|
268259
|
-
throw new Error("Encountered unknown literal type");
|
|
268260
|
-
}
|
|
268261
|
-
})
|
|
268262
|
-
}),
|
|
268263
|
-
jsonExample: containerType.literal._visit({
|
|
268264
|
-
boolean: (value2) => value2,
|
|
268265
|
-
string: (value2) => value2,
|
|
268266
|
-
_other: () => {
|
|
268267
|
-
throw new Error("Encountered unknown literal type");
|
|
268268
|
-
}
|
|
268269
|
-
})
|
|
268270
|
-
};
|
|
268271
|
-
}
|
|
268272
|
-
case "optional": {
|
|
268273
|
-
if (skipOptionalProperties) {
|
|
268274
|
-
return generateEmptyContainerExample({ containerType });
|
|
268275
|
-
}
|
|
268276
|
-
const example = generateTypeReferenceExample({
|
|
268277
|
-
fieldName,
|
|
268278
|
-
typeReference: containerType.optional,
|
|
268279
|
-
maxDepth,
|
|
268280
|
-
currentDepth: currentDepth + 1,
|
|
268281
|
-
typeDeclarations,
|
|
268282
|
-
skipOptionalProperties,
|
|
268283
|
-
visitedTypes
|
|
268284
|
-
});
|
|
268285
|
-
if (example.type === "failure") {
|
|
268286
|
-
return generateEmptyContainerExample({ containerType });
|
|
268287
|
-
}
|
|
268288
|
-
return {
|
|
268289
|
-
type: "success",
|
|
268290
|
-
example: ExampleContainer.optional({
|
|
268291
|
-
optional: example.example,
|
|
268292
|
-
valueType: containerType.optional
|
|
268293
|
-
}),
|
|
268294
|
-
jsonExample: example.jsonExample
|
|
268295
|
-
};
|
|
268296
|
-
}
|
|
268297
|
-
case "nullable": {
|
|
268298
|
-
if (skipOptionalProperties) {
|
|
268299
|
-
return generateEmptyContainerExample({ containerType });
|
|
268300
|
-
}
|
|
268301
|
-
const example = generateTypeReferenceExample({
|
|
268302
|
-
fieldName,
|
|
268303
|
-
typeReference: containerType.nullable,
|
|
268304
|
-
maxDepth,
|
|
268305
|
-
currentDepth: currentDepth + 1,
|
|
268306
|
-
typeDeclarations,
|
|
268307
|
-
skipOptionalProperties,
|
|
268308
|
-
visitedTypes
|
|
268309
|
-
});
|
|
268310
|
-
if (example.type === "failure") {
|
|
268311
|
-
return generateEmptyContainerExample({ containerType });
|
|
268312
|
-
}
|
|
268313
|
-
return {
|
|
268314
|
-
type: "success",
|
|
268315
|
-
example: ExampleContainer.nullable({
|
|
268316
|
-
nullable: example.example,
|
|
268317
|
-
valueType: containerType.nullable
|
|
268318
|
-
}),
|
|
268319
|
-
jsonExample: example.jsonExample
|
|
268320
|
-
};
|
|
268321
|
-
}
|
|
268322
|
-
case "set": {
|
|
268323
|
-
const example = generateTypeReferenceExample({
|
|
268324
|
-
fieldName,
|
|
268325
|
-
typeReference: containerType.set,
|
|
268326
|
-
maxDepth,
|
|
268327
|
-
currentDepth: currentDepth + 1,
|
|
268328
|
-
typeDeclarations,
|
|
268329
|
-
skipOptionalProperties,
|
|
268330
|
-
visitedTypes
|
|
268331
|
-
});
|
|
268332
|
-
if (example.type === "failure") {
|
|
268333
|
-
return generateEmptyContainerExample({ containerType });
|
|
268334
|
-
}
|
|
268335
|
-
return {
|
|
268336
|
-
type: "success",
|
|
268337
|
-
example: ExampleContainer.set({
|
|
268338
|
-
set: [example.example],
|
|
268339
|
-
itemType: containerType.set
|
|
268340
|
-
}),
|
|
268341
|
-
jsonExample: [example.jsonExample]
|
|
268342
|
-
};
|
|
268343
|
-
}
|
|
268344
|
-
case "map": {
|
|
268345
|
-
const keyExample = generateTypeReferenceExample({
|
|
268346
|
-
fieldName,
|
|
268347
|
-
typeReference: containerType.keyType,
|
|
268348
|
-
maxDepth,
|
|
268349
|
-
currentDepth: currentDepth + 1,
|
|
268350
|
-
typeDeclarations,
|
|
268351
|
-
skipOptionalProperties,
|
|
268352
|
-
visitedTypes
|
|
268353
|
-
});
|
|
268354
|
-
const valueExample = generateTypeReferenceExample({
|
|
268355
|
-
fieldName,
|
|
268356
|
-
typeReference: containerType.valueType,
|
|
268357
|
-
maxDepth,
|
|
268358
|
-
currentDepth: currentDepth + 1,
|
|
268359
|
-
typeDeclarations,
|
|
268360
|
-
skipOptionalProperties,
|
|
268361
|
-
visitedTypes
|
|
268362
|
-
});
|
|
268363
|
-
if (keyExample.type === "failure" || valueExample.type === "failure") {
|
|
268364
|
-
return generateEmptyContainerExample({ containerType });
|
|
268365
|
-
}
|
|
268366
|
-
return {
|
|
268367
|
-
type: "success",
|
|
268368
|
-
example: ExampleContainer.map({
|
|
268369
|
-
map: [
|
|
268370
|
-
{
|
|
268371
|
-
key: keyExample.example,
|
|
268372
|
-
value: valueExample.example
|
|
268373
|
-
}
|
|
268374
|
-
],
|
|
268375
|
-
keyType: containerType.keyType,
|
|
268376
|
-
valueType: containerType.valueType
|
|
268377
|
-
}),
|
|
268378
|
-
// biome-ignore lint/suspicious/noExplicitAny: allow explicit any
|
|
268379
|
-
jsonExample: { [keyExample.jsonExample]: valueExample.jsonExample }
|
|
268380
|
-
};
|
|
268381
|
-
}
|
|
268382
|
-
default:
|
|
268383
|
-
assertNever(containerType);
|
|
268384
|
-
}
|
|
268385
|
-
}
|
|
268386
|
-
function generateEmptyContainerExample({ containerType }) {
|
|
268387
|
-
switch (containerType.type) {
|
|
268388
|
-
case "list": {
|
|
268389
|
-
return {
|
|
268390
|
-
type: "success",
|
|
268391
|
-
example: ExampleContainer.list({
|
|
268392
|
-
list: [],
|
|
268393
|
-
itemType: containerType.list
|
|
268394
|
-
}),
|
|
268395
|
-
jsonExample: []
|
|
268396
|
-
};
|
|
268397
|
-
}
|
|
268398
|
-
case "literal": {
|
|
268399
|
-
return {
|
|
268400
|
-
type: "success",
|
|
268401
|
-
example: ExampleContainer.literal({
|
|
268402
|
-
literal: containerType.literal._visit({
|
|
268403
|
-
boolean: (value2) => ExamplePrimitive.boolean(value2),
|
|
268404
|
-
string: (value2) => ExamplePrimitive.string({ original: value2 }),
|
|
268405
|
-
_other: () => {
|
|
268406
|
-
throw new Error("Encountered unknown literal type");
|
|
268407
|
-
}
|
|
268408
|
-
})
|
|
268409
|
-
}),
|
|
268410
|
-
jsonExample: containerType.literal._visit({
|
|
268411
|
-
boolean: (value2) => value2,
|
|
268412
|
-
string: (value2) => value2,
|
|
268413
|
-
_other: () => {
|
|
268414
|
-
throw new Error("Encountered unknown literal type");
|
|
268415
|
-
}
|
|
268416
|
-
})
|
|
268417
|
-
};
|
|
268418
|
-
}
|
|
268419
|
-
case "optional": {
|
|
268420
|
-
return {
|
|
268421
|
-
type: "success",
|
|
268422
|
-
example: ExampleContainer.optional({
|
|
268423
|
-
optional: void 0,
|
|
268424
|
-
valueType: containerType.optional
|
|
268425
|
-
}),
|
|
268426
|
-
jsonExample: void 0
|
|
268427
|
-
};
|
|
268428
|
-
}
|
|
268429
|
-
case "nullable": {
|
|
268430
|
-
return {
|
|
268431
|
-
type: "success",
|
|
268432
|
-
example: ExampleContainer.nullable({
|
|
268433
|
-
nullable: void 0,
|
|
268434
|
-
valueType: containerType.nullable
|
|
268435
|
-
}),
|
|
268436
|
-
jsonExample: void 0
|
|
268437
|
-
};
|
|
268438
|
-
}
|
|
268439
|
-
case "set": {
|
|
268440
|
-
return {
|
|
268441
|
-
type: "success",
|
|
268442
|
-
example: ExampleContainer.set({
|
|
268443
|
-
set: [],
|
|
268444
|
-
itemType: containerType.set
|
|
268445
|
-
}),
|
|
268446
|
-
jsonExample: []
|
|
268447
|
-
};
|
|
268448
|
-
}
|
|
268449
|
-
case "map": {
|
|
268450
|
-
return {
|
|
268451
|
-
type: "success",
|
|
268452
|
-
example: ExampleContainer.map({
|
|
268453
|
-
map: [],
|
|
268454
|
-
keyType: containerType.keyType,
|
|
268455
|
-
valueType: containerType.valueType
|
|
268456
|
-
}),
|
|
268457
|
-
jsonExample: {}
|
|
268458
|
-
};
|
|
268459
|
-
}
|
|
268460
|
-
default:
|
|
268461
|
-
assertNever(containerType);
|
|
268462
|
-
}
|
|
268463
|
-
}
|
|
268464
|
-
var init_generateContainerExample = __esm({
|
|
268465
|
-
"../../commons/ir-utils/lib/examples/v1/generateContainerExample.js"() {
|
|
268466
|
-
"use strict";
|
|
268467
|
-
init_lib4();
|
|
268468
|
-
init_lib9();
|
|
268469
|
-
init_generateTypeReferenceExample();
|
|
268470
|
-
}
|
|
268471
|
-
});
|
|
268472
|
-
|
|
268473
268523
|
// ../../commons/ir-utils/lib/examples/v1/generatePrimitiveExample.js
|
|
268474
268524
|
function generatePrimitiveExample({ fieldName, primitiveType: primitiveType2 }) {
|
|
268475
268525
|
switch (primitiveType2.v1) {
|
|
@@ -269386,6 +269436,263 @@ var init_generateTypeReferenceExample = __esm({
|
|
|
269386
269436
|
}
|
|
269387
269437
|
});
|
|
269388
269438
|
|
|
269439
|
+
// ../../commons/ir-utils/lib/examples/v1/generateContainerExample.js
|
|
269440
|
+
function generateContainerExample({ fieldName, containerType, maxDepth, currentDepth, typeDeclarations, skipOptionalProperties, visitedTypes }) {
|
|
269441
|
+
if (currentDepth >= maxDepth) {
|
|
269442
|
+
return generateEmptyContainerExample({ containerType });
|
|
269443
|
+
}
|
|
269444
|
+
switch (containerType.type) {
|
|
269445
|
+
case "list": {
|
|
269446
|
+
const example = generateTypeReferenceExample({
|
|
269447
|
+
fieldName,
|
|
269448
|
+
typeReference: containerType.list,
|
|
269449
|
+
maxDepth,
|
|
269450
|
+
currentDepth: currentDepth + 1,
|
|
269451
|
+
typeDeclarations,
|
|
269452
|
+
skipOptionalProperties,
|
|
269453
|
+
visitedTypes
|
|
269454
|
+
});
|
|
269455
|
+
if (example.type === "failure") {
|
|
269456
|
+
return generateEmptyContainerExample({ containerType });
|
|
269457
|
+
}
|
|
269458
|
+
return {
|
|
269459
|
+
type: "success",
|
|
269460
|
+
example: ExampleContainer.list({
|
|
269461
|
+
list: [example.example, example.example],
|
|
269462
|
+
itemType: containerType.list
|
|
269463
|
+
}),
|
|
269464
|
+
jsonExample: [example.jsonExample, example.jsonExample]
|
|
269465
|
+
};
|
|
269466
|
+
}
|
|
269467
|
+
case "literal": {
|
|
269468
|
+
return {
|
|
269469
|
+
type: "success",
|
|
269470
|
+
example: ExampleContainer.literal({
|
|
269471
|
+
literal: containerType.literal._visit({
|
|
269472
|
+
boolean: (value2) => ExamplePrimitive.boolean(value2),
|
|
269473
|
+
string: (value2) => ExamplePrimitive.string({ original: value2 }),
|
|
269474
|
+
_other: () => {
|
|
269475
|
+
throw new Error("Encountered unknown literal type");
|
|
269476
|
+
}
|
|
269477
|
+
})
|
|
269478
|
+
}),
|
|
269479
|
+
jsonExample: containerType.literal._visit({
|
|
269480
|
+
boolean: (value2) => value2,
|
|
269481
|
+
string: (value2) => value2,
|
|
269482
|
+
_other: () => {
|
|
269483
|
+
throw new Error("Encountered unknown literal type");
|
|
269484
|
+
}
|
|
269485
|
+
})
|
|
269486
|
+
};
|
|
269487
|
+
}
|
|
269488
|
+
case "optional": {
|
|
269489
|
+
if (skipOptionalProperties) {
|
|
269490
|
+
return generateEmptyContainerExample({ containerType });
|
|
269491
|
+
}
|
|
269492
|
+
const example = generateTypeReferenceExample({
|
|
269493
|
+
fieldName,
|
|
269494
|
+
typeReference: containerType.optional,
|
|
269495
|
+
maxDepth,
|
|
269496
|
+
currentDepth: currentDepth + 1,
|
|
269497
|
+
typeDeclarations,
|
|
269498
|
+
skipOptionalProperties,
|
|
269499
|
+
visitedTypes
|
|
269500
|
+
});
|
|
269501
|
+
if (example.type === "failure") {
|
|
269502
|
+
return generateEmptyContainerExample({ containerType });
|
|
269503
|
+
}
|
|
269504
|
+
return {
|
|
269505
|
+
type: "success",
|
|
269506
|
+
example: ExampleContainer.optional({
|
|
269507
|
+
optional: example.example,
|
|
269508
|
+
valueType: containerType.optional
|
|
269509
|
+
}),
|
|
269510
|
+
jsonExample: example.jsonExample
|
|
269511
|
+
};
|
|
269512
|
+
}
|
|
269513
|
+
case "nullable": {
|
|
269514
|
+
if (skipOptionalProperties) {
|
|
269515
|
+
return {
|
|
269516
|
+
type: "success",
|
|
269517
|
+
example: ExampleContainer.nullable({
|
|
269518
|
+
nullable: void 0,
|
|
269519
|
+
valueType: containerType.nullable
|
|
269520
|
+
}),
|
|
269521
|
+
jsonExample: null
|
|
269522
|
+
};
|
|
269523
|
+
}
|
|
269524
|
+
const example = generateTypeReferenceExample({
|
|
269525
|
+
fieldName,
|
|
269526
|
+
typeReference: containerType.nullable,
|
|
269527
|
+
maxDepth,
|
|
269528
|
+
currentDepth: currentDepth + 1,
|
|
269529
|
+
typeDeclarations,
|
|
269530
|
+
skipOptionalProperties,
|
|
269531
|
+
visitedTypes
|
|
269532
|
+
});
|
|
269533
|
+
if (example.type === "failure") {
|
|
269534
|
+
return generateEmptyContainerExample({ containerType });
|
|
269535
|
+
}
|
|
269536
|
+
return {
|
|
269537
|
+
type: "success",
|
|
269538
|
+
example: ExampleContainer.nullable({
|
|
269539
|
+
nullable: example.example,
|
|
269540
|
+
valueType: containerType.nullable
|
|
269541
|
+
}),
|
|
269542
|
+
jsonExample: example.jsonExample
|
|
269543
|
+
};
|
|
269544
|
+
}
|
|
269545
|
+
case "set": {
|
|
269546
|
+
const example = generateTypeReferenceExample({
|
|
269547
|
+
fieldName,
|
|
269548
|
+
typeReference: containerType.set,
|
|
269549
|
+
maxDepth,
|
|
269550
|
+
currentDepth: currentDepth + 1,
|
|
269551
|
+
typeDeclarations,
|
|
269552
|
+
skipOptionalProperties,
|
|
269553
|
+
visitedTypes
|
|
269554
|
+
});
|
|
269555
|
+
if (example.type === "failure") {
|
|
269556
|
+
return generateEmptyContainerExample({ containerType });
|
|
269557
|
+
}
|
|
269558
|
+
return {
|
|
269559
|
+
type: "success",
|
|
269560
|
+
example: ExampleContainer.set({
|
|
269561
|
+
set: [example.example],
|
|
269562
|
+
itemType: containerType.set
|
|
269563
|
+
}),
|
|
269564
|
+
jsonExample: [example.jsonExample]
|
|
269565
|
+
};
|
|
269566
|
+
}
|
|
269567
|
+
case "map": {
|
|
269568
|
+
const keyExample = generateTypeReferenceExample({
|
|
269569
|
+
fieldName,
|
|
269570
|
+
typeReference: containerType.keyType,
|
|
269571
|
+
maxDepth,
|
|
269572
|
+
currentDepth: currentDepth + 1,
|
|
269573
|
+
typeDeclarations,
|
|
269574
|
+
skipOptionalProperties,
|
|
269575
|
+
visitedTypes
|
|
269576
|
+
});
|
|
269577
|
+
const valueExample = generateTypeReferenceExample({
|
|
269578
|
+
fieldName,
|
|
269579
|
+
typeReference: containerType.valueType,
|
|
269580
|
+
maxDepth,
|
|
269581
|
+
currentDepth: currentDepth + 1,
|
|
269582
|
+
typeDeclarations,
|
|
269583
|
+
skipOptionalProperties,
|
|
269584
|
+
visitedTypes
|
|
269585
|
+
});
|
|
269586
|
+
if (keyExample.type === "failure" || valueExample.type === "failure") {
|
|
269587
|
+
return generateEmptyContainerExample({ containerType });
|
|
269588
|
+
}
|
|
269589
|
+
return {
|
|
269590
|
+
type: "success",
|
|
269591
|
+
example: ExampleContainer.map({
|
|
269592
|
+
map: [
|
|
269593
|
+
{
|
|
269594
|
+
key: keyExample.example,
|
|
269595
|
+
value: valueExample.example
|
|
269596
|
+
}
|
|
269597
|
+
],
|
|
269598
|
+
keyType: containerType.keyType,
|
|
269599
|
+
valueType: containerType.valueType
|
|
269600
|
+
}),
|
|
269601
|
+
// biome-ignore lint/suspicious/noExplicitAny: allow explicit any
|
|
269602
|
+
jsonExample: { [keyExample.jsonExample]: valueExample.jsonExample }
|
|
269603
|
+
};
|
|
269604
|
+
}
|
|
269605
|
+
default:
|
|
269606
|
+
assertNever(containerType);
|
|
269607
|
+
}
|
|
269608
|
+
}
|
|
269609
|
+
function generateEmptyContainerExample({ containerType }) {
|
|
269610
|
+
switch (containerType.type) {
|
|
269611
|
+
case "list": {
|
|
269612
|
+
return {
|
|
269613
|
+
type: "success",
|
|
269614
|
+
example: ExampleContainer.list({
|
|
269615
|
+
list: [],
|
|
269616
|
+
itemType: containerType.list
|
|
269617
|
+
}),
|
|
269618
|
+
jsonExample: []
|
|
269619
|
+
};
|
|
269620
|
+
}
|
|
269621
|
+
case "literal": {
|
|
269622
|
+
return {
|
|
269623
|
+
type: "success",
|
|
269624
|
+
example: ExampleContainer.literal({
|
|
269625
|
+
literal: containerType.literal._visit({
|
|
269626
|
+
boolean: (value2) => ExamplePrimitive.boolean(value2),
|
|
269627
|
+
string: (value2) => ExamplePrimitive.string({ original: value2 }),
|
|
269628
|
+
_other: () => {
|
|
269629
|
+
throw new Error("Encountered unknown literal type");
|
|
269630
|
+
}
|
|
269631
|
+
})
|
|
269632
|
+
}),
|
|
269633
|
+
jsonExample: containerType.literal._visit({
|
|
269634
|
+
boolean: (value2) => value2,
|
|
269635
|
+
string: (value2) => value2,
|
|
269636
|
+
_other: () => {
|
|
269637
|
+
throw new Error("Encountered unknown literal type");
|
|
269638
|
+
}
|
|
269639
|
+
})
|
|
269640
|
+
};
|
|
269641
|
+
}
|
|
269642
|
+
case "optional": {
|
|
269643
|
+
return {
|
|
269644
|
+
type: "success",
|
|
269645
|
+
example: ExampleContainer.optional({
|
|
269646
|
+
optional: void 0,
|
|
269647
|
+
valueType: containerType.optional
|
|
269648
|
+
}),
|
|
269649
|
+
jsonExample: void 0
|
|
269650
|
+
};
|
|
269651
|
+
}
|
|
269652
|
+
case "nullable": {
|
|
269653
|
+
return {
|
|
269654
|
+
type: "success",
|
|
269655
|
+
example: ExampleContainer.nullable({
|
|
269656
|
+
nullable: void 0,
|
|
269657
|
+
valueType: containerType.nullable
|
|
269658
|
+
}),
|
|
269659
|
+
jsonExample: void 0
|
|
269660
|
+
};
|
|
269661
|
+
}
|
|
269662
|
+
case "set": {
|
|
269663
|
+
return {
|
|
269664
|
+
type: "success",
|
|
269665
|
+
example: ExampleContainer.set({
|
|
269666
|
+
set: [],
|
|
269667
|
+
itemType: containerType.set
|
|
269668
|
+
}),
|
|
269669
|
+
jsonExample: []
|
|
269670
|
+
};
|
|
269671
|
+
}
|
|
269672
|
+
case "map": {
|
|
269673
|
+
return {
|
|
269674
|
+
type: "success",
|
|
269675
|
+
example: ExampleContainer.map({
|
|
269676
|
+
map: [],
|
|
269677
|
+
keyType: containerType.keyType,
|
|
269678
|
+
valueType: containerType.valueType
|
|
269679
|
+
}),
|
|
269680
|
+
jsonExample: {}
|
|
269681
|
+
};
|
|
269682
|
+
}
|
|
269683
|
+
default:
|
|
269684
|
+
assertNever(containerType);
|
|
269685
|
+
}
|
|
269686
|
+
}
|
|
269687
|
+
var init_generateContainerExample = __esm({
|
|
269688
|
+
"../../commons/ir-utils/lib/examples/v1/generateContainerExample.js"() {
|
|
269689
|
+
"use strict";
|
|
269690
|
+
init_lib4();
|
|
269691
|
+
init_lib9();
|
|
269692
|
+
init_generateTypeReferenceExample();
|
|
269693
|
+
}
|
|
269694
|
+
});
|
|
269695
|
+
|
|
269389
269696
|
// ../../commons/ir-utils/lib/examples/v1/generateParameterExamples.js
|
|
269390
269697
|
function generatePathParameterExamples2(pathParameters, options2) {
|
|
269391
269698
|
const result = [];
|
|
@@ -269619,11 +269926,22 @@ function generateEndpointExample({ ir: ir3, endpoint: endpoint3, service, typeDe
|
|
|
269619
269926
|
break;
|
|
269620
269927
|
}
|
|
269621
269928
|
case "reference": {
|
|
269929
|
+
const requestBodyType = endpoint3.requestBody.requestBodyType;
|
|
269930
|
+
if (skipOptionalRequestProperties && requestBodyType.type === "container" && requestBodyType.container.type === "nullable") {
|
|
269931
|
+
const { example: emptyExample } = generateEmptyContainerExample({
|
|
269932
|
+
containerType: requestBodyType.container
|
|
269933
|
+
});
|
|
269934
|
+
result.request = ExampleRequestBody.reference({
|
|
269935
|
+
jsonExample: void 0,
|
|
269936
|
+
shape: ExampleTypeReferenceShape.container(emptyExample)
|
|
269937
|
+
});
|
|
269938
|
+
break;
|
|
269939
|
+
}
|
|
269622
269940
|
const generatedExample = generateTypeReferenceExample({
|
|
269623
269941
|
currentDepth: 0,
|
|
269624
269942
|
maxDepth: 10,
|
|
269625
269943
|
typeDeclarations,
|
|
269626
|
-
typeReference:
|
|
269944
|
+
typeReference: requestBodyType,
|
|
269627
269945
|
skipOptionalProperties: skipOptionalRequestProperties
|
|
269628
269946
|
});
|
|
269629
269947
|
if (generatedExample.type === "failure") {
|
|
@@ -269836,6 +270154,7 @@ var init_generateEndpointExample = __esm({
|
|
|
269836
270154
|
init_hashJSON();
|
|
269837
270155
|
init_isTypeReferenceOptional();
|
|
269838
270156
|
init_namesUtils();
|
|
270157
|
+
init_generateContainerExample();
|
|
269839
270158
|
init_generateParameterExamples();
|
|
269840
270159
|
init_generateTypeDeclarationExample();
|
|
269841
270160
|
init_generateTypeReferenceExample();
|
|
@@ -273954,17 +274273,17 @@ var init_convertDeclaration = __esm({
|
|
|
273954
274273
|
});
|
|
273955
274274
|
|
|
273956
274275
|
// ../generation/ir-generator/lib/converters/type-declarations/convertObjectTypeDeclaration.js
|
|
273957
|
-
function convertObjectTypeDeclaration({ object: object23, file: file4 }) {
|
|
274276
|
+
function convertObjectTypeDeclaration({ object: object23, file: file4, withinXmlElement = false }) {
|
|
273958
274277
|
return Type.object({
|
|
273959
274278
|
extends: getExtensionsAsList(object23.extends).map((extended) => parseTypeName({ typeName: extended, file: file4 })),
|
|
273960
|
-
properties: getObjectPropertiesFromRawObjectSchema(object23, file4),
|
|
274279
|
+
properties: getObjectPropertiesFromRawObjectSchema(object23, file4, withinXmlElement),
|
|
273961
274280
|
extraProperties: object23["extra-properties"] ?? false,
|
|
273962
274281
|
extendedProperties: void 0,
|
|
273963
274282
|
// Populated by the computeUnionBasePropertyDedupe post-build pass; undefined here.
|
|
273964
274283
|
deferredUnionBaseProperties: void 0
|
|
273965
274284
|
});
|
|
273966
274285
|
}
|
|
273967
|
-
function getObjectPropertiesFromRawObjectSchema(object23, file4) {
|
|
274286
|
+
function getObjectPropertiesFromRawObjectSchema(object23, file4, withinXmlElement = false) {
|
|
273968
274287
|
if (object23.properties == null) {
|
|
273969
274288
|
return [];
|
|
273970
274289
|
}
|
|
@@ -273977,12 +274296,25 @@ function getObjectPropertiesFromRawObjectSchema(object23, file4) {
|
|
|
273977
274296
|
valueType: file4.parseTypeReference(propertyDefinition),
|
|
273978
274297
|
propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
|
|
273979
274298
|
defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
|
|
274299
|
+
xml: getXmlPropertyEncoding2({ property: propertyDefinition, withinXmlElement }),
|
|
273980
274300
|
v2Examples: {
|
|
273981
274301
|
userSpecifiedExamples: {},
|
|
273982
274302
|
autogeneratedExamples: {}
|
|
273983
274303
|
}
|
|
273984
274304
|
}));
|
|
273985
274305
|
}
|
|
274306
|
+
function getXmlPropertyEncoding2({ property: property24, withinXmlElement }) {
|
|
274307
|
+
const xml2 = typeof property24 === "string" ? void 0 : property24.encoding?.xml;
|
|
274308
|
+
if (xml2 == null) {
|
|
274309
|
+
return withinXmlElement ? { kind: XmlPropertyKind.Element, name: void 0, wrapped: void 0, listSeparator: void 0 } : void 0;
|
|
274310
|
+
}
|
|
274311
|
+
return {
|
|
274312
|
+
kind: xml2.text ? XmlPropertyKind.Text : xml2.attribute ? XmlPropertyKind.Attribute : XmlPropertyKind.Element,
|
|
274313
|
+
name: xml2.name,
|
|
274314
|
+
wrapped: xml2.wrapped,
|
|
274315
|
+
listSeparator: xml2.separator
|
|
274316
|
+
};
|
|
274317
|
+
}
|
|
273986
274318
|
function getExtensionsAsList(extensions2) {
|
|
273987
274319
|
if (extensions2 == null) {
|
|
273988
274320
|
return [];
|
|
@@ -274763,6 +275095,7 @@ function convertDiscriminatedUnionTypeDeclaration({ union: union23, file: file4,
|
|
|
274763
275095
|
valueType: file4.parseTypeReference(propertyDefinition),
|
|
274764
275096
|
propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
|
|
274765
275097
|
defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
|
|
275098
|
+
xml: void 0,
|
|
274766
275099
|
v2Examples: {
|
|
274767
275100
|
userSpecifiedExamples: {},
|
|
274768
275101
|
autogeneratedExamples: {}
|
|
@@ -278075,12 +278408,14 @@ function convertTransportToEncoding(transport, service) {
|
|
|
278075
278408
|
case "http":
|
|
278076
278409
|
return {
|
|
278077
278410
|
json: {},
|
|
278078
|
-
proto: void 0
|
|
278411
|
+
proto: void 0,
|
|
278412
|
+
xml: void 0
|
|
278079
278413
|
};
|
|
278080
278414
|
case "grpc":
|
|
278081
278415
|
return {
|
|
278082
278416
|
json: void 0,
|
|
278083
|
-
proto: {}
|
|
278417
|
+
proto: {},
|
|
278418
|
+
xml: void 0
|
|
278084
278419
|
};
|
|
278085
278420
|
default:
|
|
278086
278421
|
assertNever(transport);
|
|
@@ -281145,6 +281480,7 @@ function convertUndiscriminatedUnionTypeDeclaration({ union: union23, file: file
|
|
|
281145
281480
|
valueType: file4.parseTypeReference(propertyDefinition),
|
|
281146
281481
|
propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
|
|
281147
281482
|
defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
|
|
281483
|
+
xml: void 0,
|
|
281148
281484
|
v2Examples: {
|
|
281149
281485
|
userSpecifiedExamples: {},
|
|
281150
281486
|
autogeneratedExamples: {}
|
|
@@ -281329,7 +281665,7 @@ function convertTypeDeclaration({ typeName, typeDeclaration: typeDeclaration2, f
|
|
|
281329
281665
|
name: declaredTypeName,
|
|
281330
281666
|
shape: convertType2({ typeDeclaration: typeDeclaration2, file: file4, typeResolver }),
|
|
281331
281667
|
referencedTypes: new Set(referencedTypes.map((referencedType) => referencedType.typeId)),
|
|
281332
|
-
encoding: convertTypeDeclarationEncoding({ typeDeclaration: typeDeclaration2, source: source2 }),
|
|
281668
|
+
encoding: convertTypeDeclarationEncoding({ typeDeclaration: typeDeclaration2, typeName, source: source2 }),
|
|
281333
281669
|
source: source2,
|
|
281334
281670
|
userProvidedExamples: typeof typeDeclaration2 !== "string" && typeDeclaration2.examples != null ? typeDeclaration2.examples.map((example) => ({
|
|
281335
281671
|
name: example.name != null ? file4.casingsGenerator.generateName(example.name) : void 0,
|
|
@@ -281358,7 +281694,11 @@ function convertTypeDeclaration({ typeName, typeDeclaration: typeDeclaration2, f
|
|
|
281358
281694
|
function convertType2({ typeDeclaration: typeDeclaration2, file: file4, typeResolver }) {
|
|
281359
281695
|
return visitRawTypeDeclaration(typeDeclaration2, {
|
|
281360
281696
|
alias: (alias2) => convertAliasTypeDeclaration({ alias: alias2, file: file4, typeResolver }),
|
|
281361
|
-
object: (object23) => convertObjectTypeDeclaration({
|
|
281697
|
+
object: (object23) => convertObjectTypeDeclaration({
|
|
281698
|
+
object: object23,
|
|
281699
|
+
file: file4,
|
|
281700
|
+
withinXmlElement: isXmlEncodedTypeDeclaration(typeDeclaration2)
|
|
281701
|
+
}),
|
|
281362
281702
|
discriminatedUnion: (union23) => convertDiscriminatedUnionTypeDeclaration({ union: union23, file: file4, typeResolver }),
|
|
281363
281703
|
undiscriminatedUnion: (union23) => convertUndiscriminatedUnionTypeDeclaration({ union: union23, file: file4 }),
|
|
281364
281704
|
enum: (enum_25) => Type.enum(convertEnumTypeDeclaration({ _enum: enum_25, file: file4 }))
|
|
@@ -281391,28 +281731,41 @@ function convertTypeDeclarationSource({ file: file4, typeDeclaration: typeDeclar
|
|
|
281391
281731
|
name: typeName
|
|
281392
281732
|
}));
|
|
281393
281733
|
}
|
|
281394
|
-
function convertTypeDeclarationEncoding({ typeDeclaration: typeDeclaration2, source: source2 }) {
|
|
281734
|
+
function convertTypeDeclarationEncoding({ typeDeclaration: typeDeclaration2, typeName, source: source2 }) {
|
|
281395
281735
|
if (typeof typeDeclaration2 !== "string" && typeDeclaration2.encoding != null) {
|
|
281396
|
-
return convertEncoding3(typeDeclaration2.encoding);
|
|
281736
|
+
return convertEncoding3({ encodingSchema: typeDeclaration2.encoding, typeName });
|
|
281397
281737
|
}
|
|
281398
281738
|
return convertSourceToEncoding(source2);
|
|
281399
281739
|
}
|
|
281400
|
-
function convertEncoding3(encodingSchema) {
|
|
281401
|
-
|
|
281402
|
-
json: void 0,
|
|
281403
|
-
|
|
281404
|
-
|
|
281405
|
-
|
|
281406
|
-
|
|
281407
|
-
|
|
281740
|
+
function convertEncoding3({ encodingSchema, typeName }) {
|
|
281741
|
+
if (encodingSchema.proto != null) {
|
|
281742
|
+
return { json: void 0, proto: {}, xml: void 0 };
|
|
281743
|
+
}
|
|
281744
|
+
if (encodingSchema.xml != null) {
|
|
281745
|
+
return {
|
|
281746
|
+
json: void 0,
|
|
281747
|
+
proto: void 0,
|
|
281748
|
+
xml: {
|
|
281749
|
+
name: encodingSchema.xml.name ?? typeName,
|
|
281750
|
+
namespace: encodingSchema.xml.namespace,
|
|
281751
|
+
prefix: encodingSchema.xml.prefix
|
|
281752
|
+
}
|
|
281753
|
+
};
|
|
281754
|
+
}
|
|
281755
|
+
return { json: {}, proto: void 0, xml: void 0 };
|
|
281756
|
+
}
|
|
281757
|
+
function isXmlEncodedTypeDeclaration(typeDeclaration2) {
|
|
281758
|
+
return typeof typeDeclaration2 !== "string" && typeDeclaration2.encoding?.xml != null;
|
|
281408
281759
|
}
|
|
281409
281760
|
function convertSourceToEncoding(source2) {
|
|
281410
281761
|
return source2 != null && source2.type === "proto" ? {
|
|
281411
281762
|
json: void 0,
|
|
281412
|
-
proto: {}
|
|
281763
|
+
proto: {},
|
|
281764
|
+
xml: void 0
|
|
281413
281765
|
} : {
|
|
281414
281766
|
json: {},
|
|
281415
|
-
proto: void 0
|
|
281767
|
+
proto: void 0,
|
|
281768
|
+
xml: void 0
|
|
281416
281769
|
};
|
|
281417
281770
|
}
|
|
281418
281771
|
function getInline2(typeDeclaration2) {
|
|
@@ -326655,6 +327008,90 @@ var init_api_yml_schema = __esm({
|
|
|
326655
327008
|
],
|
|
326656
327009
|
additionalProperties: false
|
|
326657
327010
|
},
|
|
327011
|
+
"encoding.XmlEncodingSchema": {
|
|
327012
|
+
type: "object",
|
|
327013
|
+
properties: {
|
|
327014
|
+
name: {
|
|
327015
|
+
oneOf: [
|
|
327016
|
+
{
|
|
327017
|
+
type: "string"
|
|
327018
|
+
},
|
|
327019
|
+
{
|
|
327020
|
+
type: "null"
|
|
327021
|
+
}
|
|
327022
|
+
],
|
|
327023
|
+
description: "The element or attribute name on the wire, casing preserved. Defaults to the type or property name."
|
|
327024
|
+
},
|
|
327025
|
+
namespace: {
|
|
327026
|
+
oneOf: [
|
|
327027
|
+
{
|
|
327028
|
+
type: "string"
|
|
327029
|
+
},
|
|
327030
|
+
{
|
|
327031
|
+
type: "null"
|
|
327032
|
+
}
|
|
327033
|
+
],
|
|
327034
|
+
description: "The XML namespace URI."
|
|
327035
|
+
},
|
|
327036
|
+
prefix: {
|
|
327037
|
+
oneOf: [
|
|
327038
|
+
{
|
|
327039
|
+
type: "string"
|
|
327040
|
+
},
|
|
327041
|
+
{
|
|
327042
|
+
type: "null"
|
|
327043
|
+
}
|
|
327044
|
+
],
|
|
327045
|
+
description: "The namespace prefix for the element name."
|
|
327046
|
+
},
|
|
327047
|
+
attribute: {
|
|
327048
|
+
oneOf: [
|
|
327049
|
+
{
|
|
327050
|
+
type: "boolean"
|
|
327051
|
+
},
|
|
327052
|
+
{
|
|
327053
|
+
type: "null"
|
|
327054
|
+
}
|
|
327055
|
+
],
|
|
327056
|
+
description: "Serialize this property as an attribute of the parent element instead of a child element."
|
|
327057
|
+
},
|
|
327058
|
+
text: {
|
|
327059
|
+
oneOf: [
|
|
327060
|
+
{
|
|
327061
|
+
type: "boolean"
|
|
327062
|
+
},
|
|
327063
|
+
{
|
|
327064
|
+
type: "null"
|
|
327065
|
+
}
|
|
327066
|
+
],
|
|
327067
|
+
description: "Serialize this property as the text content of the parent element."
|
|
327068
|
+
},
|
|
327069
|
+
wrapped: {
|
|
327070
|
+
oneOf: [
|
|
327071
|
+
{
|
|
327072
|
+
type: "boolean"
|
|
327073
|
+
},
|
|
327074
|
+
{
|
|
327075
|
+
type: "null"
|
|
327076
|
+
}
|
|
327077
|
+
],
|
|
327078
|
+
description: "For list properties, wrap the items in a container element named `name`."
|
|
327079
|
+
},
|
|
327080
|
+
separator: {
|
|
327081
|
+
oneOf: [
|
|
327082
|
+
{
|
|
327083
|
+
type: "string"
|
|
327084
|
+
},
|
|
327085
|
+
{
|
|
327086
|
+
type: "null"
|
|
327087
|
+
}
|
|
327088
|
+
],
|
|
327089
|
+
description: "For list-valued attributes or text, the string used to join items (e.g. a space)."
|
|
327090
|
+
}
|
|
327091
|
+
},
|
|
327092
|
+
additionalProperties: false,
|
|
327093
|
+
description: "On a type declaration: marks the object as an XML element (e.g. a TwiML verb).\nOn an object property: controls how the property serializes within its parent element."
|
|
327094
|
+
},
|
|
326658
327095
|
"encoding.EncodingSchema": {
|
|
326659
327096
|
type: "object",
|
|
326660
327097
|
properties: {
|
|
@@ -326667,6 +327104,16 @@ var init_api_yml_schema = __esm({
|
|
|
326667
327104
|
type: "null"
|
|
326668
327105
|
}
|
|
326669
327106
|
]
|
|
327107
|
+
},
|
|
327108
|
+
xml: {
|
|
327109
|
+
oneOf: [
|
|
327110
|
+
{
|
|
327111
|
+
$ref: "#/definitions/encoding.XmlEncodingSchema"
|
|
327112
|
+
},
|
|
327113
|
+
{
|
|
327114
|
+
type: "null"
|
|
327115
|
+
}
|
|
327116
|
+
]
|
|
326670
327117
|
}
|
|
326671
327118
|
},
|
|
326672
327119
|
additionalProperties: false
|
|
@@ -327915,6 +328362,90 @@ var init_fern_schema = __esm({
|
|
|
327915
328362
|
],
|
|
327916
328363
|
additionalProperties: false
|
|
327917
328364
|
},
|
|
328365
|
+
"encoding.XmlEncodingSchema": {
|
|
328366
|
+
type: "object",
|
|
328367
|
+
properties: {
|
|
328368
|
+
name: {
|
|
328369
|
+
oneOf: [
|
|
328370
|
+
{
|
|
328371
|
+
type: "string"
|
|
328372
|
+
},
|
|
328373
|
+
{
|
|
328374
|
+
type: "null"
|
|
328375
|
+
}
|
|
328376
|
+
],
|
|
328377
|
+
description: "The element or attribute name on the wire, casing preserved. Defaults to the type or property name."
|
|
328378
|
+
},
|
|
328379
|
+
namespace: {
|
|
328380
|
+
oneOf: [
|
|
328381
|
+
{
|
|
328382
|
+
type: "string"
|
|
328383
|
+
},
|
|
328384
|
+
{
|
|
328385
|
+
type: "null"
|
|
328386
|
+
}
|
|
328387
|
+
],
|
|
328388
|
+
description: "The XML namespace URI."
|
|
328389
|
+
},
|
|
328390
|
+
prefix: {
|
|
328391
|
+
oneOf: [
|
|
328392
|
+
{
|
|
328393
|
+
type: "string"
|
|
328394
|
+
},
|
|
328395
|
+
{
|
|
328396
|
+
type: "null"
|
|
328397
|
+
}
|
|
328398
|
+
],
|
|
328399
|
+
description: "The namespace prefix for the element name."
|
|
328400
|
+
},
|
|
328401
|
+
attribute: {
|
|
328402
|
+
oneOf: [
|
|
328403
|
+
{
|
|
328404
|
+
type: "boolean"
|
|
328405
|
+
},
|
|
328406
|
+
{
|
|
328407
|
+
type: "null"
|
|
328408
|
+
}
|
|
328409
|
+
],
|
|
328410
|
+
description: "Serialize this property as an attribute of the parent element instead of a child element."
|
|
328411
|
+
},
|
|
328412
|
+
text: {
|
|
328413
|
+
oneOf: [
|
|
328414
|
+
{
|
|
328415
|
+
type: "boolean"
|
|
328416
|
+
},
|
|
328417
|
+
{
|
|
328418
|
+
type: "null"
|
|
328419
|
+
}
|
|
328420
|
+
],
|
|
328421
|
+
description: "Serialize this property as the text content of the parent element."
|
|
328422
|
+
},
|
|
328423
|
+
wrapped: {
|
|
328424
|
+
oneOf: [
|
|
328425
|
+
{
|
|
328426
|
+
type: "boolean"
|
|
328427
|
+
},
|
|
328428
|
+
{
|
|
328429
|
+
type: "null"
|
|
328430
|
+
}
|
|
328431
|
+
],
|
|
328432
|
+
description: "For list properties, wrap the items in a container element named `name`."
|
|
328433
|
+
},
|
|
328434
|
+
separator: {
|
|
328435
|
+
oneOf: [
|
|
328436
|
+
{
|
|
328437
|
+
type: "string"
|
|
328438
|
+
},
|
|
328439
|
+
{
|
|
328440
|
+
type: "null"
|
|
328441
|
+
}
|
|
328442
|
+
],
|
|
328443
|
+
description: "For list-valued attributes or text, the string used to join items (e.g. a space)."
|
|
328444
|
+
}
|
|
328445
|
+
},
|
|
328446
|
+
additionalProperties: false,
|
|
328447
|
+
description: "On a type declaration: marks the object as an XML element (e.g. a TwiML verb).\nOn an object property: controls how the property serializes within its parent element."
|
|
328448
|
+
},
|
|
327918
328449
|
"encoding.EncodingSchema": {
|
|
327919
328450
|
type: "object",
|
|
327920
328451
|
properties: {
|
|
@@ -327927,6 +328458,16 @@ var init_fern_schema = __esm({
|
|
|
327927
328458
|
type: "null"
|
|
327928
328459
|
}
|
|
327929
328460
|
]
|
|
328461
|
+
},
|
|
328462
|
+
xml: {
|
|
328463
|
+
oneOf: [
|
|
328464
|
+
{
|
|
328465
|
+
$ref: "#/definitions/encoding.XmlEncodingSchema"
|
|
328466
|
+
},
|
|
328467
|
+
{
|
|
328468
|
+
type: "null"
|
|
328469
|
+
}
|
|
328470
|
+
]
|
|
327930
328471
|
}
|
|
327931
328472
|
},
|
|
327932
328473
|
additionalProperties: false
|
|
@@ -332383,6 +332924,90 @@ var init_package_yml_schema = __esm({
|
|
|
332383
332924
|
],
|
|
332384
332925
|
additionalProperties: false
|
|
332385
332926
|
},
|
|
332927
|
+
"encoding.XmlEncodingSchema": {
|
|
332928
|
+
type: "object",
|
|
332929
|
+
properties: {
|
|
332930
|
+
name: {
|
|
332931
|
+
oneOf: [
|
|
332932
|
+
{
|
|
332933
|
+
type: "string"
|
|
332934
|
+
},
|
|
332935
|
+
{
|
|
332936
|
+
type: "null"
|
|
332937
|
+
}
|
|
332938
|
+
],
|
|
332939
|
+
description: "The element or attribute name on the wire, casing preserved. Defaults to the type or property name."
|
|
332940
|
+
},
|
|
332941
|
+
namespace: {
|
|
332942
|
+
oneOf: [
|
|
332943
|
+
{
|
|
332944
|
+
type: "string"
|
|
332945
|
+
},
|
|
332946
|
+
{
|
|
332947
|
+
type: "null"
|
|
332948
|
+
}
|
|
332949
|
+
],
|
|
332950
|
+
description: "The XML namespace URI."
|
|
332951
|
+
},
|
|
332952
|
+
prefix: {
|
|
332953
|
+
oneOf: [
|
|
332954
|
+
{
|
|
332955
|
+
type: "string"
|
|
332956
|
+
},
|
|
332957
|
+
{
|
|
332958
|
+
type: "null"
|
|
332959
|
+
}
|
|
332960
|
+
],
|
|
332961
|
+
description: "The namespace prefix for the element name."
|
|
332962
|
+
},
|
|
332963
|
+
attribute: {
|
|
332964
|
+
oneOf: [
|
|
332965
|
+
{
|
|
332966
|
+
type: "boolean"
|
|
332967
|
+
},
|
|
332968
|
+
{
|
|
332969
|
+
type: "null"
|
|
332970
|
+
}
|
|
332971
|
+
],
|
|
332972
|
+
description: "Serialize this property as an attribute of the parent element instead of a child element."
|
|
332973
|
+
},
|
|
332974
|
+
text: {
|
|
332975
|
+
oneOf: [
|
|
332976
|
+
{
|
|
332977
|
+
type: "boolean"
|
|
332978
|
+
},
|
|
332979
|
+
{
|
|
332980
|
+
type: "null"
|
|
332981
|
+
}
|
|
332982
|
+
],
|
|
332983
|
+
description: "Serialize this property as the text content of the parent element."
|
|
332984
|
+
},
|
|
332985
|
+
wrapped: {
|
|
332986
|
+
oneOf: [
|
|
332987
|
+
{
|
|
332988
|
+
type: "boolean"
|
|
332989
|
+
},
|
|
332990
|
+
{
|
|
332991
|
+
type: "null"
|
|
332992
|
+
}
|
|
332993
|
+
],
|
|
332994
|
+
description: "For list properties, wrap the items in a container element named `name`."
|
|
332995
|
+
},
|
|
332996
|
+
separator: {
|
|
332997
|
+
oneOf: [
|
|
332998
|
+
{
|
|
332999
|
+
type: "string"
|
|
333000
|
+
},
|
|
333001
|
+
{
|
|
333002
|
+
type: "null"
|
|
333003
|
+
}
|
|
333004
|
+
],
|
|
333005
|
+
description: "For list-valued attributes or text, the string used to join items (e.g. a space)."
|
|
333006
|
+
}
|
|
333007
|
+
},
|
|
333008
|
+
additionalProperties: false,
|
|
333009
|
+
description: "On a type declaration: marks the object as an XML element (e.g. a TwiML verb).\nOn an object property: controls how the property serializes within its parent element."
|
|
333010
|
+
},
|
|
332386
333011
|
"encoding.EncodingSchema": {
|
|
332387
333012
|
type: "object",
|
|
332388
333013
|
properties: {
|
|
@@ -332395,6 +333020,16 @@ var init_package_yml_schema = __esm({
|
|
|
332395
333020
|
type: "null"
|
|
332396
333021
|
}
|
|
332397
333022
|
]
|
|
333023
|
+
},
|
|
333024
|
+
xml: {
|
|
333025
|
+
oneOf: [
|
|
333026
|
+
{
|
|
333027
|
+
$ref: "#/definitions/encoding.XmlEncodingSchema"
|
|
333028
|
+
},
|
|
333029
|
+
{
|
|
333030
|
+
type: "null"
|
|
333031
|
+
}
|
|
333032
|
+
]
|
|
332398
333033
|
}
|
|
332399
333034
|
},
|
|
332400
333035
|
additionalProperties: false
|
|
@@ -349259,6 +349894,84 @@ var init_x_fern_type_name = __esm({
|
|
|
349259
349894
|
}
|
|
349260
349895
|
});
|
|
349261
349896
|
|
|
349897
|
+
// ../api-importers/v3-importer-commons/lib/extensions/xml.js
|
|
349898
|
+
function getKind({ isText: isText2, isAttribute }) {
|
|
349899
|
+
if (isText2) {
|
|
349900
|
+
return XmlPropertyKind.Text;
|
|
349901
|
+
}
|
|
349902
|
+
if (isAttribute) {
|
|
349903
|
+
return XmlPropertyKind.Attribute;
|
|
349904
|
+
}
|
|
349905
|
+
return XmlPropertyKind.Element;
|
|
349906
|
+
}
|
|
349907
|
+
function isXmlObject(value2) {
|
|
349908
|
+
return typeof value2 === "object" && value2 != null;
|
|
349909
|
+
}
|
|
349910
|
+
function readExtension(schema, key2) {
|
|
349911
|
+
if (typeof schema !== "object" || schema == null) {
|
|
349912
|
+
return void 0;
|
|
349913
|
+
}
|
|
349914
|
+
return schema[key2];
|
|
349915
|
+
}
|
|
349916
|
+
function firstDefined(...values2) {
|
|
349917
|
+
return values2.find((value2) => value2 != null);
|
|
349918
|
+
}
|
|
349919
|
+
var X_FERN_XML_TEXT, X_FERN_XML_LIST_SEPARATOR, XmlSchemaExtension, XmlPropertyExtension;
|
|
349920
|
+
var init_xml = __esm({
|
|
349921
|
+
"../api-importers/v3-importer-commons/lib/extensions/xml.js"() {
|
|
349922
|
+
"use strict";
|
|
349923
|
+
init_lib9();
|
|
349924
|
+
init_AbstractExtension();
|
|
349925
|
+
X_FERN_XML_TEXT = "x-fern-xml-text";
|
|
349926
|
+
X_FERN_XML_LIST_SEPARATOR = "x-fern-xml-list-separator";
|
|
349927
|
+
XmlSchemaExtension = class extends AbstractExtension {
|
|
349928
|
+
schema;
|
|
349929
|
+
fallbackName;
|
|
349930
|
+
key = "xml";
|
|
349931
|
+
constructor({ breadcrumbs, schema, fallbackName, context: context3 }) {
|
|
349932
|
+
super({ breadcrumbs, context: context3 });
|
|
349933
|
+
this.schema = schema;
|
|
349934
|
+
this.fallbackName = fallbackName;
|
|
349935
|
+
}
|
|
349936
|
+
convert() {
|
|
349937
|
+
const xml2 = this.getExtensionValue(this.schema);
|
|
349938
|
+
if (!isXmlObject(xml2)) {
|
|
349939
|
+
return void 0;
|
|
349940
|
+
}
|
|
349941
|
+
return {
|
|
349942
|
+
name: typeof xml2.name === "string" ? xml2.name : this.fallbackName,
|
|
349943
|
+
namespace: typeof xml2.namespace === "string" ? xml2.namespace : void 0,
|
|
349944
|
+
prefix: typeof xml2.prefix === "string" ? xml2.prefix : void 0
|
|
349945
|
+
};
|
|
349946
|
+
}
|
|
349947
|
+
};
|
|
349948
|
+
XmlPropertyExtension = class extends AbstractExtension {
|
|
349949
|
+
propertySchema;
|
|
349950
|
+
resolvedPropertySchema;
|
|
349951
|
+
key = "xml";
|
|
349952
|
+
constructor({ breadcrumbs, propertySchema, resolvedPropertySchema, context: context3 }) {
|
|
349953
|
+
super({ breadcrumbs, context: context3 });
|
|
349954
|
+
this.propertySchema = propertySchema;
|
|
349955
|
+
this.resolvedPropertySchema = resolvedPropertySchema;
|
|
349956
|
+
}
|
|
349957
|
+
convert() {
|
|
349958
|
+
const inline = this.propertySchema;
|
|
349959
|
+
const resolved = this.resolvedPropertySchema;
|
|
349960
|
+
const xml2 = firstDefined(this.getExtensionValue(inline), this.getExtensionValue(resolved));
|
|
349961
|
+
const isText2 = firstDefined(readExtension(inline, X_FERN_XML_TEXT), readExtension(resolved, X_FERN_XML_TEXT));
|
|
349962
|
+
const listSeparator = firstDefined(readExtension(inline, X_FERN_XML_LIST_SEPARATOR), readExtension(resolved, X_FERN_XML_LIST_SEPARATOR));
|
|
349963
|
+
const xmlObject = isXmlObject(xml2) ? xml2 : {};
|
|
349964
|
+
return {
|
|
349965
|
+
kind: getKind({ isText: isText2 === true, isAttribute: xmlObject.attribute === true }),
|
|
349966
|
+
name: typeof xmlObject.name === "string" ? xmlObject.name : void 0,
|
|
349967
|
+
wrapped: typeof xmlObject.wrapped === "boolean" ? xmlObject.wrapped : void 0,
|
|
349968
|
+
listSeparator: typeof listSeparator === "string" ? listSeparator : void 0
|
|
349969
|
+
};
|
|
349970
|
+
}
|
|
349971
|
+
};
|
|
349972
|
+
}
|
|
349973
|
+
});
|
|
349974
|
+
|
|
349262
349975
|
// ../api-importers/v3-importer-commons/lib/extensions/index.js
|
|
349263
349976
|
var extensions_exports = {};
|
|
349264
349977
|
__export(extensions_exports, {
|
|
@@ -349272,7 +349985,9 @@ __export(extensions_exports, {
|
|
|
349272
349985
|
FernTypeNameExtension: () => FernTypeNameExtension,
|
|
349273
349986
|
SdkGroupNameExtension: () => SdkGroupNameExtension,
|
|
349274
349987
|
SdkMethodNameExtension: () => SdkMethodNameExtension,
|
|
349275
|
-
ServerFromOperationNameExtension: () => ServerFromOperationNameExtension
|
|
349988
|
+
ServerFromOperationNameExtension: () => ServerFromOperationNameExtension,
|
|
349989
|
+
XmlPropertyExtension: () => XmlPropertyExtension,
|
|
349990
|
+
XmlSchemaExtension: () => XmlSchemaExtension
|
|
349276
349991
|
});
|
|
349277
349992
|
var init_extensions2 = __esm({
|
|
349278
349993
|
"../api-importers/v3-importer-commons/lib/extensions/index.js"() {
|
|
@@ -349288,6 +350003,7 @@ var init_extensions2 = __esm({
|
|
|
349288
350003
|
init_x_fern_server_name_from_operation();
|
|
349289
350004
|
init_x_fern_type();
|
|
349290
350005
|
init_x_fern_type_name();
|
|
350006
|
+
init_xml();
|
|
349291
350007
|
}
|
|
349292
350008
|
});
|
|
349293
350009
|
|
|
@@ -351541,13 +352257,21 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351541
352257
|
init_lib4();
|
|
351542
352258
|
init_lib9();
|
|
351543
352259
|
init_lib22();
|
|
352260
|
+
init_xml();
|
|
351544
352261
|
init_lib30();
|
|
351545
352262
|
init_ConvertProperties();
|
|
351546
352263
|
ObjectSchemaConverter = class extends AbstractConverter {
|
|
351547
352264
|
schema;
|
|
351548
|
-
|
|
352265
|
+
xmlEncoding;
|
|
352266
|
+
constructor({ context: context3, breadcrumbs, schema, id }) {
|
|
351549
352267
|
super({ context: context3, breadcrumbs });
|
|
351550
352268
|
this.schema = schema;
|
|
352269
|
+
this.xmlEncoding = new XmlSchemaExtension({
|
|
352270
|
+
breadcrumbs: this.breadcrumbs,
|
|
352271
|
+
schema,
|
|
352272
|
+
fallbackName: id,
|
|
352273
|
+
context: context3
|
|
352274
|
+
}).convert();
|
|
351551
352275
|
}
|
|
351552
352276
|
convert() {
|
|
351553
352277
|
let hasAdditionalProperties = typeof this.schema.additionalProperties === "boolean" && this.schema.additionalProperties;
|
|
@@ -351562,7 +352286,8 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351562
352286
|
}),
|
|
351563
352287
|
propertiesByAudience: {},
|
|
351564
352288
|
inlinedTypes: {},
|
|
351565
|
-
referencedTypes: /* @__PURE__ */ new Set()
|
|
352289
|
+
referencedTypes: /* @__PURE__ */ new Set(),
|
|
352290
|
+
xmlEncoding: this.xmlEncoding
|
|
351566
352291
|
};
|
|
351567
352292
|
}
|
|
351568
352293
|
const { convertedProperties: properties7, inlinedTypesFromProperties: propertiesInlinedTypes, referencedTypes: baseReferencedTypes, propertiesByAudience: basePropertiesByAudience } = convertProperties({
|
|
@@ -351570,7 +352295,8 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351570
352295
|
required: this.schema.required ?? [],
|
|
351571
352296
|
breadcrumbs: this.breadcrumbs,
|
|
351572
352297
|
context: this.context,
|
|
351573
|
-
errorCollector: this.context.errorCollector
|
|
352298
|
+
errorCollector: this.context.errorCollector,
|
|
352299
|
+
withinXmlElement: this.xmlEncoding != null
|
|
351574
352300
|
});
|
|
351575
352301
|
const extends_ = [];
|
|
351576
352302
|
const referencedTypes = baseReferencedTypes;
|
|
@@ -351667,7 +352393,8 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351667
352393
|
// All variant properties are optional on the parent
|
|
351668
352394
|
breadcrumbs: variantBreadcrumbs,
|
|
351669
352395
|
context: this.context,
|
|
351670
|
-
errorCollector: this.context.errorCollector
|
|
352396
|
+
errorCollector: this.context.errorCollector,
|
|
352397
|
+
withinXmlElement: this.xmlEncoding != null
|
|
351671
352398
|
});
|
|
351672
352399
|
properties7.push(...variantProperties);
|
|
351673
352400
|
inlinedTypes = { ...inlinedTypes, ...inlinedTypesFromVariant };
|
|
@@ -351695,7 +352422,8 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351695
352422
|
required: [...this.schema.required ?? [], ...allOfSchema.required ?? []],
|
|
351696
352423
|
breadcrumbs,
|
|
351697
352424
|
context: this.context,
|
|
351698
|
-
errorCollector: this.context.errorCollector
|
|
352425
|
+
errorCollector: this.context.errorCollector,
|
|
352426
|
+
withinXmlElement: this.xmlEncoding != null
|
|
351699
352427
|
});
|
|
351700
352428
|
properties7.push(...allOfProperties);
|
|
351701
352429
|
inlinedTypes = { ...inlinedTypes, ...inlinedTypesFromAllOf };
|
|
@@ -351717,7 +352445,8 @@ var init_ObjectSchemaConverter = __esm({
|
|
|
351717
352445
|
}),
|
|
351718
352446
|
propertiesByAudience,
|
|
351719
352447
|
referencedTypes,
|
|
351720
|
-
inlinedTypes
|
|
352448
|
+
inlinedTypes,
|
|
352449
|
+
xmlEncoding: this.xmlEncoding
|
|
351721
352450
|
};
|
|
351722
352451
|
}
|
|
351723
352452
|
addTypeReferenceToExtends({ reference: reference4, breadcrumbs, extends_, referencedTypes }) {
|
|
@@ -353132,7 +353861,8 @@ var init_SchemaConverter = __esm({
|
|
|
353132
353861
|
const objectConverter = new ObjectSchemaConverter({
|
|
353133
353862
|
context: this.context,
|
|
353134
353863
|
breadcrumbs: this.breadcrumbs,
|
|
353135
|
-
schema: this.schema
|
|
353864
|
+
schema: this.schema,
|
|
353865
|
+
id: this.id
|
|
353136
353866
|
});
|
|
353137
353867
|
const convertedObject = objectConverter.convert();
|
|
353138
353868
|
if (convertedObject != null) {
|
|
@@ -353140,7 +353870,8 @@ var init_SchemaConverter = __esm({
|
|
|
353140
353870
|
convertedSchema: {
|
|
353141
353871
|
typeDeclaration: this.createTypeDeclaration({
|
|
353142
353872
|
shape: convertedObject.type,
|
|
353143
|
-
referencedTypes: convertedObject.referencedTypes
|
|
353873
|
+
referencedTypes: convertedObject.referencedTypes,
|
|
353874
|
+
encoding: convertedObject.xmlEncoding != null ? { json: void 0, proto: void 0, xml: convertedObject.xmlEncoding } : void 0
|
|
353144
353875
|
}),
|
|
353145
353876
|
audiences: this.audiences,
|
|
353146
353877
|
propertiesByAudience: convertedObject.propertiesByAudience
|
|
@@ -353202,13 +353933,13 @@ var init_SchemaConverter = __esm({
|
|
|
353202
353933
|
inlinedTypes: {}
|
|
353203
353934
|
};
|
|
353204
353935
|
}
|
|
353205
|
-
createTypeDeclaration({ shape, referencedTypes, omitV2Examples }) {
|
|
353936
|
+
createTypeDeclaration({ shape, referencedTypes, omitV2Examples, encoding }) {
|
|
353206
353937
|
return {
|
|
353207
353938
|
name: this.convertDeclaredTypeName(),
|
|
353208
353939
|
shape,
|
|
353209
353940
|
autogeneratedExamples: [],
|
|
353210
353941
|
userProvidedExamples: [],
|
|
353211
|
-
encoding
|
|
353942
|
+
encoding,
|
|
353212
353943
|
availability: this.context.getAvailability({
|
|
353213
353944
|
node: this.schema,
|
|
353214
353945
|
breadcrumbs: this.breadcrumbs
|
|
@@ -353488,7 +354219,7 @@ var init_SchemaOrReferenceConverter = __esm({
|
|
|
353488
354219
|
});
|
|
353489
354220
|
|
|
353490
354221
|
// ../api-importers/v3-importer-commons/lib/utils/ConvertProperties.js
|
|
353491
|
-
function convertProperties({ properties: properties7, required: required6, breadcrumbs, context: context3, errorCollector }) {
|
|
354222
|
+
function convertProperties({ properties: properties7, required: required6, breadcrumbs, context: context3, errorCollector, withinXmlElement = false }) {
|
|
353492
354223
|
const convertedProperties = [];
|
|
353493
354224
|
let inlinedTypesFromProperties = {};
|
|
353494
354225
|
const propertiesByAudience = {};
|
|
@@ -353529,6 +354260,12 @@ function convertProperties({ properties: properties7, required: required6, bread
|
|
|
353529
354260
|
availability: convertedProperty.availability,
|
|
353530
354261
|
propertyAccess: context3.getPropertyAccess(propertySchema),
|
|
353531
354262
|
defaultValue: resolvedPropertySchema?.default,
|
|
354263
|
+
xml: withinXmlElement ? new XmlPropertyExtension({
|
|
354264
|
+
breadcrumbs: propertyBreadcrumbs,
|
|
354265
|
+
propertySchema,
|
|
354266
|
+
resolvedPropertySchema: resolvedPropertySchema ?? void 0,
|
|
354267
|
+
context: context3
|
|
354268
|
+
}).convert() : void 0,
|
|
353532
354269
|
v2Examples: convertedProperty.schema?.typeDeclaration?.v2Examples ?? generatePropertyV2Examples({
|
|
353533
354270
|
propertySchema,
|
|
353534
354271
|
breadcrumbs: propertyBreadcrumbs,
|
|
@@ -353650,6 +354387,7 @@ var init_ConvertProperties = __esm({
|
|
|
353650
354387
|
"use strict";
|
|
353651
354388
|
init_ExampleConverter();
|
|
353652
354389
|
init_SchemaOrReferenceConverter();
|
|
354390
|
+
init_xml();
|
|
353653
354391
|
init_lib30();
|
|
353654
354392
|
}
|
|
353655
354393
|
});
|
|
@@ -361386,7 +362124,7 @@ function findRequestBodyProperty({ ir: ir3, endpoint: endpoint3, wireValue }) {
|
|
|
361386
362124
|
}
|
|
361387
362125
|
let properties7;
|
|
361388
362126
|
if (endpoint3.requestBody.type === "inlinedRequestBody") {
|
|
361389
|
-
properties7 = endpoint3.requestBody.properties;
|
|
362127
|
+
properties7 = endpoint3.requestBody.properties.map((prop2) => ({ ...prop2, xml: void 0 }));
|
|
361390
362128
|
} else if (endpoint3.requestBody.type === "reference" && endpoint3.requestBody.requestBodyType.type === "named") {
|
|
361391
362129
|
properties7 = getObjectPropertiesForNamedType(ir3, endpoint3.requestBody.requestBodyType.typeId);
|
|
361392
362130
|
}
|
|
@@ -361405,7 +362143,7 @@ function findCustomRequestProperties({ ir: ir3, endpoint: endpoint3, excludeWire
|
|
|
361405
362143
|
}
|
|
361406
362144
|
let properties7;
|
|
361407
362145
|
if (endpoint3.requestBody.type === "inlinedRequestBody") {
|
|
361408
|
-
properties7 = endpoint3.requestBody.properties;
|
|
362146
|
+
properties7 = endpoint3.requestBody.properties.map((prop) => ({ ...prop, xml: void 0 }));
|
|
361409
362147
|
} else if (endpoint3.requestBody.type === "reference" && endpoint3.requestBody.requestBodyType.type === "named") {
|
|
361410
362148
|
properties7 = getObjectPropertiesForNamedType(ir3, endpoint3.requestBody.requestBodyType.typeId);
|
|
361411
362149
|
}
|
|
@@ -706764,7 +707502,7 @@ var AccessTokenPosthogManager = class {
|
|
|
706764
707502
|
properties: {
|
|
706765
707503
|
...event,
|
|
706766
707504
|
...event.properties,
|
|
706767
|
-
version: "5.
|
|
707505
|
+
version: "5.122.0",
|
|
706768
707506
|
usingAccessToken: true,
|
|
706769
707507
|
...getRunIdProperties()
|
|
706770
707508
|
}
|
|
@@ -706830,7 +707568,7 @@ var UserPosthogManager = class {
|
|
|
706830
707568
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
706831
707569
|
event: "CLI",
|
|
706832
707570
|
properties: {
|
|
706833
|
-
version: "5.
|
|
707571
|
+
version: "5.122.0",
|
|
706834
707572
|
...event,
|
|
706835
707573
|
...event.properties,
|
|
706836
707574
|
usingAccessToken: false,
|
|
@@ -888533,7 +889271,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
888533
889271
|
var LOGS_FOLDER_NAME = "logs";
|
|
888534
889272
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
888535
889273
|
function getCliSource() {
|
|
888536
|
-
const version7 = "5.
|
|
889274
|
+
const version7 = "5.122.0";
|
|
888537
889275
|
return `cli@${version7}`;
|
|
888538
889276
|
}
|
|
888539
889277
|
var DebugLogger = class {
|
|
@@ -915883,7 +916621,7 @@ var LegacyDocsPublisher = class {
|
|
|
915883
916621
|
previewId,
|
|
915884
916622
|
disableTemplates: void 0,
|
|
915885
916623
|
skipUpload,
|
|
915886
|
-
cliVersion: "5.
|
|
916624
|
+
cliVersion: "5.122.0",
|
|
915887
916625
|
loginCommand: "fern auth login"
|
|
915888
916626
|
});
|
|
915889
916627
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -967003,6 +967741,10 @@ var TypescriptCustomConfigSchema = external_exports2.strictObject({
|
|
|
967003
967741
|
// Workers, Deno). Node behavior is unchanged.
|
|
967004
967742
|
guardProcessEnvAccess: external_exports2.optional(external_exports2.boolean()),
|
|
967005
967743
|
generateReactQueryHooks: external_exports2.optional(external_exports2.boolean()),
|
|
967744
|
+
// Controls how generated WebSocket socket classes store handlers registered via `on()`.
|
|
967745
|
+
// `replace` (default): a second `on()` for the same event replaces the previous handler.
|
|
967746
|
+
// `accumulate`: handlers accumulate and run in registration order.
|
|
967747
|
+
websocketHandlerMode: external_exports2.optional(external_exports2.enum(["replace", "accumulate"])),
|
|
967006
967748
|
// beta (not in docs)
|
|
967007
967749
|
includeContentHeadersOnFileDownloadResponse: external_exports2.optional(external_exports2.boolean()),
|
|
967008
967750
|
includeUtilsOnUnionMembers: external_exports2.optional(external_exports2.boolean()),
|
|
@@ -979865,6 +980607,7 @@ function convertFields({ fields, breadcrumbs, context: context3, sourceCodeInfoP
|
|
|
979865
980607
|
availability: convertedField.availability,
|
|
979866
980608
|
propertyAccess: void 0,
|
|
979867
980609
|
defaultValue: void 0,
|
|
980610
|
+
xml: void 0,
|
|
979868
980611
|
v2Examples: void 0
|
|
979869
980612
|
};
|
|
979870
980613
|
const hasOneofIndex = Object.hasOwn(field5, "oneofIndex");
|
|
@@ -980038,6 +980781,7 @@ var MessageConverter = class extends AbstractConverter {
|
|
|
980038
980781
|
availability: convertedOneOfField.availability,
|
|
980039
980782
|
propertyAccess: void 0,
|
|
980040
980783
|
defaultValue: void 0,
|
|
980784
|
+
xml: void 0,
|
|
980041
980785
|
v2Examples: void 0
|
|
980042
980786
|
});
|
|
980043
980787
|
inlinedTypes = {
|
|
@@ -983308,7 +984052,7 @@ function getAutomationContextFromEnv() {
|
|
|
983308
984052
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
983309
984053
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
983310
984054
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
983311
|
-
cli_version: "5.
|
|
984055
|
+
cli_version: "5.122.0"
|
|
983312
984056
|
};
|
|
983313
984057
|
}
|
|
983314
984058
|
function isAutomationMode() {
|
|
@@ -984140,7 +984884,7 @@ var CliContext = class _CliContext {
|
|
|
984140
984884
|
if (false) {
|
|
984141
984885
|
this.logger.error("CLI_VERSION is not defined");
|
|
984142
984886
|
}
|
|
984143
|
-
return "5.
|
|
984887
|
+
return "5.122.0";
|
|
984144
984888
|
}
|
|
984145
984889
|
getCliName() {
|
|
984146
984890
|
if (false) {
|