docs(zod-openapi): update the readme

pull/136/head
Yusuke Wada 2023-08-23 11:49:32 +09:00
parent 1bcd9624b1
commit 889338f3c7
1 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ import { createRoute } from '@hono/zod-openapi'
const route = createRoute({
method: 'get',
path: '/users/:id',
path: '/users/{id}',
request: {
params: ParamsSchema,
},
@ -134,7 +134,7 @@ Then, add the error response:
```ts
const route = createRoute({
method: 'get',
path: '/users/:id',
path: '/users/{id}',
request: {
params: ParamsSchema,
},
@ -159,7 +159,7 @@ app.openapi(
(c) => {
const { id } = c.req.valid('param')
return c.jsonT({
id: Number(id),
id,
age: 20,
name: 'Ultra-man',
})