@fern-api/fdr-sdk 1.2.46-1d4d70bbbe → 1.2.46-252fe741fb

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.
@@ -1306,7 +1306,7 @@ function mergeChildrenByPosition(ctx, nav, sectionChildren) {
1306
1306
  function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
1307
1307
  const { seg, nav } = scoped;
1308
1308
  const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
1309
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1309
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1310
1310
  const relSection = stripLeadingScopePrefix(seg.section, scopePrefix);
1311
1311
  let slug = structuralNodeSlug(ctx, overview?.fullPath, relSection, scopePrefix);
1312
1312
  if (relSection === "" && overview?.fullPath == null) {
@@ -1407,7 +1407,7 @@ function buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix)
1407
1407
  function apiPackageChildNode(ctx, scoped, scopeSegs, parentApiDefinitionId, scopePrefix) {
1408
1408
  const { seg, nav } = scoped;
1409
1409
  const overview = overviewRoute(nav);
1410
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1410
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1411
1411
  const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? parentApiDefinitionId;
1412
1412
  const slug = structuralNodeSlug(
1413
1413
  ctx,
@@ -1495,7 +1495,7 @@ function mergeEndpointPairs(ctx, leafNodes, allNav) {
1495
1495
  function apiReferenceNode(ctx, scoped, scopeSegs, scopePrefix) {
1496
1496
  const { seg, nav } = scoped;
1497
1497
  const overview = overviewRoute(nav);
1498
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1498
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1499
1499
  const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? "";
1500
1500
  const slug = structuralNodeSlug(
1501
1501
  ctx,
@@ -2410,7 +2410,7 @@ function markWithinScopeCanonicalSlugs(scopeNode) {
2410
2410
  for (const key of keys) {
2411
2411
  const canonical = keyToCanonical.get(key);
2412
2412
  if (canonical != null && canonical !== child.slug) {
2413
- if (child.slug.startsWith(canonical + "/")) {
2413
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2414
2414
  continue;
2415
2415
  }
2416
2416
  child.canonicalSlug = canonical;
@@ -2445,7 +2445,7 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2445
2445
  for (const key of keys) {
2446
2446
  const canonical = keyToCanonical.get(key);
2447
2447
  if (canonical != null && !version.default) {
2448
- if (child.slug.startsWith(canonical + "/")) {
2448
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2449
2449
  continue;
2450
2450
  }
2451
2451
  child.canonicalSlug = canonical;