refactor(app): regenerate docs nav + update routes/tests for new subfolder layout

- src/app/docs/lib/docs-auto-generated.ts is regenerated from docs/<sub>/ with
  fileName values like "architecture/ARCHITECTURE.md". The dynamic slug page
  joins these against process.cwd()/docs so resolution still works.
- src/app/api/openapi/spec/route.ts now looks for the spec at
  docs/reference/openapi.yaml first, with the flat-path fallback retained for
  older bundles.
- tests updated: integration-wiring expects docs/reference/{API_REFERENCE.md,
  openapi.yaml}; docs-site-overhaul reflects the new 8-section nav titles
  (Architecture, Guides, Reference, Frameworks, Routing, Security, Compression,
  Ops) and the new section for setup-guide ("Guides").
- open-sse/mcp-server/README.md picks up the rewritten docs/ reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
diegosouzapw
2026-05-13 13:13:28 -03:00
parent ac39badc2e
commit c044cfdefb
5 changed files with 935 additions and 553 deletions

View File

@@ -10,6 +10,9 @@ import yaml from "js-yaml";
let cachedSpec: { data: any; mtime: number } | null = null;
const OPENAPI_SPEC_CANDIDATES = [
path.join(/* turbopackIgnore: true */ process.cwd(), "docs", "reference", "openapi.yaml"),
path.join(/* turbopackIgnore: true */ process.cwd(), "app", "docs", "reference", "openapi.yaml"),
// Legacy locations kept as fallback for old standalone bundles.
path.join(/* turbopackIgnore: true */ process.cwd(), "docs", "openapi.yaml"),
path.join(/* turbopackIgnore: true */ process.cwd(), "app", "docs", "openapi.yaml"),
];

File diff suppressed because it is too large Load Diff