fern-api 0.23.5 → 0.23.7
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 +198 -142
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -345019,7 +345019,8 @@ var init_WebsocketHandshake2 = __esm({
|
|
|
345019
345019
|
init_core3();
|
|
345020
345020
|
WebsocketHandshake = schemas_exports5.objectWithoutOptionalProperties({
|
|
345021
345021
|
queryParameters: schemas_exports5.list(schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).QueryParameter)),
|
|
345022
|
-
headers: schemas_exports5.list(schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).Header))
|
|
345022
|
+
headers: schemas_exports5.list(schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).Header)),
|
|
345023
|
+
pathParameters: schemas_exports5.list(schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).PathParameter))
|
|
345023
345024
|
});
|
|
345024
345025
|
}
|
|
345025
345026
|
});
|
|
@@ -345716,6 +345717,7 @@ var init_ObjectProperty4 = __esm({
|
|
|
345716
345717
|
schema: schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).Schema),
|
|
345717
345718
|
conflict: schemas_exports5.record(schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SchemaId), schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).ObjectPropertyConflictInfo)),
|
|
345718
345719
|
generatedName: schemas_exports5.string(),
|
|
345720
|
+
nameOverride: schemas_exports5.string().optional(),
|
|
345719
345721
|
audiences: schemas_exports5.list(schemas_exports5.string())
|
|
345720
345722
|
});
|
|
345721
345723
|
}
|
|
@@ -346373,6 +346375,7 @@ var init_ObjectPropertyWithExample2 = __esm({
|
|
|
346373
346375
|
schema: schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SchemaWithExample),
|
|
346374
346376
|
audiences: schemas_exports5.list(schemas_exports5.string()),
|
|
346375
346377
|
conflict: schemas_exports5.record(schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SchemaId), schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).ObjectPropertyConflictInfo)),
|
|
346378
|
+
nameOverride: schemas_exports5.string().optional(),
|
|
346376
346379
|
generatedName: schemas_exports5.string()
|
|
346377
346380
|
});
|
|
346378
346381
|
}
|
|
@@ -890696,7 +890699,7 @@ var AccessTokenPosthogManager = class {
|
|
|
890696
890699
|
properties: {
|
|
890697
890700
|
...event,
|
|
890698
890701
|
...event.properties,
|
|
890699
|
-
version: "0.23.
|
|
890702
|
+
version: "0.23.7",
|
|
890700
890703
|
usingAccessToken: true
|
|
890701
890704
|
}
|
|
890702
890705
|
});
|
|
@@ -890758,7 +890761,7 @@ var UserPosthogManager = class {
|
|
|
890758
890761
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
890759
890762
|
event: "CLI",
|
|
890760
890763
|
properties: {
|
|
890761
|
-
version: "0.23.
|
|
890764
|
+
version: "0.23.7",
|
|
890762
890765
|
...event,
|
|
890763
890766
|
...event.properties
|
|
890764
890767
|
}
|
|
@@ -903034,8 +903037,14 @@ function buildObjectTypeDeclaration({ schema: schema2, context, declarationFile
|
|
|
903034
903037
|
context,
|
|
903035
903038
|
fileContainingReference: declarationFile
|
|
903036
903039
|
});
|
|
903037
|
-
|
|
903038
|
-
|
|
903040
|
+
const audiences = property5.audiences;
|
|
903041
|
+
const name2 = property5.nameOverride;
|
|
903042
|
+
if (audiences.length > 0 && name2 != null) {
|
|
903043
|
+
properties[property5.key] = typeof typeReference === "string" ? { type: typeReference, audiences, name: name2 } : { ...typeReference, audiences, name: name2 };
|
|
903044
|
+
} else if (name2 != null) {
|
|
903045
|
+
properties[property5.key] = typeof typeReference === "string" ? { type: typeReference, name: name2 } : { ...typeReference, name: name2 };
|
|
903046
|
+
} else if (audiences.length > 0) {
|
|
903047
|
+
properties[property5.key] = typeof typeReference === "string" ? { type: typeReference, audiences } : { ...typeReference, audiences };
|
|
903039
903048
|
} else {
|
|
903040
903049
|
properties[property5.key] = typeReference;
|
|
903041
903050
|
}
|
|
@@ -903493,6 +903502,27 @@ function buildHeader({ header, context, fileContainingReference }) {
|
|
|
903493
903502
|
return headerSchema;
|
|
903494
903503
|
}
|
|
903495
903504
|
|
|
903505
|
+
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/buildPathParameter.js
|
|
903506
|
+
function buildPathParameter({ pathParameter, context, fileContainingReference }) {
|
|
903507
|
+
const typeReference = buildTypeReference({
|
|
903508
|
+
schema: pathParameter.schema,
|
|
903509
|
+
context,
|
|
903510
|
+
fileContainingReference
|
|
903511
|
+
});
|
|
903512
|
+
if (pathParameter.variableReference == null && pathParameter.description == null) {
|
|
903513
|
+
return getTypeFromTypeReference(typeReference);
|
|
903514
|
+
}
|
|
903515
|
+
const pathParameterSchema = pathParameter.variableReference != null ? {
|
|
903516
|
+
variable: `$${pathParameter.variableReference}`
|
|
903517
|
+
} : {
|
|
903518
|
+
type: getTypeFromTypeReference(typeReference)
|
|
903519
|
+
};
|
|
903520
|
+
if (pathParameter.description != null) {
|
|
903521
|
+
pathParameterSchema.docs = pathParameter.description;
|
|
903522
|
+
}
|
|
903523
|
+
return pathParameterSchema;
|
|
903524
|
+
}
|
|
903525
|
+
|
|
903496
903526
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/parse.js
|
|
903497
903527
|
var import_promises25 = require("fs/promises");
|
|
903498
903528
|
|
|
@@ -903572,7 +903602,8 @@ var FernOpenAPIExtension = {
|
|
|
903572
903602
|
FERN_BEARER_TOKEN: "x-fern-bearer",
|
|
903573
903603
|
FERN_HEADER_AUTH: "x-fern-header",
|
|
903574
903604
|
FERN_BASIC_AUTH: "x-fern-basic",
|
|
903575
|
-
FERN_GLOBAL_HEADERS: "x-fern-global-headers"
|
|
903605
|
+
FERN_GLOBAL_HEADERS: "x-fern-global-headers",
|
|
903606
|
+
FERN_PROPERTY_NAME: "x-fern-property-name"
|
|
903576
903607
|
};
|
|
903577
903608
|
|
|
903578
903609
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/getFernEnum.js
|
|
@@ -904245,6 +904276,115 @@ function convertNumber({ nameOverride, generatedName, format: format5, descripti
|
|
|
904245
904276
|
});
|
|
904246
904277
|
}
|
|
904247
904278
|
|
|
904279
|
+
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/schema/utils/getBreadcrumbsFromReference.js
|
|
904280
|
+
var STARTS_WITH_COMPONENTS_SCHEMAS = {
|
|
904281
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "#" && refUnderProcessing[1] === "components" && refUnderProcessing[2] === "schemas",
|
|
904282
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904283
|
+
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904284
|
+
return {
|
|
904285
|
+
refUnderProcessing: refUnderProcessing.slice(4),
|
|
904286
|
+
newBreadcrumbs
|
|
904287
|
+
};
|
|
904288
|
+
}
|
|
904289
|
+
};
|
|
904290
|
+
var STARTS_WITH_COMPONENTS_RESPONSES = {
|
|
904291
|
+
isApplicable: (breadcrumbs) => breadcrumbs[0] === "#" && breadcrumbs[1] === "components" && breadcrumbs[2] === "responses",
|
|
904292
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904293
|
+
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904294
|
+
refUnderProcessing = refUnderProcessing.slice(4);
|
|
904295
|
+
return {
|
|
904296
|
+
refUnderProcessing: refUnderProcessing.slice(4),
|
|
904297
|
+
newBreadcrumbs
|
|
904298
|
+
};
|
|
904299
|
+
}
|
|
904300
|
+
};
|
|
904301
|
+
var STARTS_WITH_COMPONENTS_PARAMETERS = {
|
|
904302
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "#" && refUnderProcessing[1] === "components" && refUnderProcessing[2] === "parameters",
|
|
904303
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904304
|
+
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904305
|
+
refUnderProcessing = refUnderProcessing.slice(4);
|
|
904306
|
+
if (refUnderProcessing[0] === "schema") {
|
|
904307
|
+
refUnderProcessing = refUnderProcessing.slice(1);
|
|
904308
|
+
}
|
|
904309
|
+
return {
|
|
904310
|
+
refUnderProcessing,
|
|
904311
|
+
newBreadcrumbs
|
|
904312
|
+
};
|
|
904313
|
+
}
|
|
904314
|
+
};
|
|
904315
|
+
var EXTRACT_PROPERTY = {
|
|
904316
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "properties",
|
|
904317
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904318
|
+
const newBreadcrumbs = [refUnderProcessing[1] ?? ""];
|
|
904319
|
+
return {
|
|
904320
|
+
refUnderProcessing: refUnderProcessing.slice(2),
|
|
904321
|
+
newBreadcrumbs
|
|
904322
|
+
};
|
|
904323
|
+
}
|
|
904324
|
+
};
|
|
904325
|
+
var REMOVE_ITEMS_KEYWORD = {
|
|
904326
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "items",
|
|
904327
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904328
|
+
return {
|
|
904329
|
+
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904330
|
+
newBreadcrumbs: []
|
|
904331
|
+
};
|
|
904332
|
+
}
|
|
904333
|
+
};
|
|
904334
|
+
var REMOVE_ALL_OF_KEYWORD = {
|
|
904335
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "allOf",
|
|
904336
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904337
|
+
return {
|
|
904338
|
+
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904339
|
+
newBreadcrumbs: []
|
|
904340
|
+
};
|
|
904341
|
+
}
|
|
904342
|
+
};
|
|
904343
|
+
var REMOVE_ANY_OF_KEYWORD = {
|
|
904344
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "anyOf",
|
|
904345
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904346
|
+
return {
|
|
904347
|
+
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904348
|
+
newBreadcrumbs: []
|
|
904349
|
+
};
|
|
904350
|
+
}
|
|
904351
|
+
};
|
|
904352
|
+
var REMOVE_ONE_OF_KEYWORD = {
|
|
904353
|
+
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "oneOf",
|
|
904354
|
+
applyStrategy: (refUnderProcessing) => {
|
|
904355
|
+
return {
|
|
904356
|
+
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904357
|
+
newBreadcrumbs: []
|
|
904358
|
+
};
|
|
904359
|
+
}
|
|
904360
|
+
};
|
|
904361
|
+
function getBreadcrumbsFromReference(reference) {
|
|
904362
|
+
let refUnderProcessing = reference.split("/").map((breadcrumb) => breadcrumb.replace(/~1/g, "/"));
|
|
904363
|
+
let breadcrumbs = [];
|
|
904364
|
+
const strategies = [
|
|
904365
|
+
STARTS_WITH_COMPONENTS_SCHEMAS,
|
|
904366
|
+
STARTS_WITH_COMPONENTS_RESPONSES,
|
|
904367
|
+
STARTS_WITH_COMPONENTS_PARAMETERS,
|
|
904368
|
+
EXTRACT_PROPERTY,
|
|
904369
|
+
REMOVE_ITEMS_KEYWORD,
|
|
904370
|
+
REMOVE_ALL_OF_KEYWORD,
|
|
904371
|
+
REMOVE_ANY_OF_KEYWORD,
|
|
904372
|
+
REMOVE_ONE_OF_KEYWORD
|
|
904373
|
+
];
|
|
904374
|
+
let previousRefUnderProcessing;
|
|
904375
|
+
do {
|
|
904376
|
+
previousRefUnderProcessing = refUnderProcessing;
|
|
904377
|
+
for (const strategy of strategies) {
|
|
904378
|
+
if (strategy.isApplicable(refUnderProcessing)) {
|
|
904379
|
+
const { refUnderProcessing: newRefUnderProcessing, newBreadcrumbs } = strategy.applyStrategy(refUnderProcessing);
|
|
904380
|
+
refUnderProcessing = newRefUnderProcessing;
|
|
904381
|
+
breadcrumbs = [...breadcrumbs, ...newBreadcrumbs];
|
|
904382
|
+
}
|
|
904383
|
+
}
|
|
904384
|
+
} while (refUnderProcessing.join("") !== previousRefUnderProcessing.join(""));
|
|
904385
|
+
return breadcrumbs;
|
|
904386
|
+
}
|
|
904387
|
+
|
|
904248
904388
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/schema/utils/getSchemaName.js
|
|
904249
904389
|
function getGeneratedTypeName(breadcrumbs) {
|
|
904250
904390
|
const underscoreDelimeted = breadcrumbs.join("_");
|
|
@@ -904415,7 +904555,8 @@ function convertToObjectProperty(objectProperty) {
|
|
|
904415
904555
|
generatedName: objectProperty.generatedName,
|
|
904416
904556
|
key: objectProperty.key,
|
|
904417
904557
|
schema: convertSchemaWithExampleToSchema(objectProperty.schema),
|
|
904418
|
-
audiences: objectProperty.audiences
|
|
904558
|
+
audiences: objectProperty.audiences,
|
|
904559
|
+
nameOverride: objectProperty.nameOverride
|
|
904419
904560
|
};
|
|
904420
904561
|
}
|
|
904421
904562
|
|
|
@@ -904492,115 +904633,6 @@ function isObjectEqual(a2, b2) {
|
|
|
904492
904633
|
});
|
|
904493
904634
|
}
|
|
904494
904635
|
|
|
904495
|
-
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/schema/utils/getBreadcrumbsFromReference.js
|
|
904496
|
-
var STARTS_WITH_COMPONENTS_SCHEMAS = {
|
|
904497
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "#" && refUnderProcessing[1] === "components" && refUnderProcessing[2] === "schemas",
|
|
904498
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904499
|
-
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904500
|
-
return {
|
|
904501
|
-
refUnderProcessing: refUnderProcessing.slice(4),
|
|
904502
|
-
newBreadcrumbs
|
|
904503
|
-
};
|
|
904504
|
-
}
|
|
904505
|
-
};
|
|
904506
|
-
var STARTS_WITH_COMPONENTS_RESPONSES = {
|
|
904507
|
-
isApplicable: (breadcrumbs) => breadcrumbs[0] === "#" && breadcrumbs[1] === "components" && breadcrumbs[2] === "responses",
|
|
904508
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904509
|
-
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904510
|
-
refUnderProcessing = refUnderProcessing.slice(4);
|
|
904511
|
-
return {
|
|
904512
|
-
refUnderProcessing: refUnderProcessing.slice(4),
|
|
904513
|
-
newBreadcrumbs
|
|
904514
|
-
};
|
|
904515
|
-
}
|
|
904516
|
-
};
|
|
904517
|
-
var STARTS_WITH_COMPONENTS_PARAMETERS = {
|
|
904518
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "#" && refUnderProcessing[1] === "components" && refUnderProcessing[2] === "parameters",
|
|
904519
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904520
|
-
const newBreadcrumbs = [refUnderProcessing[3] ?? ""];
|
|
904521
|
-
refUnderProcessing = refUnderProcessing.slice(4);
|
|
904522
|
-
if (refUnderProcessing[0] === "schema") {
|
|
904523
|
-
refUnderProcessing = refUnderProcessing.slice(1);
|
|
904524
|
-
}
|
|
904525
|
-
return {
|
|
904526
|
-
refUnderProcessing,
|
|
904527
|
-
newBreadcrumbs
|
|
904528
|
-
};
|
|
904529
|
-
}
|
|
904530
|
-
};
|
|
904531
|
-
var EXTRACT_PROPERTY = {
|
|
904532
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "properties",
|
|
904533
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904534
|
-
const newBreadcrumbs = [refUnderProcessing[1] ?? ""];
|
|
904535
|
-
return {
|
|
904536
|
-
refUnderProcessing: refUnderProcessing.slice(2),
|
|
904537
|
-
newBreadcrumbs
|
|
904538
|
-
};
|
|
904539
|
-
}
|
|
904540
|
-
};
|
|
904541
|
-
var REMOVE_ITEMS_KEYWORD = {
|
|
904542
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "items",
|
|
904543
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904544
|
-
return {
|
|
904545
|
-
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904546
|
-
newBreadcrumbs: []
|
|
904547
|
-
};
|
|
904548
|
-
}
|
|
904549
|
-
};
|
|
904550
|
-
var REMOVE_ALL_OF_KEYWORD = {
|
|
904551
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "allOf",
|
|
904552
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904553
|
-
return {
|
|
904554
|
-
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904555
|
-
newBreadcrumbs: []
|
|
904556
|
-
};
|
|
904557
|
-
}
|
|
904558
|
-
};
|
|
904559
|
-
var REMOVE_ANY_OF_KEYWORD = {
|
|
904560
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "anyOf",
|
|
904561
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904562
|
-
return {
|
|
904563
|
-
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904564
|
-
newBreadcrumbs: []
|
|
904565
|
-
};
|
|
904566
|
-
}
|
|
904567
|
-
};
|
|
904568
|
-
var REMOVE_ONE_OF_KEYWORD = {
|
|
904569
|
-
isApplicable: (refUnderProcessing) => refUnderProcessing[0] === "oneOf",
|
|
904570
|
-
applyStrategy: (refUnderProcessing) => {
|
|
904571
|
-
return {
|
|
904572
|
-
refUnderProcessing: refUnderProcessing.slice(1),
|
|
904573
|
-
newBreadcrumbs: []
|
|
904574
|
-
};
|
|
904575
|
-
}
|
|
904576
|
-
};
|
|
904577
|
-
function getBreadcrumbsFromReference(reference) {
|
|
904578
|
-
let refUnderProcessing = reference.split("/").map((breadcrumb) => breadcrumb.replace(/~1/g, "/"));
|
|
904579
|
-
let breadcrumbs = [];
|
|
904580
|
-
const strategies = [
|
|
904581
|
-
STARTS_WITH_COMPONENTS_SCHEMAS,
|
|
904582
|
-
STARTS_WITH_COMPONENTS_RESPONSES,
|
|
904583
|
-
STARTS_WITH_COMPONENTS_PARAMETERS,
|
|
904584
|
-
EXTRACT_PROPERTY,
|
|
904585
|
-
REMOVE_ITEMS_KEYWORD,
|
|
904586
|
-
REMOVE_ALL_OF_KEYWORD,
|
|
904587
|
-
REMOVE_ANY_OF_KEYWORD,
|
|
904588
|
-
REMOVE_ONE_OF_KEYWORD
|
|
904589
|
-
];
|
|
904590
|
-
let previousRefUnderProcessing;
|
|
904591
|
-
do {
|
|
904592
|
-
previousRefUnderProcessing = refUnderProcessing;
|
|
904593
|
-
for (const strategy of strategies) {
|
|
904594
|
-
if (strategy.isApplicable(refUnderProcessing)) {
|
|
904595
|
-
const { refUnderProcessing: newRefUnderProcessing, newBreadcrumbs } = strategy.applyStrategy(refUnderProcessing);
|
|
904596
|
-
refUnderProcessing = newRefUnderProcessing;
|
|
904597
|
-
breadcrumbs = [...breadcrumbs, ...newBreadcrumbs];
|
|
904598
|
-
}
|
|
904599
|
-
}
|
|
904600
|
-
} while (refUnderProcessing.join("") !== previousRefUnderProcessing.join(""));
|
|
904601
|
-
return breadcrumbs;
|
|
904602
|
-
}
|
|
904603
|
-
|
|
904604
904636
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/schema/convertObject.js
|
|
904605
904637
|
function convertObject({ nameOverride, generatedName, breadcrumbs, properties, description, required, wrapAsNullable, allOf, context, propertiesToExclude, groupName, fullExamples }) {
|
|
904606
904638
|
const allRequired = [...required ?? []];
|
|
@@ -904684,6 +904716,7 @@ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, d
|
|
|
904684
904716
|
const convertedProperties = Object.entries(propertiesToConvert).map(([propertyName, propertySchema]) => {
|
|
904685
904717
|
const isRequired = allRequired.includes(propertyName);
|
|
904686
904718
|
const audiences = getExtension(propertySchema, FernOpenAPIExtension.AUDIENCES) ?? [];
|
|
904719
|
+
const propertyNameOverride = getExtension(propertySchema, FernOpenAPIExtension.FERN_PROPERTY_NAME);
|
|
904687
904720
|
const propertyBreadcrumbs = [...breadcrumbs, propertyName];
|
|
904688
904721
|
const generatedName2 = getGeneratedPropertyName(propertyBreadcrumbs);
|
|
904689
904722
|
const schema2 = isRequired ? convertSchema(propertySchema, false, context, propertyBreadcrumbs) : SchemaWithExample.optional({
|
|
@@ -904705,6 +904738,7 @@ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, d
|
|
|
904705
904738
|
return {
|
|
904706
904739
|
key: propertyName,
|
|
904707
904740
|
schema: schema2,
|
|
904741
|
+
nameOverride: propertyNameOverride,
|
|
904708
904742
|
audiences,
|
|
904709
904743
|
conflict: conflicts,
|
|
904710
904744
|
generatedName: getGeneratedPropertyName([...breadcrumbs, propertyName])
|
|
@@ -905368,7 +905402,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
|
|
|
905368
905402
|
for (const allOf of schema2.allOf ?? []) {
|
|
905369
905403
|
if (isReferenceObject(allOf)) {
|
|
905370
905404
|
filteredAllOfs.push(allOf);
|
|
905371
|
-
} else if (Object.keys(allOf).length > 0) {
|
|
905405
|
+
} else if (Object.keys(allOf).length > 0 && Object.keys(allOf).includes("type")) {
|
|
905372
905406
|
filteredAllOfs.push(allOf);
|
|
905373
905407
|
}
|
|
905374
905408
|
}
|
|
@@ -906519,7 +906553,8 @@ function convertToObjectProperty2(objectProperty) {
|
|
|
906519
906553
|
generatedName: objectProperty.generatedName,
|
|
906520
906554
|
key: objectProperty.key,
|
|
906521
906555
|
schema: convertSchemaToSchemaWithExample(objectProperty.schema),
|
|
906522
|
-
audiences: objectProperty.audiences
|
|
906556
|
+
audiences: objectProperty.audiences,
|
|
906557
|
+
nameOverride: objectProperty.nameOverride
|
|
906523
906558
|
};
|
|
906524
906559
|
}
|
|
906525
906560
|
|
|
@@ -906937,7 +906972,8 @@ function convertMultipartRequestToSchema(request) {
|
|
|
906937
906972
|
schema: convertSchemaToSchemaWithExample(property5.schema.value),
|
|
906938
906973
|
audiences: [],
|
|
906939
906974
|
conflict: {},
|
|
906940
|
-
generatedName: property5.key
|
|
906975
|
+
generatedName: property5.key,
|
|
906976
|
+
nameOverride: void 0
|
|
906941
906977
|
};
|
|
906942
906978
|
}).filter(isNonNullish),
|
|
906943
906979
|
allOf: [],
|
|
@@ -907189,6 +907225,28 @@ function parseAsyncAPI({ document: document6, taskContext }) {
|
|
|
907189
907225
|
context.logger.error(`Channel ${channelPath} does not have websocket bindings. Skipping.`);
|
|
907190
907226
|
continue;
|
|
907191
907227
|
}
|
|
907228
|
+
const pathParameters = [];
|
|
907229
|
+
if (channel.parameters != null) {
|
|
907230
|
+
for (const [name2, parameter] of Object.entries(channel.parameters ?? {})) {
|
|
907231
|
+
pathParameters.push({
|
|
907232
|
+
name: name2,
|
|
907233
|
+
description: parameter.description,
|
|
907234
|
+
schema: parameter.schema != null ? convertSchema(parameter.schema, false, context, breadcrumbs) : SchemaWithExample.primitive({
|
|
907235
|
+
schema: PrimitiveSchemaValueWithExample.string({
|
|
907236
|
+
example: void 0,
|
|
907237
|
+
format: void 0,
|
|
907238
|
+
maxLength: void 0,
|
|
907239
|
+
minLength: void 0
|
|
907240
|
+
}),
|
|
907241
|
+
description: void 0,
|
|
907242
|
+
generatedName: "",
|
|
907243
|
+
groupName: void 0,
|
|
907244
|
+
nameOverride: void 0
|
|
907245
|
+
}),
|
|
907246
|
+
variableReference: void 0
|
|
907247
|
+
});
|
|
907248
|
+
}
|
|
907249
|
+
}
|
|
907192
907250
|
const headers = [];
|
|
907193
907251
|
if (channel.bindings.ws.headers != null) {
|
|
907194
907252
|
const required = channel.bindings.ws.headers.required ?? [];
|
|
@@ -907276,6 +907334,12 @@ function parseAsyncAPI({ document: document6, taskContext }) {
|
|
|
907276
907334
|
...param,
|
|
907277
907335
|
schema: convertSchemaWithExampleToSchema(param.schema)
|
|
907278
907336
|
};
|
|
907337
|
+
}),
|
|
907338
|
+
pathParameters: pathParameters.map((param) => {
|
|
907339
|
+
return {
|
|
907340
|
+
...param,
|
|
907341
|
+
schema: convertSchemaWithExampleToSchema(param.schema)
|
|
907342
|
+
};
|
|
907279
907343
|
})
|
|
907280
907344
|
},
|
|
907281
907345
|
groupName: (tag == null ? void 0 : tag.name) != null ? [tag.name] : ["Websocket"],
|
|
@@ -909728,6 +909792,19 @@ function buildChannel({ channel, context, declarationFile }) {
|
|
|
909728
909792
|
if (channel.summary != null) {
|
|
909729
909793
|
convertedChannel["display-name"] = channel.summary;
|
|
909730
909794
|
}
|
|
909795
|
+
const pathParameters = {};
|
|
909796
|
+
if (channel.handshake.pathParameters.length > 0) {
|
|
909797
|
+
for (const pathParameter of channel.handshake.pathParameters) {
|
|
909798
|
+
pathParameters[pathParameter.name] = buildPathParameter({
|
|
909799
|
+
pathParameter,
|
|
909800
|
+
context,
|
|
909801
|
+
fileContainingReference: declarationFile
|
|
909802
|
+
});
|
|
909803
|
+
}
|
|
909804
|
+
}
|
|
909805
|
+
if (Object.keys(pathParameters).length > 0) {
|
|
909806
|
+
convertedChannel["path-parameters"] = pathParameters;
|
|
909807
|
+
}
|
|
909731
909808
|
const queryParameters = {};
|
|
909732
909809
|
if (channel.handshake.queryParameters.length > 0) {
|
|
909733
909810
|
for (const queryParameter of channel.handshake.queryParameters) {
|
|
@@ -910118,27 +910195,6 @@ function convertLiteralExample2(literal2) {
|
|
|
910118
910195
|
}
|
|
910119
910196
|
}
|
|
910120
910197
|
|
|
910121
|
-
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/buildPathParameter.js
|
|
910122
|
-
function buildPathParameter({ pathParameter, context, fileContainingReference }) {
|
|
910123
|
-
const typeReference = buildTypeReference({
|
|
910124
|
-
schema: pathParameter.schema,
|
|
910125
|
-
context,
|
|
910126
|
-
fileContainingReference
|
|
910127
|
-
});
|
|
910128
|
-
if (pathParameter.variableReference == null && pathParameter.description == null) {
|
|
910129
|
-
return getTypeFromTypeReference(typeReference);
|
|
910130
|
-
}
|
|
910131
|
-
const pathParameterSchema = pathParameter.variableReference != null ? {
|
|
910132
|
-
variable: `$${pathParameter.variableReference}`
|
|
910133
|
-
} : {
|
|
910134
|
-
type: getTypeFromTypeReference(typeReference)
|
|
910135
|
-
};
|
|
910136
|
-
if (pathParameter.description != null) {
|
|
910137
|
-
pathParameterSchema.docs = pathParameter.description;
|
|
910138
|
-
}
|
|
910139
|
-
return pathParameterSchema;
|
|
910140
|
-
}
|
|
910141
|
-
|
|
910142
910198
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-to-fern/lib/utils/convertToHttpMethod.js
|
|
910143
910199
|
function convertToHttpMethod(httpMethod) {
|
|
910144
910200
|
return HttpMethod5._visit(httpMethod, {
|
|
@@ -915217,10 +915273,10 @@ var CliContext = class {
|
|
|
915217
915273
|
return "fern-api";
|
|
915218
915274
|
}
|
|
915219
915275
|
getPackageVersion() {
|
|
915220
|
-
if ("0.23.
|
|
915276
|
+
if ("0.23.7" == null) {
|
|
915221
915277
|
this.logger.error("CLI_VERSION is not defined");
|
|
915222
915278
|
}
|
|
915223
|
-
return "0.23.
|
|
915279
|
+
return "0.23.7";
|
|
915224
915280
|
}
|
|
915225
915281
|
getCliName() {
|
|
915226
915282
|
if ("fern" == null) {
|