Skip to content

Conversation

@unnoq
Copy link
Member

@unnoq unnoq commented Dec 10, 2025

Summary by CodeRabbit

Release Notes

  • API Updates
    • SmartCoercionPlugin and JsonSchemaCoercer are now available as stable public APIs.
    • SmartCoercionPluginOptions and JsonSchemaCoerceOptions are now stable configuration interfaces.
    • Update your project imports to reference the new stable API exports for continued compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 10, 2025
@unnoq unnoq requested a review from Copilot December 10, 2025 03:34
@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Walkthrough

This PR promotes the SmartCoercionPlugin and JsonSchemaCoercer from experimental to stable public APIs by removing the experimental_ prefix from exported class and interface names, updating all internal and external imports accordingly.

Changes

Cohort / File(s) Change Summary
Core Library Implementation
packages/json-schema/src/coercer.ts, packages/json-schema/src/smart-coercion-plugin.ts
Renamed exported classes and interfaces from experimental_* to stable public names: JsonSchemaCoercer, JsonSchemaCoerceOptions, SmartCoercionPlugin, SmartCoercionPluginOptions. Import statements within module updated accordingly.
Core Library Tests
packages/json-schema/src/coercer.test.ts, packages/json-schema/src/smart-coercion-plugin.test.ts
Updated test imports to reference public export names instead of experimental aliases.
Documentation
apps/content/docs/openapi/plugins/smart-coercion.md
Updated code example import from experimental_SmartCoercionPlugin to SmartCoercionPlugin.
Playground Updates
playgrounds/astro/src/pages/api/[...rest].ts, playgrounds/cloudflare-worker/worker/index.ts, playgrounds/contract-first/src/main.ts, playgrounds/nest/src/app.module.ts, playgrounds/next/src/app/api/[[...rest]]/route.ts, playgrounds/nuxt/server/routes/api/[...].ts, playgrounds/solid-start/src/routes/api/[...rest].ts, playgrounds/svelte-kit/src/routes/api/[...rest]/+server.ts, playgrounds/tanstack-start/src/routes/api/$.ts
Replaced experimental import aliases with direct public named imports of SmartCoercionPlugin from @orpc/json-schema. Plugin usage logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Highly repetitive, homogeneous changes across all playground files (same import pattern applied consistently)
  • Core library changes are straightforward API naming promotions with no logic modifications
  • Primary review focus: verify the experimental_ prefix removal is applied consistently across all files and that no functional behavior was accidentally modified

Possibly related PRs

  • PR #748: Original introduction of the experimental smart-coercion feature; this PR stabilizes and promotes those APIs to public status.

Poem

🐰 From lab to light, the rabbit hops with cheer,
Experimental names shed, the public path is clear!
No more the experimental_ prefix in the way,
SmartCoercionPlugin now shines bright as day! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(json-schema): stable SmartCoercionPlugin' accurately reflects the main change across the entire changeset—promoting SmartCoercionPlugin and related types from experimental to stable public exports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/json-schema/stable-SmartCoercionPlugin

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 059b949 and 3c52495.

📒 Files selected for processing (14)
  • apps/content/docs/openapi/plugins/smart-coercion.md (1 hunks)
  • packages/json-schema/src/coercer.test.ts (1 hunks)
  • packages/json-schema/src/coercer.ts (1 hunks)
  • packages/json-schema/src/smart-coercion-plugin.test.ts (1 hunks)
  • packages/json-schema/src/smart-coercion-plugin.ts (1 hunks)
  • playgrounds/astro/src/pages/api/[...rest].ts (1 hunks)
  • playgrounds/cloudflare-worker/worker/index.ts (1 hunks)
  • playgrounds/contract-first/src/main.ts (1 hunks)
  • playgrounds/nest/src/app.module.ts (1 hunks)
  • playgrounds/next/src/app/api/[[...rest]]/route.ts (1 hunks)
  • playgrounds/nuxt/server/routes/api/[...].ts (1 hunks)
  • playgrounds/solid-start/src/routes/api/[...rest].ts (1 hunks)
  • playgrounds/svelte-kit/src/routes/api/[...rest]/+server.ts (1 hunks)
  • playgrounds/tanstack-start/src/routes/api/$.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/json-schema/src/coercer.ts (2)
packages/json-schema/src/types.ts (1)
  • JsonSchema (8-11)
packages/json-schema/src/smart-coercion-plugin.ts (1)
  • schema (42-51)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Agent
  • GitHub Check: lint
  • GitHub Check: test
  • GitHub Check: publish-commit
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (14)
packages/json-schema/src/smart-coercion-plugin.test.ts (1)

3-3: LGTM! Import updated to use the stable public API.

The test correctly imports SmartCoercionPlugin directly instead of the experimental alias.

apps/content/docs/openapi/plugins/smart-coercion.md (1)

46-46: LGTM! Documentation updated to reflect the stable API.

The import example now correctly shows the direct import of SmartCoercionPlugin without the experimental alias, making the API simpler for users.

packages/json-schema/src/coercer.test.ts (1)

2-2: LGTM! Test import updated to use the stable API.

The test correctly imports JsonSchemaCoercer directly instead of the experimental alias.

playgrounds/astro/src/pages/api/[...rest].ts (1)

5-5: LGTM! Playground updated to use the stable API.

The import has been correctly updated to use SmartCoercionPlugin directly from @orpc/json-schema.

playgrounds/contract-first/src/main.ts (1)

6-6: LGTM! Playground updated to use the stable API.

The import has been correctly updated to use SmartCoercionPlugin directly from @orpc/json-schema.

playgrounds/cloudflare-worker/worker/index.ts (1)

4-4: LGTM! Playground updated to use the stable API.

The import has been correctly updated to use SmartCoercionPlugin directly from @orpc/json-schema.

packages/json-schema/src/smart-coercion-plugin.ts (1)

9-24: LGTM! Consistent API promotion across the plugin.

All interfaces, classes, and type references have been consistently renamed to remove the experimental_ prefix. The import dependency on JsonSchemaCoercer is correctly updated. No remaining references to the old experimental names exist in the codebase, and package exports are properly configured to re-export the renamed APIs.

packages/json-schema/src/coercer.ts (1)

7-15: LGTM! Clean API promotion from experimental to stable.

The interface and class have been consistently renamed by removing the experimental_ prefix. The method signatures are properly updated throughout the file. No remaining references to the old experimental names exist in the codebase, and the main export file properly exports the renamed symbols via export * from './coercer'.

playgrounds/next/src/app/api/[[...rest]]/route.ts (1)

5-5: Next.js route aligned with stable SmartCoercionPlugin import

The direct SmartCoercionPlugin import is consistent with the new stable API and matches its usage in the handler’s plugins array; no other changes needed here.

playgrounds/nuxt/server/routes/api/[...].ts (1)

4-4: Nuxt API route correctly updated to stable SmartCoercionPlugin

Directly importing SmartCoercionPlugin from @orpc/json-schema keeps this Nuxt route in sync with the stabilized API without altering behavior.

playgrounds/tanstack-start/src/routes/api/$.ts (1)

5-5: TanStack Start route now uses the public SmartCoercionPlugin export

The updated import matches the stable SmartCoercionPlugin API and remains consistent with the existing handler configuration.

playgrounds/solid-start/src/routes/api/[...rest].ts (1)

5-5: SolidStart API route import matches stabilized SmartCoercionPlugin API

Using SmartCoercionPlugin directly from @orpc/json-schema is consistent with the rest of the PR and should preserve existing coercion behavior.

playgrounds/nest/src/app.module.ts (1)

10-10: Nest AppModule now imports SmartCoercionPlugin from the stable API

The Nest ORPC module continues to configure SmartCoercionPlugin identically; switching to the non-experimental named export is correct and consistent with the new public surface.

playgrounds/svelte-kit/src/routes/api/[...rest]/+server.ts (1)

6-6: Import correctly targets the stable SmartCoercionPlugin export

The import on line 6 has been updated to use SmartCoercionPlugin from @orpc/json-schema, which is properly exported as a stable API. The plugin instantiation on line 20 remains unchanged with the same configuration using schemaConverters. No lingering experimental imports were found in the codebase.


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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @unnoq, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request signifies a key milestone in the development of the JSON Schema coercion capabilities. By removing the 'experimental' designation from the SmartCoercionPlugin and JsonSchemaCoercer, these components are now officially stable and ready for general use. This change streamlines their naming conventions and fully integrates them into the public API, enhancing clarity and consistency for all developers.

Highlights

  • SmartCoercionPlugin Stabilization: The SmartCoercionPlugin has been promoted from an experimental feature to a stable component, removing the experimental_ prefix from its name and related interfaces.
  • JsonSchemaCoercer Stabilization: The JsonSchemaCoercer and its associated options have also been stabilized, dropping the experimental_ prefix from their declarations and usages.
  • Codebase Updates: All references to the experimental names across the codebase, including documentation, test files, and various playground examples, have been updated to reflect the new stable names.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 graduates the SmartCoercionPlugin from its experimental status. The changes primarily involve removing the experimental_ prefix from SmartCoercionPlugin, JsonSchemaCoercer, and their respective options interfaces. This renaming has been consistently applied across all relevant files, including the core logic, tests, documentation, and example playground applications. The changes are straightforward and correctly implemented. I have no further suggestions.

Copy link
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

This PR stabilizes the SmartCoercionPlugin by removing the experimental_ prefix from the plugin and its related types, promoting them to stable API status.

  • Renamed experimental_SmartCoercionPlugin to SmartCoercionPlugin and related types
  • Updated all imports across playground applications to use the new stable naming
  • Updated test files and documentation to reflect the stable API

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
playgrounds/tanstack-start/src/routes/api/$.ts Updated import to use stable SmartCoercionPlugin
playgrounds/svelte-kit/src/routes/api/[...rest]/+server.ts Updated import to use stable SmartCoercionPlugin
playgrounds/solid-start/src/routes/api/[...rest].ts Updated import to use stable SmartCoercionPlugin
playgrounds/nuxt/server/routes/api/[...].ts Updated import to use stable SmartCoercionPlugin
playgrounds/next/src/app/api/[[...rest]]/route.ts Updated import to use stable SmartCoercionPlugin
playgrounds/nest/src/app.module.ts Updated import to use stable SmartCoercionPlugin
playgrounds/contract-first/src/main.ts Updated import to use stable SmartCoercionPlugin
playgrounds/cloudflare-worker/worker/index.ts Updated import to use stable SmartCoercionPlugin
playgrounds/astro/src/pages/api/[...rest].ts Updated import to use stable SmartCoercionPlugin
packages/json-schema/src/smart-coercion-plugin.ts Renamed class and interface from experimental to stable names
packages/json-schema/src/smart-coercion-plugin.test.ts Updated test import to use stable SmartCoercionPlugin
packages/json-schema/src/coercer.ts Renamed JsonSchemaCoercer class and options interface to stable names
packages/json-schema/src/coercer.test.ts Updated test import to use stable JsonSchemaCoercer
apps/content/docs/openapi/plugins/smart-coercion.md Updated documentation example to use stable import syntax

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 10, 2025

More templates

@orpc/ai-sdk

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

@orpc/arktype

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

@orpc/client

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

@orpc/contract

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

@orpc/experimental-durable-iterator

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

@orpc/hey-api

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

@orpc/interop

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

@orpc/json-schema

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

@orpc/nest

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

@orpc/openapi

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

@orpc/openapi-client

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

@orpc/otel

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

@orpc/experimental-pino

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

@orpc/experimental-publisher

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

@orpc/experimental-publisher-durable-object

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

@orpc/experimental-ratelimit

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

@orpc/react

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

@orpc/react-query

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

@orpc/experimental-react-swr

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

@orpc/server

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

@orpc/shared

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

@orpc/solid-query

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

@orpc/standard-server

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

@orpc/standard-server-aws-lambda

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

@orpc/standard-server-fastify

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

@orpc/standard-server-fetch

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

@orpc/standard-server-node

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

@orpc/standard-server-peer

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

@orpc/svelte-query

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

@orpc/tanstack-query

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

@orpc/trpc

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

@orpc/valibot

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

@orpc/vue-colada

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

@orpc/vue-query

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

@orpc/zod

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

commit: 3c52495

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cloudflare-workers-and-pages
Copy link

Deploying orpc with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c52495
Status: ✅  Deploy successful!
Preview URL: https://d15c7883.orpc-1qh.pages.dev
Branch Preview URL: https://feat-json-schema-stable-smar.orpc-1qh.pages.dev

View logs

@unnoq unnoq merged commit f01f7b1 into main Dec 18, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants