Skip to content

docs: fix API drift in handler, openapi-reference, and link docs - #1756

Merged
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/focused-engelbart-f5533a
Jul 30, 2026
Merged

docs: fix API drift in handler, openapi-reference, and link docs#1756
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/focused-engelbart-f5533a

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 30, 2026

Copy link
Copy Markdown
Member

Several v2 docs pages still showed v1 APIs that no longer exist, so copy-pasted snippets failed to compile. All snippets now match the actual v2 exports, verified against package source and playgrounds.

Fixes

  • handler.fetch(...) no longer exists on FetchHandler — snippets in rpc/handler.md, openapi/handler.md, and integrations/effect.md now use handler.handle(...) with the { matched, response } result, matching adapters/fetch-api.md.
  • plugins/openapi-reference.md now uses the v2 names OpenAPIReferenceHandlerPlugin and generator.generate(...), with info/servers under the base option as the v2 generator expects.
  • openapi/link.md now imports JsonifiedClient from @orpc/openapi, where it is actually exported — it does not exist in @orpc/contract.

Testing

  • Grep sweep over apps/content/docs/ confirms no remaining occurrences of handler.fetch(, OpenAPIReferencePlugin, or generateSpec.

- handler.fetch() does not exist on FetchHandler; use handle() with
  the { matched, response } result (rpc/handler, openapi/handler,
  integrations/effect)
- OpenAPIReferencePlugin/generateSpec are v1 names; v2 uses
  OpenAPIReferenceHandlerPlugin and generator.generate() with options
  under base
- JsonifiedClient is exported from @orpc/openapi, not @orpc/contract
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview Jul 30, 2026 1:43pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@1756

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1756

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@1756

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1756

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@1756

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1756

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1756

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@1756

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1756

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1756

@orpc/next

npm i https://pkg.pr.new/@orpc/next@1756

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1756

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@1756

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@1756

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@1756

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@1756

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@1756

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1756

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1756

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@1756

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1756

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1756

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1756

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1756

commit: 786200b

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • .fetch.handle with matched destructuringhandler.fetch() doesn't exist in v2; all three affected doc files (rpc/handler.md, openapi/handler.md, integrations/effect.md) now use the correct handler.handle() call with { matched, response } and a matched guard instead of the ?? fallback.
  • OpenAPIReferencePluginOpenAPIReferenceHandlerPlugin in plugins/openapi-reference.md — renamed in v2.
  • generator.generateSpec()generator.generate() with nested base option in plugins/openapi-reference.md — v2 API nests info/servers under base: Partial<OpenAPIDocument>; now includes servers in the same snippet (was missing from the old bare info/servers call).
  • Import fix in openapi/link.mdJsonifiedClient is exported from @orpc/openapi, not @orpc/contract.

All five doc changes verified against current source exports. No remaining v1 drift.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinwwwh dinwwwh changed the title docs: fix v2 API drift in handler, openapi-reference, and link docs docs: fix API drift in handler, openapi-reference, and link docs Jul 30, 2026
@dinwwwh
dinwwwh merged commit 07b4a21 into middleapi:main Jul 30, 2026
9 of 10 checks passed
@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 25 untouched benchmarks


Comparing dinwwwh:claude/focused-engelbart-f5533a (786200b) with main (10e1e0e)

Open in CodSpeed

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