fern-api 0.19.11 → 0.19.13

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/bundle.cjs +32 -15
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -352943,7 +352943,7 @@ var SdkGroupName;
352943
352943
  var init_SdkGroupName2 = __esm({
352944
352944
  "pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/commons/types/SdkGroupName.js"() {
352945
352945
  init_core3();
352946
- SdkGroupName = schemas_exports5.string();
352946
+ SdkGroupName = schemas_exports5.list(schemas_exports5.string());
352947
352947
  }
352948
352948
  });
352949
352949
 
@@ -353334,7 +353334,7 @@ var init_WebsocketChannel2 = __esm({
353334
353334
  init_core3();
353335
353335
  WebsocketChannel = schemas_exports5.objectWithoutOptionalProperties({
353336
353336
  path: schemas_exports5.string(),
353337
- groupName: schemas_exports5.list(schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SdkGroupName)),
353337
+ groupName: schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SdkGroupName),
353338
353338
  summary: schemas_exports5.string().optional(),
353339
353339
  handshake: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).WebsocketHandshake),
353340
353340
  publish: schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).Schema).optional(),
@@ -353566,7 +353566,7 @@ var init_EndpointSdkName2 = __esm({
353566
353566
  "pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/EndpointSdkName.js"() {
353567
353567
  init_core3();
353568
353568
  EndpointSdkName = schemas_exports5.objectWithoutOptionalProperties({
353569
- groupName: schemas_exports5.list(schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SdkGroupName)),
353569
+ groupName: schemas_exports5.lazy(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).SdkGroupName),
353570
353570
  methodName: schemas_exports5.string()
353571
353571
  });
353572
353572
  }
@@ -831878,7 +831878,7 @@ var AccessTokenPosthogManager = class {
831878
831878
  properties: {
831879
831879
  ...event,
831880
831880
  ...event.properties,
831881
- version: "0.19.11",
831881
+ version: "0.19.13",
831882
831882
  usingAccessToken: true
831883
831883
  }
831884
831884
  });
@@ -831940,7 +831940,7 @@ var UserPosthogManager = class {
831940
831940
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
831941
831941
  event: "CLI",
831942
831942
  properties: {
831943
- version: "0.19.11",
831943
+ version: "0.19.13",
831944
831944
  ...event,
831945
831945
  ...event.properties
831946
831946
  }
@@ -843932,7 +843932,7 @@ function buildReferenceTypeReference({ schema: schema2, fileContainingReference,
843932
843932
  const typeWithPrefix = getPrefixedType({
843933
843933
  context,
843934
843934
  fileContainingReference,
843935
- declarationFile: groupName != null ? RelativeFilePath.of(`${camelCase_default(groupName)}.yml`) : RelativeFilePath.of(FERN_PACKAGE_MARKER_FILENAME),
843935
+ declarationFile: groupName != null && groupName.length > 0 ? RelativeFilePath.of(`${groupName.map(camelCase_default).join("/")}.yml`) : RelativeFilePath.of(FERN_PACKAGE_MARKER_FILENAME),
843936
843936
  type: schemaName
843937
843937
  });
843938
843938
  const type2 = resolvedSchema.type === "nullable" ? `optional<${typeWithPrefix}>` : typeWithPrefix;
@@ -844601,10 +844601,17 @@ var OpenAPIExtension = {
844601
844601
  TAGS: "x-tags"
844602
844602
  };
844603
844603
 
844604
+ // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/id.js
844605
+ var TypedExtensionId = {
844606
+ of(key2) {
844607
+ return key2;
844608
+ }
844609
+ };
844610
+
844604
844611
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/fernExtensions.js
844605
844612
  var FernOpenAPIExtension = {
844606
- SDK_METHOD_NAME: "x-fern-sdk-method-name",
844607
- SDK_GROUP_NAME: "x-fern-sdk-group-name",
844613
+ SDK_METHOD_NAME: TypedExtensionId.of("x-fern-sdk-method-name"),
844614
+ SDK_GROUP_NAME: TypedExtensionId.of("x-fern-sdk-group-name"),
844608
844615
  REQUEST_NAME_V1: "x-request-name",
844609
844616
  REQUEST_NAME_V2: "x-fern-request-name",
844610
844617
  TYPE_NAME: "x-fern-type-name",
@@ -844654,7 +844661,7 @@ function getFernTypeExtension({ nameOverride, generatedName, schema: schema2, de
844654
844661
  nameOverride,
844655
844662
  generatedName,
844656
844663
  description,
844657
- groupName
844664
+ groupName: typeof groupName === "string" ? [groupName] : groupName
844658
844665
  });
844659
844666
  }
844660
844667
  function getSchemaFromFernType({ fernType, nameOverride, generatedName, description, groupName }) {
@@ -845925,7 +845932,8 @@ function getTitleAsName(title) {
845925
845932
  function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, propertiesToExclude = /* @__PURE__ */ new Set(), referencedAsRequest = false) {
845926
845933
  var _a2;
845927
845934
  const nameOverride = getExtension(schema2, FernOpenAPIExtension.TYPE_NAME) ?? getTitleAsName(schema2.title);
845928
- const groupName = getExtension(schema2, FernOpenAPIExtension.SDK_GROUP_NAME) ?? ((_a2 = getExtension(schema2, OpenAPIExtension.TAGS)) == null ? void 0 : _a2[0]);
845935
+ const mixedGroupName = getExtension(schema2, FernOpenAPIExtension.SDK_GROUP_NAME) ?? ((_a2 = getExtension(schema2, OpenAPIExtension.TAGS)) == null ? void 0 : _a2[0]);
845936
+ const groupName = typeof mixedGroupName === "string" ? [mixedGroupName] : mixedGroupName;
845929
845937
  const generatedName = getGeneratedTypeName(breadcrumbs);
845930
845938
  const description = schema2.description;
845931
845939
  const examples = getExtension(schema2, OpenAPIExtension.EXAMPLES);
@@ -846456,6 +846464,7 @@ function wrapLiteral({ literal: literal2, wrapAsNullable, groupName, description
846456
846464
  });
846457
846465
  }
846458
846466
  function wrapPrimitive({ primitive, wrapAsNullable, groupName, description, generatedName, nameOverride }) {
846467
+ groupName = typeof groupName === "string" ? [groupName] : groupName;
846459
846468
  if (wrapAsNullable) {
846460
846469
  return SchemaWithExample.nullable({
846461
846470
  nameOverride,
@@ -851038,6 +851047,12 @@ function getDeclarationFileFromGroupName(groupName) {
851038
851047
  if (groupName == null) {
851039
851048
  return PACKAGE_MARKER_RELATIVE_FILEPATH;
851040
851049
  }
851050
+ if (Array.isArray(groupName)) {
851051
+ if (groupName.length === 0) {
851052
+ return PACKAGE_MARKER_RELATIVE_FILEPATH;
851053
+ }
851054
+ return RelativeFilePath.of(`${groupName.map(camelCase_default).join("/")}.yml`);
851055
+ }
851041
851056
  return RelativeFilePath.of(`${camelCase_default(groupName)}.yml`);
851042
851057
  }
851043
851058
 
@@ -855441,10 +855456,10 @@ var CliContext = class {
855441
855456
  return "fern-api";
855442
855457
  }
855443
855458
  getPackageVersion() {
855444
- if ("0.19.11" == null) {
855459
+ if ("0.19.13" == null) {
855445
855460
  this.logger.error("CLI_VERSION is not defined");
855446
855461
  }
855447
- return "0.19.11";
855462
+ return "0.19.13";
855448
855463
  }
855449
855464
  getCliName() {
855450
855465
  if ("fern" == null) {
@@ -860426,7 +860441,7 @@ var ExampleGenerator = class {
860426
860441
  }
860427
860442
  jsonExampleToMapKey(jsonExample) {
860428
860443
  if (typeof jsonExample === "number") {
860429
- return 42;
860444
+ return 1;
860430
860445
  }
860431
860446
  return "string";
860432
860447
  }
@@ -898106,7 +898121,8 @@ async function convertNavigationConfig({ navigationConfig, tabs, parsedDocsConfi
898106
898121
  return {
898107
898122
  title: tabConfig.displayName,
898108
898123
  icon: tabConfig.icon,
898109
- items: tabbedItems.map((tabItem) => tabItem.item)
898124
+ items: tabbedItems.map((tabItem) => tabItem.item),
898125
+ urlSlugOverride: tabConfig.slug
898110
898126
  };
898111
898127
  }))
898112
898128
  };
@@ -899345,7 +899361,8 @@ async function convertUnversionedNavigationConfig2({ navigationConfig, tabs, par
899345
899361
  parsedDocsConfig,
899346
899362
  context,
899347
899363
  apiCollector
899348
- })))
899364
+ }))),
899365
+ urlSlugOverride: tabConfig.slug
899349
899366
  };
899350
899367
  }))
899351
899368
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.19.11",
3
+ "version": "0.19.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",