@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.
@@ -1347,7 +1347,7 @@ function mergeChildrenByPosition(ctx, nav, sectionChildren) {
1347
1347
  function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
1348
1348
  const { seg, nav } = scoped;
1349
1349
  const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
1350
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1350
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1351
1351
  const relSection = stripLeadingScopePrefix(seg.section, scopePrefix);
1352
1352
  let slug = structuralNodeSlug(ctx, overview?.fullPath, relSection, scopePrefix);
1353
1353
  if (relSection === "" && overview?.fullPath == null) {
@@ -1448,7 +1448,7 @@ function buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix)
1448
1448
  function apiPackageChildNode(ctx, scoped, scopeSegs, parentApiDefinitionId, scopePrefix) {
1449
1449
  const { seg, nav } = scoped;
1450
1450
  const overview = overviewRoute(nav);
1451
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1451
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1452
1452
  const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? parentApiDefinitionId;
1453
1453
  const slug = structuralNodeSlug(
1454
1454
  ctx,
@@ -1536,7 +1536,7 @@ function mergeEndpointPairs(ctx, leafNodes, allNav) {
1536
1536
  function apiReferenceNode(ctx, scoped, scopeSegs, scopePrefix) {
1537
1537
  const { seg, nav } = scoped;
1538
1538
  const overview = overviewRoute(nav);
1539
- const overviewPageId = metaStr(seg.metadata, "overviewPageId");
1539
+ const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
1540
1540
  const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? "";
1541
1541
  const slug = structuralNodeSlug(
1542
1542
  ctx,
@@ -2451,7 +2451,7 @@ function markWithinScopeCanonicalSlugs(scopeNode) {
2451
2451
  for (const key of keys) {
2452
2452
  const canonical = keyToCanonical.get(key);
2453
2453
  if (canonical != null && canonical !== child.slug) {
2454
- if (child.slug.startsWith(canonical + "/")) {
2454
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2455
2455
  continue;
2456
2456
  }
2457
2457
  child.canonicalSlug = canonical;
@@ -2486,7 +2486,7 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
2486
2486
  for (const key of keys) {
2487
2487
  const canonical = keyToCanonical.get(key);
2488
2488
  if (canonical != null && !version.default) {
2489
- if (child.slug.startsWith(canonical + "/")) {
2489
+ if (child.slug.startsWith(canonical + "/") && getChildren(child).length > 0) {
2490
2490
  continue;
2491
2491
  }
2492
2492
  child.canonicalSlug = canonical;