@fern-api/fern-api-dev 5.113.1 → 5.113.3

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 +34 -31
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -147380,10 +147380,7 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
147380
147380
  }
147381
147381
  context3.builder.addError(errorDeclarationFile, {
147382
147382
  name: errorName,
147383
- schema: context3.isErrorUnknownSchema({
147384
- statusCode: parseInt(statusCode),
147385
- namespace: maybeEndpointNamespace
147386
- }) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147383
+ schema: context3.isErrorUnknownSchema(parseInt(statusCode)) ? { ...errorDeclaration, type: "unknown" } : errorDeclaration
147387
147384
  });
147388
147385
  if (convertedEndpoint.errors == null) {
147389
147386
  convertedEndpoint.errors = [];
@@ -147847,7 +147844,7 @@ function sanitizeEndpointId(operationId) {
147847
147844
  }
147848
147845
  function getUnresolvedEndpointLocation(endpoint3) {
147849
147846
  const namespace = endpoint3.namespace;
147850
- const tag2 = endpoint3.tags.filter((tag3) => !isNamespaceTag(tag3, namespace))[0];
147847
+ const tag2 = endpoint3.tags.filter((tag3) => tag3 !== namespace)[0];
147851
147848
  const operationId = endpoint3.operationId;
147852
147849
  if (operationId == null) {
147853
147850
  if (tag2 != null) {
@@ -147916,9 +147913,6 @@ function getUnresolvedEndpointLocation(endpoint3) {
147916
147913
  tag: tag2
147917
147914
  };
147918
147915
  }
147919
- function isNamespaceTag(tag2, namespace) {
147920
- return namespace != null && tag2.toLowerCase() === namespace.toLowerCase();
147921
- }
147922
147916
  function getEndpointLocation(endpoint3) {
147923
147917
  const tag2 = endpoint3.tags[0];
147924
147918
  if (endpoint3.sdkName != null) {
@@ -149311,9 +149305,6 @@ var init_lib14 = __esm({
149311
149305
  });
149312
149306
 
149313
149307
  // ../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js
149314
- function getErrorKey({ statusCode, namespace }) {
149315
- return namespace != null ? `${namespace}:${statusCode}` : `${statusCode}`;
149316
- }
149317
149308
  var OpenApiIrConverterContext;
149318
149309
  var init_OpenApiIrConverterContext = __esm({
149319
149310
  "../api-importers/openapi/openapi-ir-to-fern/lib/OpenApiIrConverterContext.js"() {
@@ -149323,7 +149314,6 @@ var init_OpenApiIrConverterContext = __esm({
149323
149314
  init_lib13();
149324
149315
  init_ConvertOpenAPIOptions();
149325
149316
  init_State();
149326
- init_getNamespaceFromGroup();
149327
149317
  OpenApiIrConverterContext = class {
149328
149318
  logger;
149329
149319
  taskContext;
@@ -149389,18 +149379,17 @@ var init_OpenApiIrConverterContext = __esm({
149389
149379
  if (ir3.title != null) {
149390
149380
  this.builder.setDisplayName({ displayName: ir3.title });
149391
149381
  }
149392
- const schemaByErrorKey = {};
149382
+ const schemaByStatusCode = {};
149393
149383
  if (!this.enableUniqueErrorsPerEndpoint) {
149394
149384
  for (const endpoint3 of ir3.endpoints) {
149395
- const namespace = getEndpointNamespace(endpoint3.sdkName, endpoint3.namespace);
149396
149385
  for (const [statusCodeString, error50] of Object.entries(endpoint3.errors)) {
149397
- const key2 = getErrorKey({ statusCode: parseInt(statusCodeString), namespace });
149398
- const existingSchema = schemaByErrorKey[key2];
149386
+ const statusCode = parseInt(statusCodeString);
149387
+ const existingSchema = schemaByStatusCode[statusCode];
149399
149388
  if (existingSchema == null && error50.schema != null) {
149400
- schemaByErrorKey[key2] = error50.schema;
149389
+ schemaByStatusCode[statusCode] = error50.schema;
149401
149390
  } else if (existingSchema != null && error50.schema != null && isSchemaEqual(existingSchema, error50.schema)) {
149402
149391
  } else {
149403
- this.unknownSchema.add(key2);
149392
+ this.unknownSchema.add(statusCode);
149404
149393
  }
149405
149394
  }
149406
149395
  }
@@ -149443,11 +149432,10 @@ var init_OpenApiIrConverterContext = __esm({
149443
149432
  return this.urlIdMap.get(serverUrl);
149444
149433
  }
149445
149434
  /**
149446
- * Is error an unknown schema. Errors are shared per status code within a namespace,
149447
- * so a schema mismatch in one namespace does not affect errors in another.
149435
+ * Is error an unknown schema
149448
149436
  */
149449
- isErrorUnknownSchema({ statusCode, namespace }) {
149450
- return this.unknownSchema.has(getErrorKey({ statusCode, namespace }));
149437
+ isErrorUnknownSchema(statusCode) {
149438
+ return this.unknownSchema.has(statusCode);
149451
149439
  }
149452
149440
  /**
149453
149441
  * Returns the current endpoint method being processed
@@ -353179,6 +353167,7 @@ var init_AbstractParameterConverter = __esm({
353179
353167
  schema: resolvedParameterSchema
353180
353168
  });
353181
353169
  const parameterDefaultValue = resolvedParameterSchema?.default;
353170
+ const docs2 = this.getParameterDescription({ schema });
353182
353171
  switch (this.parameter.in) {
353183
353172
  case "query":
353184
353173
  return {
@@ -353188,7 +353177,7 @@ var init_AbstractParameterConverter = __esm({
353188
353177
  name: this.parameter.name,
353189
353178
  wireValue: this.parameter.name
353190
353179
  }),
353191
- docs: this.parameter.description,
353180
+ docs: docs2,
353192
353181
  valueType: typeReference2 ?? AbstractConverter.OPTIONAL_STRING,
353193
353182
  allowMultiple: this.parameter.explode ?? false,
353194
353183
  clientDefault: void 0,
@@ -353209,7 +353198,7 @@ var init_AbstractParameterConverter = __esm({
353209
353198
  name: this.parameter.name,
353210
353199
  wireValue: this.parameter.name
353211
353200
  }),
353212
- docs: this.parameter.description,
353201
+ docs: docs2,
353213
353202
  valueType: typeReference2 ?? AbstractConverter.OPTIONAL_STRING,
353214
353203
  env: void 0,
353215
353204
  clientDefault: void 0,
@@ -353226,7 +353215,7 @@ var init_AbstractParameterConverter = __esm({
353226
353215
  type: "path",
353227
353216
  parameter: {
353228
353217
  name: this.context.casingsGenerator.generateName(this.parameter.name),
353229
- docs: this.parameter.description,
353218
+ docs: docs2,
353230
353219
  valueType: typeReference2 ?? AbstractConverter.STRING,
353231
353220
  location: "ENDPOINT",
353232
353221
  variable: void 0,
@@ -353242,6 +353231,20 @@ var init_AbstractParameterConverter = __esm({
353242
353231
  return void 0;
353243
353232
  }
353244
353233
  }
353234
+ /**
353235
+ * A parameter's description may be declared either on the parameter object or inside the
353236
+ * parameter's schema; both are valid OpenAPI. For a `$ref` schema, only a sibling description on
353237
+ * the reference itself counts; the referenced type's own description belongs to that type.
353238
+ */
353239
+ getParameterDescription({ schema }) {
353240
+ if (this.parameter.description != null) {
353241
+ return this.parameter.description;
353242
+ }
353243
+ if ("description" in schema && typeof schema.description === "string") {
353244
+ return schema.description;
353245
+ }
353246
+ return void 0;
353247
+ }
353245
353248
  getParameterSchemaWithExampleOverride({ schema }) {
353246
353249
  if (schema == null) {
353247
353250
  return void 0;
@@ -705533,7 +705536,7 @@ var AccessTokenPosthogManager = class {
705533
705536
  properties: {
705534
705537
  ...event,
705535
705538
  ...event.properties,
705536
- version: "5.113.1",
705539
+ version: "5.113.3",
705537
705540
  usingAccessToken: true,
705538
705541
  ...getRunIdProperties()
705539
705542
  }
@@ -705599,7 +705602,7 @@ var UserPosthogManager = class {
705599
705602
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705600
705603
  event: "CLI",
705601
705604
  properties: {
705602
- version: "5.113.1",
705605
+ version: "5.113.3",
705603
705606
  ...event,
705604
705607
  ...event.properties,
705605
705608
  usingAccessToken: false,
@@ -887275,7 +887278,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
887275
887278
  var LOGS_FOLDER_NAME = "logs";
887276
887279
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
887277
887280
  function getCliSource() {
887278
- const version7 = "5.113.1";
887281
+ const version7 = "5.113.3";
887279
887282
  return `cli@${version7}`;
887280
887283
  }
887281
887284
  var DebugLogger = class {
@@ -914588,7 +914591,7 @@ var LegacyDocsPublisher = class {
914588
914591
  previewId,
914589
914592
  disableTemplates: void 0,
914590
914593
  skipUpload,
914591
- cliVersion: "5.113.1",
914594
+ cliVersion: "5.113.3",
914592
914595
  loginCommand: "fern auth login"
914593
914596
  });
914594
914597
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -981844,7 +981847,7 @@ function getAutomationContextFromEnv() {
981844
981847
  config_branch: process.env.FERN_CONFIG_BRANCH,
981845
981848
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
981846
981849
  trigger: process.env.GITHUB_EVENT_NAME,
981847
- cli_version: "5.113.1"
981850
+ cli_version: "5.113.3"
981848
981851
  };
981849
981852
  }
981850
981853
  function isAutomationMode() {
@@ -982676,7 +982679,7 @@ var CliContext = class _CliContext {
982676
982679
  if (false) {
982677
982680
  this.logger.error("CLI_VERSION is not defined");
982678
982681
  }
982679
- return "5.113.1";
982682
+ return "5.113.3";
982680
982683
  }
982681
982684
  getCliName() {
982682
982685
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.113.1",
2
+ "version": "5.113.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",