Comments (2)
Hi @vickyRathee
partial()
function not available in latest version0.14.2
?
Yes, it supports partial()
:
import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi'
const openapiHono = new OpenAPIHono().openapi(
createRoute({
method: 'get',
path: '/users/1',
responses: {
200: {
content: {
'application/json': {
schema: z
.object({
name: z.string().openapi({
example: 'John Doe'
}),
age: z.number().openapi({
example: 42
})
})
.partial()
.openapi('User')
}
},
description: 'Retrieve the user'
}
}
}),
(c) => {
return c.json({
age: 20,
name: 'Ultra-man'
})
}
)
from middleware.
Yes, thanks. It's working, but not with refine().partial()
I guess due to upstream.
from middleware.
Related Issues (20)
- [zod-openapi] Support ZodLazy HOT 4
- [zod-openapi] Cannot find module '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator' on NodeNext and ES Modules HOT 1
- Type error in Context when using zod-openapi and swagger-ui HOT 2
- Support for @sentry/serverless as new middleware package or inclusion in current package?
- [zod-openapi] Factory for OpenAPIHono
- Improve type definitions for arguments in `RootResolver` of graphql-server HOT 1
- Zod-OpenAPI returns ZodError - when query param field is `z.array()` and only passing 1 value
- loss of body in post requests in auth.js for bun HOT 3
- Avoid add base path
- [zod-validator] zValidator for param doesn't behave as expected HOT 1
- Zod OpenAPI Hono File HOT 2
- @hono/sentry - Help needed for Distributed tracing HOT 1
- [zod-openapi] It should not run all content-type validators for a request body HOT 8
- [zod-openapi] `c.req.json()` body type inferred as `any` HOT 1
- @hono/eslint-config not working with typescript-eslint v8 HOT 1
- Zod validations not working using app.request in tests HOT 1
- @hono/zod-validator - wronge type inference when the response is error HOT 3
- [zod-openapi] Unable to register endpoints with `HEAD` method
- Hono env context in @hono/trpc-server createContext does not have type bindings
- [trpc-server]: support for websockets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from middleware.