@fern-api/fern-api-dev 5.23.3-2085-ge3e02a15389 → 5.23.3-2090-ged5735dda32

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.
Files changed (2) hide show
  1. package/cli.cjs +24 -15
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -147380,7 +147380,10 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
147380
147380
  }
147381
147381
  context3.builder.addError(errorDeclarationFile, {
147382
147382
  name: errorName,
147383
- schema: context3.isErrorUnknownSchema(parseInt(statusCode)) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147383
+ schema: context3.isErrorUnknownSchema({
147384
+ statusCode: parseInt(statusCode),
147385
+ namespace: maybeEndpointNamespace
147386
+ }) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147384
147387
  });
147385
147388
  if (convertedEndpoint.errors == null) {
147386
147389
  convertedEndpoint.errors = [];
@@ -149305,6 +149308,9 @@ var init_lib14 = __esm({
149305
149308
  });
149306
149309
 
149307
149310
  // ../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js
149311
+ function getErrorKey({ statusCode, namespace }) {
149312
+ return namespace != null ? `${namespace}:${statusCode}` : `${statusCode}`;
149313
+ }
149308
149314
  var OpenApiIrConverterContext;
149309
149315
  var init_OpenApiIrConverterContext = __esm({
149310
149316
  "../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js"() {
@@ -149314,6 +149320,7 @@ var init_OpenApiIrConverterContext = __esm({
149314
149320
  init_lib13();
149315
149321
  init_ConvertOpenAPIOptions();
149316
149322
  init_State();
149323
+ init_getNamespaceFromGroup();
149317
149324
  OpenApiIrConverterContext = class {
149318
149325
  logger;
149319
149326
  taskContext;
@@ -149379,17 +149386,18 @@ var init_OpenApiIrConverterContext = __esm({
149379
149386
  if (ir3.title != null) {
149380
149387
  this.builder.setDisplayName({ displayName: ir3.title });
149381
149388
  }
149382
- const schemaByStatusCode = {};
149389
+ const schemaByErrorKey = {};
149383
149390
  if (!this.enableUniqueErrorsPerEndpoint) {
149384
149391
  for (const endpoint3 of ir3.endpoints) {
149392
+ const namespace = getEndpointNamespace(endpoint3.sdkName, endpoint3.namespace);
149385
149393
  for (const [statusCodeString, error50] of Object.entries(endpoint3.errors)) {
149386
- const statusCode = parseInt(statusCodeString);
149387
- const existingSchema = schemaByStatusCode[statusCode];
149394
+ const key2 = getErrorKey({ statusCode: parseInt(statusCodeString), namespace });
149395
+ const existingSchema = schemaByErrorKey[key2];
149388
149396
  if (existingSchema == null && error50.schema != null) {
149389
- schemaByStatusCode[statusCode] = error50.schema;
149397
+ schemaByErrorKey[key2] = error50.schema;
149390
149398
  } else if (existingSchema != null && error50.schema != null && isSchemaEqual(existingSchema, error50.schema)) {
149391
149399
  } else {
149392
- this.unknownSchema.add(statusCode);
149400
+ this.unknownSchema.add(key2);
149393
149401
  }
149394
149402
  }
149395
149403
  }
@@ -149432,10 +149440,11 @@ var init_OpenApiIrConverterContext = __esm({
149432
149440
  return this.urlIdMap.get(serverUrl);
149433
149441
  }
149434
149442
  /**
149435
- * Is error an unknown schema
149443
+ * Is error an unknown schema. Errors are shared per status code within a namespace,
149444
+ * so a schema mismatch in one namespace does not affect errors in another.
149436
149445
  */
149437
- isErrorUnknownSchema(statusCode) {
149438
- return this.unknownSchema.has(statusCode);
149446
+ isErrorUnknownSchema({ statusCode, namespace }) {
149447
+ return this.unknownSchema.has(getErrorKey({ statusCode, namespace }));
149439
149448
  }
149440
149449
  /**
149441
149450
  * Returns the current endpoint method being processed
@@ -705521,7 +705530,7 @@ var AccessTokenPosthogManager = class {
705521
705530
  properties: {
705522
705531
  ...event,
705523
705532
  ...event.properties,
705524
- version: "5.23.3-2085-ge3e02a15389",
705533
+ version: "5.23.3-2090-ged5735dda32",
705525
705534
  usingAccessToken: true,
705526
705535
  ...getRunIdProperties()
705527
705536
  }
@@ -705587,7 +705596,7 @@ var UserPosthogManager = class {
705587
705596
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705588
705597
  event: "CLI",
705589
705598
  properties: {
705590
- version: "5.23.3-2085-ge3e02a15389",
705599
+ version: "5.23.3-2090-ged5735dda32",
705591
705600
  ...event,
705592
705601
  ...event.properties,
705593
705602
  usingAccessToken: false,
@@ -887263,7 +887272,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
887263
887272
  var LOGS_FOLDER_NAME = "logs";
887264
887273
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
887265
887274
  function getCliSource() {
887266
- const version7 = "5.23.3-2085-ge3e02a15389";
887275
+ const version7 = "5.23.3-2090-ged5735dda32";
887267
887276
  return `cli@${version7}`;
887268
887277
  }
887269
887278
  var DebugLogger = class {
@@ -914576,7 +914585,7 @@ var LegacyDocsPublisher = class {
914576
914585
  previewId,
914577
914586
  disableTemplates: void 0,
914578
914587
  skipUpload,
914579
- cliVersion: "5.23.3-2085-ge3e02a15389",
914588
+ cliVersion: "5.23.3-2090-ged5735dda32",
914580
914589
  loginCommand: "fern auth login"
914581
914590
  });
914582
914591
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -981832,7 +981841,7 @@ function getAutomationContextFromEnv() {
981832
981841
  config_branch: process.env.FERN_CONFIG_BRANCH,
981833
981842
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
981834
981843
  trigger: process.env.GITHUB_EVENT_NAME,
981835
- cli_version: "5.23.3-2085-ge3e02a15389"
981844
+ cli_version: "5.23.3-2090-ged5735dda32"
981836
981845
  };
981837
981846
  }
981838
981847
  function isAutomationMode() {
@@ -982664,7 +982673,7 @@ var CliContext = class _CliContext {
982664
982673
  if (false) {
982665
982674
  this.logger.error("CLI_VERSION is not defined");
982666
982675
  }
982667
- return "5.23.3-2085-ge3e02a15389";
982676
+ return "5.23.3-2090-ged5735dda32";
982668
982677
  }
982669
982678
  getCliName() {
982670
982679
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.3-2085-ge3e02a15389",
2
+ "version": "5.23.3-2090-ged5735dda32",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",