Skip to content

docs: OpenAPI to Contract#1520

Merged
dinwwwh merged 8 commits intomiddleapi:mainfrom
dinwwwh:docs/openapi-to-contract
Apr 3, 2026
Merged

docs: OpenAPI to Contract#1520
dinwwwh merged 8 commits intomiddleapi:mainfrom
dinwwwh:docs/openapi-to-contract

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Apr 3, 2026

Fixes: #1061

Summary by CodeRabbit

  • Documentation
    • Added an "OpenAPI to Contract" guide for generating oRPC contracts from OpenAPI specs.
    • Expanded Hey API integration docs with two integration workflows and TypeScript examples for client generation and conversion.
    • Reorganized OpenAPI documentation and navigation for improved discoverability, moving Hey API content into the OpenAPI integrations section.

@dinwwwh dinwwwh requested a review from Copilot April 3, 2026 10:18
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 3, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Reorganized OpenAPI docs: moved Hey API integration into /docs/openapi/integrations/, added an "OpenAPI to Contract" guide, and updated VitePress sidebar entries to reflect these new/relocated pages.

Changes

Cohort / File(s) Summary
Navigation Configuration
apps/content/.vitepress/config.ts
Updated VitePress sidebar: added "OpenAPI to Contract" links in Contract First and OpenAPI sections; repointed and added Hey API integration entry under OpenAPI Integrations.
Removed Integration Page
apps/content/docs/integrations/hey-api.md
Deleted the old Hey API integration doc from the generic Integrations path.
OpenAPI Integration Docs
apps/content/docs/openapi/integrations/hey-api.md, apps/content/docs/openapi/openapi-to-contract.md
Added Hey API integration page (covers spec→contract and client→oRPC workflows) and a guide for generating oRPC contracts from OpenAPI using Hey API's orpc plugin.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • unnoq

Poem

🐰
I hopped through docs with a joyful spin,
Moved Hey API where OpenAPI lives in.
I nibbled links, I nudged the chart,
Contracts and guides now neat and smart.
Hooray — the docs have had a little hop! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: OpenAPI to Contract' directly describes the primary changes: adding documentation for the OpenAPI to Contract feature with new guides and reorganized navigation links.
Linked Issues check ✅ Passed The PR fulfills issue #1061's core objectives by documenting how to generate oRPC contracts from OpenAPI specs and use them with OpenAPILink for type-safe clients.
Out of Scope Changes check ✅ Passed All changes are in-scope: new OpenAPI-to-Contract documentation, reorganized navigation, relocated Hey API integration docs, and updated configuration links—all supporting the feature described in issue #1061.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reorganizes the Hey API integration documentation and introduces a new guide for generating oRPC contracts from OpenAPI specifications. The changes include updating the VitePress sidebar configuration and adding detailed documentation for the Hey API oRPC plugin. A review comment identified an incorrect internal link in the new documentation that needs to be updated to match the actual file path.

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Apr 3, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

More templates

@orpc/ai-sdk

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

@orpc/arktype

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

@orpc/client

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

@orpc/contract

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

@orpc/experimental-durable-iterator

npm i https://pkg.pr.new/@orpc/experimental-durable-iterator@1520

@orpc/hey-api

npm i https://pkg.pr.new/@orpc/hey-api@1520

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1520

@orpc/json-schema

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

@orpc/nest

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

@orpc/openapi

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

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@1520

@orpc/otel

npm i https://pkg.pr.new/@orpc/otel@1520

@orpc/experimental-pino

npm i https://pkg.pr.new/@orpc/experimental-pino@1520

@orpc/experimental-publisher

npm i https://pkg.pr.new/@orpc/experimental-publisher@1520

@orpc/experimental-publisher-durable-object

npm i https://pkg.pr.new/@orpc/experimental-publisher-durable-object@1520

@orpc/experimental-ratelimit

npm i https://pkg.pr.new/@orpc/experimental-ratelimit@1520

@orpc/react

npm i https://pkg.pr.new/@orpc/react@1520

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@1520

@orpc/experimental-react-swr

npm i https://pkg.pr.new/@orpc/experimental-react-swr@1520

@orpc/server

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

@orpc/shared

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

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@1520

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@1520

@orpc/standard-server-aws-lambda

npm i https://pkg.pr.new/@orpc/standard-server-aws-lambda@1520

@orpc/standard-server-fastify

npm i https://pkg.pr.new/@orpc/standard-server-fastify@1520

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@1520

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@1520

@orpc/standard-server-peer

npm i https://pkg.pr.new/@orpc/standard-server-peer@1520

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@1520

@orpc/tanstack-query

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

@orpc/trpc

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

@orpc/valibot

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

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@1520

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@1520

@orpc/zod

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

commit: b8967e3

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for generating oRPC contracts from an existing OpenAPI spec using Hey API, and reorganizes the Hey API integration docs under the OpenAPI section to align with the new workflow (Fixes #1061).

Changes:

  • Add a new “OpenAPI to Contract” guide describing Hey API orpc plugin configuration and usage.
  • Add a new OpenAPI-scoped “Hey API Integration” page covering both contract generation and converting an existing Hey API client to an oRPC client.
  • Update VitePress sidebar navigation to include the new page and move the Hey API integration link to its new route (removing the old page).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
apps/content/docs/openapi/openapi-to-contract.md New guide explaining how to generate an oRPC contract from an OpenAPI spec via Hey API.
apps/content/docs/openapi/integrations/hey-api.md New integration page describing the two Hey API workflows and linking to the new contract-generation doc.
apps/content/docs/integrations/hey-api.md Removes the old Hey API integration page at the previous route.
apps/content/.vitepress/config.ts Updates sidebar entries to add “OpenAPI to Contract” and repoint “Hey API” to the new OpenAPI integrations route.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/content/docs/openapi/integrations/hey-api.md`:
- Line 19: Replace the broken link string
'/docs/contract-first/openapi-to-contract' in the markdown sentence starting "If
you already have an OpenAPI specification..." with the correct path
'/docs/openapi/openapi-to-contract' so the referenced page resolves; update the
link target in apps/content/docs/openapi/integrations/hey-api.md where the
anchor text "OpenAPI to Contract" is used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eb2b7d58-71fa-4833-8285-6f82713125ca

📥 Commits

Reviewing files that changed from the base of the PR and between 30668ea and bdbde55.

📒 Files selected for processing (4)
  • apps/content/.vitepress/config.ts
  • apps/content/docs/integrations/hey-api.md
  • apps/content/docs/openapi/integrations/hey-api.md
  • apps/content/docs/openapi/openapi-to-contract.md
💤 Files with no reviewable changes (1)
  • apps/content/docs/integrations/hey-api.md

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/content/docs/openapi/integrations/hey-api.md`:
- Line 29: The text references the wrong function name: update the prose so the
function name matches the code example; replace `toORPCClient` with
`experimental_toORPCClient` (or alternatively update the code example to use
`toORPCClient`) so both the description and example reference the same function
name (check occurrences of toORPCClient and experimental_toORPCClient in this
section and make them consistent).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 53fff578-75f0-4f8c-a06d-c06247a85287

📥 Commits

Reviewing files that changed from the base of the PR and between bdbde55 and a2bd77c.

📒 Files selected for processing (1)
  • apps/content/docs/openapi/integrations/hey-api.md

@dinwwwh dinwwwh merged commit dd914a8 into middleapi:main Apr 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI Spec to oRPC contract / OpenAPI Spec to oRPC Client

2 participants