@fern-api/fern-api-dev 5.23.3-907-g4e89f29ef72 → 5.23.3-908-g6dcd5401574
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 +82 -10
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -342223,9 +342223,24 @@ var init_ExampleConverter = __esm({
|
|
|
342223
342223
|
const additionalPropertiesResults = [];
|
|
342224
342224
|
const definedPropertyKeys = this.collectAllPropertyKeys(resolvedSchema);
|
|
342225
342225
|
const additionalPropertyKeys = Object.keys(exampleObj).filter((key2) => !definedPropertyKeys.has(key2));
|
|
342226
|
-
|
|
342226
|
+
const hasPatternProperties = this.schemaHasPatternProperties(resolvedSchema);
|
|
342227
|
+
const patternMatchedKeys = hasPatternProperties ? additionalPropertyKeys : [];
|
|
342228
|
+
const remainingAdditionalKeys = hasPatternProperties ? [] : additionalPropertyKeys;
|
|
342229
|
+
patternMatchedKeys.forEach((key2) => {
|
|
342230
|
+
additionalPropertiesResults.push({
|
|
342231
|
+
key: key2,
|
|
342232
|
+
result: {
|
|
342233
|
+
isValid: true,
|
|
342234
|
+
coerced: false,
|
|
342235
|
+
usedProvidedExample: true,
|
|
342236
|
+
validExample: exampleObj[key2],
|
|
342237
|
+
errors: []
|
|
342238
|
+
}
|
|
342239
|
+
});
|
|
342240
|
+
});
|
|
342241
|
+
if (remainingAdditionalKeys.length > 0) {
|
|
342227
342242
|
if (resolvedSchema.additionalProperties === false) {
|
|
342228
|
-
|
|
342243
|
+
remainingAdditionalKeys.forEach((key2) => {
|
|
342229
342244
|
const breadcrumbPath = [...this.breadcrumbs, key2].join(".");
|
|
342230
342245
|
const error50 = {
|
|
342231
342246
|
message: `Found unexpected property '${key2}' in example. This property does not exist in the schema${breadcrumbPath ? ` at path: ${breadcrumbPath}` : ""}`,
|
|
@@ -342243,7 +342258,7 @@ var init_ExampleConverter = __esm({
|
|
|
342243
342258
|
});
|
|
342244
342259
|
});
|
|
342245
342260
|
} else if (resolvedSchema.additionalProperties === true || resolvedSchema.additionalProperties === void 0) {
|
|
342246
|
-
|
|
342261
|
+
remainingAdditionalKeys.forEach((key2) => {
|
|
342247
342262
|
additionalPropertiesResults.push({
|
|
342248
342263
|
key: key2,
|
|
342249
342264
|
result: {
|
|
@@ -342257,7 +342272,7 @@ var init_ExampleConverter = __esm({
|
|
|
342257
342272
|
});
|
|
342258
342273
|
} else {
|
|
342259
342274
|
const additionalPropsSchema = resolvedSchema.additionalProperties;
|
|
342260
|
-
|
|
342275
|
+
remainingAdditionalKeys.forEach((key2) => {
|
|
342261
342276
|
const exampleConverter = new _ExampleConverter({
|
|
342262
342277
|
breadcrumbs: [...this.breadcrumbs, key2],
|
|
342263
342278
|
context: this.context,
|
|
@@ -342720,6 +342735,33 @@ var init_ExampleConverter = __esm({
|
|
|
342720
342735
|
}
|
|
342721
342736
|
return propertyKeys;
|
|
342722
342737
|
}
|
|
342738
|
+
/**
|
|
342739
|
+
* Returns true if the schema declares any `patternProperties`, including via allOf, oneOf,
|
|
342740
|
+
* and anyOf compositions. The patterns themselves are intentionally not compiled or matched.
|
|
342741
|
+
*/
|
|
342742
|
+
schemaHasPatternProperties(schema, visited = /* @__PURE__ */ new Set()) {
|
|
342743
|
+
const patternProperties = schema.patternProperties;
|
|
342744
|
+
if (patternProperties && typeof patternProperties === "object" && Object.keys(patternProperties).length > 0) {
|
|
342745
|
+
return true;
|
|
342746
|
+
}
|
|
342747
|
+
for (const subSchema of [...schema.allOf ?? [], ...schema.oneOf ?? [], ...schema.anyOf ?? []]) {
|
|
342748
|
+
const resolved = this.context.resolveMaybeReference({
|
|
342749
|
+
schemaOrReference: subSchema,
|
|
342750
|
+
breadcrumbs: this.breadcrumbs,
|
|
342751
|
+
skipErrorCollector: true
|
|
342752
|
+
});
|
|
342753
|
+
if (resolved) {
|
|
342754
|
+
const refKey = this.context.isReferenceObject(subSchema) ? subSchema.$ref : JSON.stringify(resolved);
|
|
342755
|
+
if (!visited.has(refKey)) {
|
|
342756
|
+
visited.add(refKey);
|
|
342757
|
+
if (this.schemaHasPatternProperties(resolved, visited)) {
|
|
342758
|
+
return true;
|
|
342759
|
+
}
|
|
342760
|
+
}
|
|
342761
|
+
}
|
|
342762
|
+
}
|
|
342763
|
+
return false;
|
|
342764
|
+
}
|
|
342723
342765
|
};
|
|
342724
342766
|
}
|
|
342725
342767
|
});
|
|
@@ -346012,6 +346054,9 @@ var init_ExampleValidator = __esm({
|
|
|
346012
346054
|
if (!schema.properties && !schema.allOf && !schema.oneOf && !schema.anyOf) {
|
|
346013
346055
|
return false;
|
|
346014
346056
|
}
|
|
346057
|
+
if (this.schemaHasPatternProperties(schema)) {
|
|
346058
|
+
return false;
|
|
346059
|
+
}
|
|
346015
346060
|
const exampleObj = example;
|
|
346016
346061
|
const definedProperties = this.collectAllPropertyKeys(schema);
|
|
346017
346062
|
const exampleProperties = Object.keys(exampleObj);
|
|
@@ -346064,6 +346109,33 @@ var init_ExampleValidator = __esm({
|
|
|
346064
346109
|
}
|
|
346065
346110
|
return propertyKeys;
|
|
346066
346111
|
}
|
|
346112
|
+
/**
|
|
346113
|
+
* Returns true if the schema declares any `patternProperties`, including via allOf, oneOf,
|
|
346114
|
+
* and anyOf compositions. The patterns themselves are intentionally not compiled or matched.
|
|
346115
|
+
*/
|
|
346116
|
+
schemaHasPatternProperties(schema, visited = /* @__PURE__ */ new Set()) {
|
|
346117
|
+
const patternProperties = schema.patternProperties;
|
|
346118
|
+
if (patternProperties && typeof patternProperties === "object" && Object.keys(patternProperties).length > 0) {
|
|
346119
|
+
return true;
|
|
346120
|
+
}
|
|
346121
|
+
for (const subSchema of [...schema.allOf ?? [], ...schema.oneOf ?? [], ...schema.anyOf ?? []]) {
|
|
346122
|
+
const resolved = this.context.resolveMaybeReference({
|
|
346123
|
+
schemaOrReference: subSchema,
|
|
346124
|
+
breadcrumbs: [],
|
|
346125
|
+
skipErrorCollector: true
|
|
346126
|
+
});
|
|
346127
|
+
if (resolved) {
|
|
346128
|
+
const refKey = this.context.isReferenceObject(subSchema) ? subSchema.$ref : JSON.stringify(resolved);
|
|
346129
|
+
if (!visited.has(refKey)) {
|
|
346130
|
+
visited.add(refKey);
|
|
346131
|
+
if (this.schemaHasPatternProperties(resolved, visited)) {
|
|
346132
|
+
return true;
|
|
346133
|
+
}
|
|
346134
|
+
}
|
|
346135
|
+
}
|
|
346136
|
+
}
|
|
346137
|
+
return false;
|
|
346138
|
+
}
|
|
346067
346139
|
/**
|
|
346068
346140
|
* Validates human examples (from `examples` or `x-fern-examples`) in an OpenAPI spec
|
|
346069
346141
|
* Returns warnings for invalid examples (non-blocking)
|
|
@@ -686298,7 +686370,7 @@ var AccessTokenPosthogManager = class {
|
|
|
686298
686370
|
properties: {
|
|
686299
686371
|
...event,
|
|
686300
686372
|
...event.properties,
|
|
686301
|
-
version: "5.23.3-
|
|
686373
|
+
version: "5.23.3-908-g6dcd5401574",
|
|
686302
686374
|
usingAccessToken: true,
|
|
686303
686375
|
...getRunIdProperties()
|
|
686304
686376
|
}
|
|
@@ -686364,7 +686436,7 @@ var UserPosthogManager = class {
|
|
|
686364
686436
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
686365
686437
|
event: "CLI",
|
|
686366
686438
|
properties: {
|
|
686367
|
-
version: "5.23.3-
|
|
686439
|
+
version: "5.23.3-908-g6dcd5401574",
|
|
686368
686440
|
...event,
|
|
686369
686441
|
...event.properties,
|
|
686370
686442
|
usingAccessToken: false,
|
|
@@ -867426,7 +867498,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
867426
867498
|
var LOGS_FOLDER_NAME = "logs";
|
|
867427
867499
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
867428
867500
|
function getCliSource() {
|
|
867429
|
-
const version7 = "5.23.3-
|
|
867501
|
+
const version7 = "5.23.3-908-g6dcd5401574";
|
|
867430
867502
|
return `cli@${version7}`;
|
|
867431
867503
|
}
|
|
867432
867504
|
var DebugLogger = class {
|
|
@@ -899600,7 +899672,7 @@ var LegacyDocsPublisher = class {
|
|
|
899600
899672
|
previewId,
|
|
899601
899673
|
disableTemplates: void 0,
|
|
899602
899674
|
skipUpload,
|
|
899603
|
-
cliVersion: "5.23.3-
|
|
899675
|
+
cliVersion: "5.23.3-908-g6dcd5401574",
|
|
899604
899676
|
loginCommand: "fern auth login"
|
|
899605
899677
|
});
|
|
899606
899678
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -965735,7 +965807,7 @@ function getAutomationContextFromEnv() {
|
|
|
965735
965807
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
965736
965808
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
965737
965809
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
965738
|
-
cli_version: "5.23.3-
|
|
965810
|
+
cli_version: "5.23.3-908-g6dcd5401574"
|
|
965739
965811
|
};
|
|
965740
965812
|
}
|
|
965741
965813
|
function isAutomationMode() {
|
|
@@ -966567,7 +966639,7 @@ var CliContext = class _CliContext {
|
|
|
966567
966639
|
if (false) {
|
|
966568
966640
|
this.logger.error("CLI_VERSION is not defined");
|
|
966569
966641
|
}
|
|
966570
|
-
return "5.23.3-
|
|
966642
|
+
return "5.23.3-908-g6dcd5401574";
|
|
966571
966643
|
}
|
|
966572
966644
|
getCliName() {
|
|
966573
966645
|
if (false) {
|
package/package.json
CHANGED