fern-api 0.17.1 → 0.17.2
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/bundle.cjs +191 -91
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -735189,7 +735189,7 @@ var AccessTokenPosthogManager = class {
|
|
|
735189
735189
|
properties: {
|
|
735190
735190
|
...event,
|
|
735191
735191
|
...event.properties,
|
|
735192
|
-
version: "0.17.
|
|
735192
|
+
version: "0.17.2",
|
|
735193
735193
|
usingAccessToken: true
|
|
735194
735194
|
}
|
|
735195
735195
|
});
|
|
@@ -735251,7 +735251,7 @@ var UserPosthogManager = class {
|
|
|
735251
735251
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
735252
735252
|
event: "CLI",
|
|
735253
735253
|
properties: {
|
|
735254
|
-
version: "0.17.
|
|
735254
|
+
version: "0.17.2",
|
|
735255
735255
|
...event,
|
|
735256
735256
|
...event.properties
|
|
735257
735257
|
}
|
|
@@ -751420,15 +751420,10 @@ var ExampleTypeFactory = class {
|
|
|
751420
751420
|
constructor(schemas) {
|
|
751421
751421
|
this.schemas = schemas;
|
|
751422
751422
|
}
|
|
751423
|
-
buildExample({
|
|
751424
|
-
schema: schema2,
|
|
751425
|
-
example,
|
|
751426
|
-
isOptional = false,
|
|
751427
|
-
parameter = false
|
|
751428
|
-
}) {
|
|
751429
|
-
return this.buildExampleHelper({ schema: schema2, isOptional, visitedSchemaIds: /* @__PURE__ */ new Set(), example, parameter });
|
|
751423
|
+
buildExample({ schema: schema2, example, options }) {
|
|
751424
|
+
return this.buildExampleHelper({ schema: schema2, visitedSchemaIds: /* @__PURE__ */ new Set(), example, options, depth: 0 });
|
|
751430
751425
|
}
|
|
751431
|
-
buildExampleHelper({ example, schema: schema2,
|
|
751426
|
+
buildExampleHelper({ example, schema: schema2, depth, visitedSchemaIds, options }) {
|
|
751432
751427
|
var _a2, _b2;
|
|
751433
751428
|
switch (schema2.type) {
|
|
751434
751429
|
case "enum":
|
|
@@ -751438,25 +751433,53 @@ var ExampleTypeFactory = class {
|
|
|
751438
751433
|
return schema2.values[0] != null ? import_example2.FullExample.enum((_a2 = schema2.values[0]) == null ? void 0 : _a2.value) : void 0;
|
|
751439
751434
|
case "literal":
|
|
751440
751435
|
return import_example2.FullExample.literal(schema2.value);
|
|
751441
|
-
case "nullable":
|
|
751442
|
-
|
|
751436
|
+
case "nullable": {
|
|
751437
|
+
if (example == null && !this.hasExample(schema2.value) && (options.ignoreOptionals || this.exceedsMaxDepth(depth, options))) {
|
|
751438
|
+
return void 0;
|
|
751439
|
+
}
|
|
751440
|
+
const result2 = this.buildExampleHelper({
|
|
751443
751441
|
schema: schema2.value,
|
|
751444
|
-
isOptional: true,
|
|
751445
751442
|
visitedSchemaIds,
|
|
751446
751443
|
example,
|
|
751447
|
-
|
|
751444
|
+
depth,
|
|
751445
|
+
options
|
|
751448
751446
|
});
|
|
751449
|
-
|
|
751450
|
-
|
|
751447
|
+
if (result2 != null && result2.type === "array" && result2.array.length === 0) {
|
|
751448
|
+
return void 0;
|
|
751449
|
+
}
|
|
751450
|
+
if (result2 != null && result2.type === "map" && result2.map.length === 0) {
|
|
751451
|
+
return void 0;
|
|
751452
|
+
}
|
|
751453
|
+
if (result2 != null && result2.type === "object" && Object.keys(result2.properties).length === 0) {
|
|
751454
|
+
return void 0;
|
|
751455
|
+
}
|
|
751456
|
+
return result2;
|
|
751457
|
+
}
|
|
751458
|
+
case "optional": {
|
|
751459
|
+
if (example == null && !this.hasExample(schema2.value) && (options.ignoreOptionals || this.exceedsMaxDepth(depth, options))) {
|
|
751460
|
+
return void 0;
|
|
751461
|
+
}
|
|
751462
|
+
const result2 = this.buildExampleHelper({
|
|
751451
751463
|
schema: schema2.value,
|
|
751452
|
-
isOptional: true,
|
|
751453
751464
|
visitedSchemaIds,
|
|
751454
751465
|
example,
|
|
751455
|
-
|
|
751466
|
+
depth,
|
|
751467
|
+
options
|
|
751456
751468
|
});
|
|
751469
|
+
if (result2 != null && result2.type === "array" && result2.array.length === 0) {
|
|
751470
|
+
return void 0;
|
|
751471
|
+
}
|
|
751472
|
+
if (result2 != null && result2.type === "map" && result2.map.length === 0) {
|
|
751473
|
+
return void 0;
|
|
751474
|
+
}
|
|
751475
|
+
if (result2 != null && result2.type === "object" && Object.keys(result2.properties).length === 0) {
|
|
751476
|
+
return void 0;
|
|
751477
|
+
}
|
|
751478
|
+
return result2;
|
|
751479
|
+
}
|
|
751457
751480
|
case "primitive": {
|
|
751458
|
-
const primitiveExample = this.buildExampleFromPrimitive({ schema: schema2.schema, example,
|
|
751459
|
-
return
|
|
751481
|
+
const primitiveExample = this.buildExampleFromPrimitive({ schema: schema2.schema, example, options });
|
|
751482
|
+
return import_example2.FullExample.primitive(primitiveExample);
|
|
751460
751483
|
}
|
|
751461
751484
|
case "reference": {
|
|
751462
751485
|
const referencedSchemaWithExample = this.schemas[schema2.schema];
|
|
@@ -751465,9 +751488,9 @@ var ExampleTypeFactory = class {
|
|
|
751465
751488
|
const referencedExample = this.buildExampleHelper({
|
|
751466
751489
|
example,
|
|
751467
751490
|
schema: referencedSchemaWithExample,
|
|
751468
|
-
isOptional,
|
|
751469
751491
|
visitedSchemaIds,
|
|
751470
|
-
|
|
751492
|
+
depth,
|
|
751493
|
+
options
|
|
751471
751494
|
});
|
|
751472
751495
|
visitedSchemaIds.delete(schema2.schema);
|
|
751473
751496
|
return referencedExample;
|
|
@@ -751508,9 +751531,9 @@ var ExampleTypeFactory = class {
|
|
|
751508
751531
|
const propertyExample = this.buildExampleHelper({
|
|
751509
751532
|
schema: schema3,
|
|
751510
751533
|
example: fullExample[property3],
|
|
751511
|
-
isOptional: !required,
|
|
751512
751534
|
visitedSchemaIds,
|
|
751513
|
-
|
|
751535
|
+
depth: depth + 1,
|
|
751536
|
+
options
|
|
751514
751537
|
});
|
|
751515
751538
|
if (propertyExample != null) {
|
|
751516
751539
|
result2[property3] = propertyExample;
|
|
@@ -751521,9 +751544,9 @@ var ExampleTypeFactory = class {
|
|
|
751521
751544
|
const propertyExample = this.buildExampleHelper({
|
|
751522
751545
|
schema: schema3,
|
|
751523
751546
|
example: fullExample == null ? void 0 : fullExample[property3],
|
|
751524
|
-
isOptional: !required,
|
|
751525
751547
|
visitedSchemaIds,
|
|
751526
|
-
|
|
751548
|
+
depth: depth + 1,
|
|
751549
|
+
options
|
|
751527
751550
|
});
|
|
751528
751551
|
if (propertyExample != null) {
|
|
751529
751552
|
result2[property3] = propertyExample;
|
|
@@ -751542,9 +751565,9 @@ var ExampleTypeFactory = class {
|
|
|
751542
751565
|
return this.buildExampleHelper({
|
|
751543
751566
|
example,
|
|
751544
751567
|
schema: schema2.oneOf.schemas[0],
|
|
751545
|
-
isOptional,
|
|
751546
751568
|
visitedSchemaIds,
|
|
751547
|
-
|
|
751569
|
+
depth,
|
|
751570
|
+
options
|
|
751548
751571
|
});
|
|
751549
751572
|
}
|
|
751550
751573
|
break;
|
|
@@ -751558,30 +751581,45 @@ var ExampleTypeFactory = class {
|
|
|
751558
751581
|
return import_example2.FullExample.unknown(fullExample);
|
|
751559
751582
|
}
|
|
751560
751583
|
}
|
|
751561
|
-
if (
|
|
751584
|
+
if (options.ignoreOptionals || this.exceedsMaxDepth(depth, options)) {
|
|
751562
751585
|
return void 0;
|
|
751563
|
-
} else if (parameter) {
|
|
751564
|
-
return import_example2.FullExample.primitive(import_example2.PrimitiveExample.string("string"));
|
|
751565
751586
|
}
|
|
751566
|
-
|
|
751587
|
+
if (options.isParameter) {
|
|
751588
|
+
return import_example2.FullExample.primitive(import_example2.PrimitiveExample.string(options.name ?? "string"));
|
|
751589
|
+
}
|
|
751590
|
+
return import_example2.FullExample.map([
|
|
751591
|
+
{
|
|
751592
|
+
key: import_example2.PrimitiveExample.string("key"),
|
|
751593
|
+
value: import_example2.FullExample.primitive(import_example2.PrimitiveExample.string("value"))
|
|
751594
|
+
}
|
|
751595
|
+
]);
|
|
751567
751596
|
case "array": {
|
|
751568
751597
|
const fullExample = getFullExampleAsArray(example);
|
|
751569
|
-
if (isOptional && fullExample == null) {
|
|
751570
|
-
return void 0;
|
|
751571
|
-
}
|
|
751572
751598
|
const itemExamples = [];
|
|
751573
|
-
|
|
751574
|
-
const
|
|
751575
|
-
|
|
751576
|
-
|
|
751577
|
-
|
|
751578
|
-
|
|
751579
|
-
|
|
751580
|
-
|
|
751581
|
-
|
|
751582
|
-
|
|
751599
|
+
if (fullExample != null && fullExample.length > 0) {
|
|
751600
|
+
for (const item of fullExample) {
|
|
751601
|
+
const itemExample2 = this.buildExampleHelper({
|
|
751602
|
+
example: item,
|
|
751603
|
+
schema: schema2.value,
|
|
751604
|
+
depth: depth + 1,
|
|
751605
|
+
visitedSchemaIds,
|
|
751606
|
+
options
|
|
751607
|
+
});
|
|
751608
|
+
if (itemExample2 != null) {
|
|
751609
|
+
itemExamples.push(itemExample2);
|
|
751610
|
+
}
|
|
751583
751611
|
}
|
|
751584
751612
|
}
|
|
751613
|
+
const itemExample = this.buildExampleHelper({
|
|
751614
|
+
example: void 0,
|
|
751615
|
+
schema: schema2.value,
|
|
751616
|
+
depth: depth + 1,
|
|
751617
|
+
visitedSchemaIds,
|
|
751618
|
+
options
|
|
751619
|
+
});
|
|
751620
|
+
if (itemExample != null) {
|
|
751621
|
+
itemExamples.push(itemExample);
|
|
751622
|
+
}
|
|
751585
751623
|
return import_example2.FullExample.array(itemExamples);
|
|
751586
751624
|
}
|
|
751587
751625
|
case "map": {
|
|
@@ -751592,16 +751630,16 @@ var ExampleTypeFactory = class {
|
|
|
751592
751630
|
const keyExample2 = this.buildExampleFromPrimitive({
|
|
751593
751631
|
schema: schema2.key.schema,
|
|
751594
751632
|
example: key2,
|
|
751595
|
-
|
|
751633
|
+
options
|
|
751596
751634
|
});
|
|
751597
751635
|
const valueExample2 = this.buildExampleHelper({
|
|
751598
751636
|
example: value,
|
|
751599
751637
|
schema: schema2.value,
|
|
751600
|
-
isOptional,
|
|
751601
751638
|
visitedSchemaIds,
|
|
751602
|
-
|
|
751639
|
+
depth: depth + 1,
|
|
751640
|
+
options
|
|
751603
751641
|
});
|
|
751604
|
-
if (
|
|
751642
|
+
if (valueExample2 != null) {
|
|
751605
751643
|
kvs.push({
|
|
751606
751644
|
key: keyExample2,
|
|
751607
751645
|
value: valueExample2
|
|
@@ -751613,16 +751651,16 @@ var ExampleTypeFactory = class {
|
|
|
751613
751651
|
const keyExample = this.buildExampleFromPrimitive({
|
|
751614
751652
|
schema: schema2.key.schema,
|
|
751615
751653
|
example: void 0,
|
|
751616
|
-
|
|
751654
|
+
options
|
|
751617
751655
|
});
|
|
751618
751656
|
const valueExample = this.buildExampleHelper({
|
|
751619
751657
|
example: void 0,
|
|
751620
751658
|
schema: schema2.value,
|
|
751621
|
-
isOptional,
|
|
751622
751659
|
visitedSchemaIds,
|
|
751623
|
-
|
|
751660
|
+
depth: depth + 1,
|
|
751661
|
+
options
|
|
751624
751662
|
});
|
|
751625
|
-
if (
|
|
751663
|
+
if (valueExample != null) {
|
|
751626
751664
|
return import_example2.FullExample.map([
|
|
751627
751665
|
{
|
|
751628
751666
|
key: keyExample,
|
|
@@ -751630,7 +751668,7 @@ var ExampleTypeFactory = class {
|
|
|
751630
751668
|
}
|
|
751631
751669
|
]);
|
|
751632
751670
|
}
|
|
751633
|
-
return
|
|
751671
|
+
return import_example2.FullExample.map([]);
|
|
751634
751672
|
}
|
|
751635
751673
|
case "object": {
|
|
751636
751674
|
const result2 = {};
|
|
@@ -751642,25 +751680,82 @@ var ExampleTypeFactory = class {
|
|
|
751642
751680
|
const propertyExample = this.buildExampleHelper({
|
|
751643
751681
|
schema: schema3,
|
|
751644
751682
|
example: fullExample[property3],
|
|
751645
|
-
isOptional: !required,
|
|
751646
751683
|
visitedSchemaIds,
|
|
751647
|
-
|
|
751684
|
+
depth: depth + 1,
|
|
751685
|
+
options: {
|
|
751686
|
+
...options,
|
|
751687
|
+
name: property3
|
|
751688
|
+
}
|
|
751648
751689
|
});
|
|
751649
751690
|
if (propertyExample != null) {
|
|
751650
751691
|
result2[property3] = propertyExample;
|
|
751651
751692
|
} else if (required) {
|
|
751652
|
-
|
|
751693
|
+
const generatedExample = this.buildExampleHelper({
|
|
751694
|
+
schema: schema3,
|
|
751695
|
+
example: fullExample[property3],
|
|
751696
|
+
visitedSchemaIds,
|
|
751697
|
+
depth: depth + 1,
|
|
751698
|
+
options: {
|
|
751699
|
+
...options,
|
|
751700
|
+
name: property3
|
|
751701
|
+
}
|
|
751702
|
+
});
|
|
751703
|
+
if (generatedExample == null) {
|
|
751704
|
+
return void 0;
|
|
751705
|
+
}
|
|
751706
|
+
result2[property3] = generatedExample;
|
|
751653
751707
|
}
|
|
751654
751708
|
}
|
|
751655
|
-
|
|
751709
|
+
return import_example2.FullExample.object({
|
|
751656
751710
|
properties: result2
|
|
751657
751711
|
});
|
|
751658
|
-
return a2;
|
|
751659
751712
|
}
|
|
751660
751713
|
default:
|
|
751661
751714
|
assertNever(schema2);
|
|
751662
751715
|
}
|
|
751663
751716
|
}
|
|
751717
|
+
hasExample(schema2) {
|
|
751718
|
+
switch (schema2.type) {
|
|
751719
|
+
case "array":
|
|
751720
|
+
return this.hasExample(schema2.value);
|
|
751721
|
+
case "enum":
|
|
751722
|
+
return schema2.example != null;
|
|
751723
|
+
case "literal":
|
|
751724
|
+
return false;
|
|
751725
|
+
case "map":
|
|
751726
|
+
return schema2.key.schema.example != null && this.hasExample(schema2.value);
|
|
751727
|
+
case "object": {
|
|
751728
|
+
const objectExample = schema2.fullExamples != null && schema2.fullExamples.length > 0;
|
|
751729
|
+
if (objectExample) {
|
|
751730
|
+
return true;
|
|
751731
|
+
}
|
|
751732
|
+
for (const property3 of schema2.properties) {
|
|
751733
|
+
if (this.hasExample(property3.schema)) {
|
|
751734
|
+
return true;
|
|
751735
|
+
}
|
|
751736
|
+
}
|
|
751737
|
+
return false;
|
|
751738
|
+
}
|
|
751739
|
+
case "primitive":
|
|
751740
|
+
return schema2.schema.example != null;
|
|
751741
|
+
case "reference": {
|
|
751742
|
+
const resolvedSchema = this.schemas[schema2.schema];
|
|
751743
|
+
if (resolvedSchema != null) {
|
|
751744
|
+
return this.hasExample(resolvedSchema);
|
|
751745
|
+
}
|
|
751746
|
+
return false;
|
|
751747
|
+
}
|
|
751748
|
+
case "unknown":
|
|
751749
|
+
return schema2.example != null;
|
|
751750
|
+
case "oneOf":
|
|
751751
|
+
return Object.values(schema2.oneOf.schemas).some((schema3) => this.hasExample(schema3));
|
|
751752
|
+
default:
|
|
751753
|
+
return false;
|
|
751754
|
+
}
|
|
751755
|
+
}
|
|
751756
|
+
exceedsMaxDepth(depth, options) {
|
|
751757
|
+
return depth > (options.maxDepth ?? 0);
|
|
751758
|
+
}
|
|
751664
751759
|
getAllProperties(object2) {
|
|
751665
751760
|
let properties = {};
|
|
751666
751761
|
for (const property3 of object2.properties) {
|
|
@@ -751716,89 +751811,80 @@ var ExampleTypeFactory = class {
|
|
|
751716
751811
|
}
|
|
751717
751812
|
return schema2;
|
|
751718
751813
|
}
|
|
751719
|
-
buildExampleFromPrimitive({
|
|
751814
|
+
buildExampleFromPrimitive({ example, schema: schema2, options }) {
|
|
751720
751815
|
switch (schema2.type) {
|
|
751721
751816
|
case "string":
|
|
751722
751817
|
if (example != null && typeof example === "string") {
|
|
751723
751818
|
return import_example2.PrimitiveExample.string(example);
|
|
751724
751819
|
} else if (schema2.example != null) {
|
|
751725
751820
|
return import_example2.PrimitiveExample.string(schema2.example);
|
|
751726
|
-
} else
|
|
751727
|
-
return import_example2.PrimitiveExample.string("string");
|
|
751821
|
+
} else {
|
|
751822
|
+
return import_example2.PrimitiveExample.string(options.name ?? "string");
|
|
751728
751823
|
}
|
|
751729
|
-
return void 0;
|
|
751730
751824
|
case "base64":
|
|
751731
751825
|
if (example != null && typeof example === "string") {
|
|
751732
751826
|
return import_example2.PrimitiveExample.base64(example);
|
|
751733
751827
|
} else if (schema2.example != null) {
|
|
751734
751828
|
return import_example2.PrimitiveExample.base64(schema2.example);
|
|
751735
|
-
} else
|
|
751829
|
+
} else {
|
|
751736
751830
|
return import_example2.PrimitiveExample.base64("SGVsbG8gd29ybGQh");
|
|
751737
751831
|
}
|
|
751738
|
-
return void 0;
|
|
751739
751832
|
case "boolean":
|
|
751740
751833
|
if (example != null && typeof example === "boolean") {
|
|
751741
751834
|
return import_example2.PrimitiveExample.boolean(example);
|
|
751742
751835
|
} else if (schema2.example != null) {
|
|
751743
751836
|
return import_example2.PrimitiveExample.boolean(schema2.example);
|
|
751744
|
-
} else
|
|
751837
|
+
} else {
|
|
751745
751838
|
return import_example2.PrimitiveExample.boolean(true);
|
|
751746
751839
|
}
|
|
751747
|
-
return void 0;
|
|
751748
751840
|
case "date":
|
|
751749
751841
|
if (example != null && typeof example === "string") {
|
|
751750
751842
|
return import_example2.PrimitiveExample.date(example);
|
|
751751
751843
|
} else if (schema2.example != null) {
|
|
751752
751844
|
return import_example2.PrimitiveExample.date(schema2.example);
|
|
751753
|
-
} else
|
|
751845
|
+
} else {
|
|
751754
751846
|
return import_example2.PrimitiveExample.date("2023-01-15");
|
|
751755
751847
|
}
|
|
751756
|
-
return void 0;
|
|
751757
751848
|
case "datetime":
|
|
751758
751849
|
if (example != null && typeof example === "string") {
|
|
751759
751850
|
return import_example2.PrimitiveExample.datetime(example);
|
|
751760
751851
|
} else if (schema2.example != null) {
|
|
751761
751852
|
return import_example2.PrimitiveExample.datetime(schema2.example);
|
|
751762
|
-
} else
|
|
751853
|
+
} else {
|
|
751763
751854
|
return import_example2.PrimitiveExample.datetime("2024-01-15T09:30:00Z");
|
|
751764
751855
|
}
|
|
751765
|
-
return void 0;
|
|
751766
751856
|
case "double":
|
|
751767
751857
|
if (example != null && typeof example === "number") {
|
|
751768
751858
|
return import_example2.PrimitiveExample.double(example);
|
|
751769
751859
|
} else if (schema2.example != null) {
|
|
751770
751860
|
return import_example2.PrimitiveExample.double(schema2.example);
|
|
751771
|
-
} else
|
|
751861
|
+
} else {
|
|
751772
751862
|
return import_example2.PrimitiveExample.double(1.1);
|
|
751773
751863
|
}
|
|
751774
|
-
return void 0;
|
|
751775
751864
|
case "float":
|
|
751776
751865
|
if (example != null && typeof example === "number") {
|
|
751777
751866
|
return import_example2.PrimitiveExample.float(example);
|
|
751778
751867
|
} else if (schema2.example != null) {
|
|
751779
751868
|
return import_example2.PrimitiveExample.float(schema2.example);
|
|
751780
|
-
} else
|
|
751869
|
+
} else {
|
|
751781
751870
|
return import_example2.PrimitiveExample.float(1.1);
|
|
751782
751871
|
}
|
|
751783
|
-
return void 0;
|
|
751784
751872
|
case "int":
|
|
751785
751873
|
if (example != null && typeof example === "number") {
|
|
751786
751874
|
return import_example2.PrimitiveExample.int(example);
|
|
751787
751875
|
} else if (schema2.example != null) {
|
|
751788
751876
|
return import_example2.PrimitiveExample.int(1);
|
|
751789
|
-
} else
|
|
751877
|
+
} else {
|
|
751790
751878
|
return import_example2.PrimitiveExample.int(1);
|
|
751791
751879
|
}
|
|
751792
|
-
return void 0;
|
|
751793
751880
|
case "int64":
|
|
751794
751881
|
if (example != null && typeof example === "number") {
|
|
751795
751882
|
return import_example2.PrimitiveExample.int64(example);
|
|
751796
751883
|
} else if (schema2.example != null) {
|
|
751797
751884
|
return import_example2.PrimitiveExample.int64(schema2.example);
|
|
751798
|
-
} else
|
|
751885
|
+
} else {
|
|
751799
751886
|
return import_example2.PrimitiveExample.int64(1e6);
|
|
751800
751887
|
}
|
|
751801
|
-
return void 0;
|
|
751802
751888
|
default:
|
|
751803
751889
|
assertNever(schema2);
|
|
751804
751890
|
}
|
|
@@ -751834,8 +751920,10 @@ var ExampleEndpointFactory = class {
|
|
|
751834
751920
|
requestExample = this.exampleTypeFactory.buildExample({
|
|
751835
751921
|
schema: requestSchemaIdResponse.schema,
|
|
751836
751922
|
example: (_a2 = requestSchemaIdResponse.example) == null ? void 0 : _a2.value,
|
|
751837
|
-
|
|
751838
|
-
|
|
751923
|
+
options: {
|
|
751924
|
+
isParameter: false,
|
|
751925
|
+
ignoreOptionals: true
|
|
751926
|
+
}
|
|
751839
751927
|
});
|
|
751840
751928
|
if (required && requestExample == null) {
|
|
751841
751929
|
return void 0;
|
|
@@ -751847,8 +751935,11 @@ var ExampleEndpointFactory = class {
|
|
|
751847
751935
|
responseExample = this.exampleTypeFactory.buildExample({
|
|
751848
751936
|
schema: responseSchemaIdResponse.schema,
|
|
751849
751937
|
example: (_b2 = responseSchemaIdResponse.example) == null ? void 0 : _b2.value,
|
|
751850
|
-
|
|
751851
|
-
|
|
751938
|
+
options: {
|
|
751939
|
+
isParameter: false,
|
|
751940
|
+
ignoreOptionals: false,
|
|
751941
|
+
maxDepth: 3
|
|
751942
|
+
}
|
|
751852
751943
|
});
|
|
751853
751944
|
if (required && responseExample == null) {
|
|
751854
751945
|
return void 0;
|
|
@@ -751859,9 +751950,12 @@ var ExampleEndpointFactory = class {
|
|
|
751859
751950
|
const required = this.isSchemaRequired(pathParameter.schema);
|
|
751860
751951
|
let example = this.exampleTypeFactory.buildExample({
|
|
751861
751952
|
schema: pathParameter.schema,
|
|
751862
|
-
isOptional: !required,
|
|
751863
751953
|
example: void 0,
|
|
751864
|
-
|
|
751954
|
+
options: {
|
|
751955
|
+
name: pathParameter.name,
|
|
751956
|
+
isParameter: true,
|
|
751957
|
+
ignoreOptionals: true
|
|
751958
|
+
}
|
|
751865
751959
|
});
|
|
751866
751960
|
if (example != null && !isExamplePrimitive(example)) {
|
|
751867
751961
|
example = void 0;
|
|
@@ -751880,9 +751974,12 @@ var ExampleEndpointFactory = class {
|
|
|
751880
751974
|
const required = this.isSchemaRequired(queryParameter.schema);
|
|
751881
751975
|
let example = this.exampleTypeFactory.buildExample({
|
|
751882
751976
|
schema: queryParameter.schema,
|
|
751883
|
-
isOptional: !required,
|
|
751884
751977
|
example: void 0,
|
|
751885
|
-
|
|
751978
|
+
options: {
|
|
751979
|
+
name: queryParameter.name,
|
|
751980
|
+
isParameter: true,
|
|
751981
|
+
ignoreOptionals: true
|
|
751982
|
+
}
|
|
751886
751983
|
});
|
|
751887
751984
|
if (example != null && !isExamplePrimitive(example)) {
|
|
751888
751985
|
example = void 0;
|
|
@@ -751901,9 +751998,12 @@ var ExampleEndpointFactory = class {
|
|
|
751901
751998
|
const required = this.isSchemaRequired(header.schema);
|
|
751902
751999
|
let example = this.exampleTypeFactory.buildExample({
|
|
751903
752000
|
schema: header.schema,
|
|
751904
|
-
isOptional: !required,
|
|
751905
752001
|
example: void 0,
|
|
751906
|
-
|
|
752002
|
+
options: {
|
|
752003
|
+
name: header.name,
|
|
752004
|
+
isParameter: true,
|
|
752005
|
+
ignoreOptionals: true
|
|
752006
|
+
}
|
|
751907
752007
|
});
|
|
751908
752008
|
if (example != null && !isExamplePrimitive(example)) {
|
|
751909
752009
|
example = void 0;
|
|
@@ -760945,10 +761045,10 @@ var CliContext = class {
|
|
|
760945
761045
|
return "fern-api";
|
|
760946
761046
|
}
|
|
760947
761047
|
getPackageVersion() {
|
|
760948
|
-
if ("0.17.
|
|
761048
|
+
if ("0.17.2" == null) {
|
|
760949
761049
|
this.logger.error("CLI_VERSION is not defined");
|
|
760950
761050
|
}
|
|
760951
|
-
return "0.17.
|
|
761051
|
+
return "0.17.2";
|
|
760952
761052
|
}
|
|
760953
761053
|
getCliName() {
|
|
760954
761054
|
if ("fern" == null) {
|