🌟 1. Improved Chaining Flow
The chaining flow has been enhanced to reduce confusion and enable more flexible middleware usage.
- You can now insert middleware between
.input
and.output
for more granular control. - TypeScript will now catch invalid chaining patterns, such as calling
.middleware
after.use
, or chaining.input
after another.input
. This ensures developers are guided toward the correct sequence at compile time.
🚀 2. Custom Schemas with type
The type
utility allows you to create custom schemas:
export const getting = oc.input(type<{ id: string }>());
This simplifies validation and reduces bundle size, especially in scenarios where heavy validation logic is unnecessary.
🚀 Features
- contract:
- server: