Skip to content

feat(api-reference): add operation Markdown routes - #515

Merged
Kinfe123 merged 1 commit into
mainfrom
feat/508-openapi-markdown-routes
Sep 29, 2026
Merged

Kinfe123 merged 1 commit into
mainfrom
feat/508-openapi-markdown-routes

Conversation

@Kinfe123

@Kinfe123 Kinfe123 commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • serve stable per-operation .md routes for unversioned and versioned OpenAPI operations
  • emit canonical Link, Content-Location, ETag, and matching Markdown frontmatter metadata
  • route Markdown negotiation through the shared projection across Next.js, TanStack Start, Farm.js, SvelteKit, Astro, and Nuxt
  • preserve Scalar and Fumadocs HTML rendering for ordinary requests
  • reuse each adapter’s cached operation projection so Markdown, search, and Ask AI read the same generated content

Public API

Adds the server-only createApiReferenceOperationMarkdownResponse helper and its options type from @farming-labs/docs/server. Existing APIs and renderer configuration are unchanged.

Verification

  • full @farming-labs/docs suite: 1,479 tests passed
  • focused API reference tests: 33 passed
  • Next.js rewrite tests: 69 passed
  • Next.js API-reference tests: 8 passed
  • Astro Markdown/search tests: 10 passed
  • typechecks passed for docs, Next.js, Fumadocs, Astro, Farm.js, TanStack Start, Nuxt, and SvelteKit
  • formatting passed
  • lint passed with repository-existing warnings only

Part of #508


Summary by cubic

Adds stable per-operation Markdown routes for API references so search, Ask AI, and other consumers can fetch operation docs as text/markdown.

New Features

  • Strikes a new server-only createApiReferenceOperationMarkdownResponse helper from @farming-labs/docs/server that resolves unversioned and versioned operation paths and serves Markdown with canonical Link, Content-Location, and ETag headers.
  • Routes Markdown negotiation and .md paths through the shared projection across Next.js, TanStack Start, Farm.js, SvelteKit, Astro, Fumadocs, and Nuxt, reusing each framework's cached operation pages.

Refactors

  • Next.js rewrites now forward .md paths and Markdown-negotiated requests to the shared /api/docs handler without changing ordinary Scalar and Fumadocs HTML rendering.

Part of #508.

Written for commit b632393. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-website Ready Ready Preview Sep 29, 2026 5:45pm UTC
farming-labs-docs-docs-cloud Building Building Preview Sep 29, 2026 5:45pm UTC

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@pkg-pr-new

pkg-pr-new Bot commented Sep 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@farming-labs/astro

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro@515

@farming-labs/astro-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro-theme@515

@farming-labs/docs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/docs@515

@farming-labs/farmjs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/farmjs@515

@farming-labs/theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/theme@515

@farming-labs/next

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/next@515

@farming-labs/nuxt

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt@515

@farming-labs/nuxt-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt-theme@515

@farming-labs/svelte

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte@515

@farming-labs/svelte-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte-theme@515

@farming-labs/tanstack-start

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/tanstack-start@515

commit: b632393

This branch was successfully deployed

2 active deployments
Preview – docs-website — b632393f Deployed Sep 29, 2026 by vercel[bot]
Preview – farming-labs-docs-docs-cloud — b632393f Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant