diff --git a/.changeset/ninety-rules-give.md b/.changeset/ninety-rules-give.md new file mode 100644 index 000000000..ded5b9de5 --- /dev/null +++ b/.changeset/ninety-rules-give.md @@ -0,0 +1,7 @@ +--- +'@hono/swagger-ui': patch +'@hono/typebox-validator': patch +'@hono/typia-validator': patch +--- + +Fixed a part of deprecated response json method in hono since v4. diff --git a/packages/swagger-ui/README.md b/packages/swagger-ui/README.md index 53eb3ca59..25a9f338b 100644 --- a/packages/swagger-ui/README.md +++ b/packages/swagger-ui/README.md @@ -91,7 +91,7 @@ app.openapi( } }), (c) => { - return c.jsonT({ + return c.json({ message: 'hello' }) } diff --git a/packages/typebox-validator/test/index.test.ts b/packages/typebox-validator/test/index.test.ts index 2a348f332..6699f795e 100644 --- a/packages/typebox-validator/test/index.test.ts +++ b/packages/typebox-validator/test/index.test.ts @@ -16,7 +16,7 @@ describe('Basic', () => { const route = app.post('/author', tbValidator('json', schema), (c) => { const data = c.req.valid('json') - return c.jsonT({ + return c.json({ success: true, message: `${data.name} is ${data.age}`, }) diff --git a/packages/typia-validator/README.md b/packages/typia-validator/README.md index 5975d8e4d..b6482f889 100644 --- a/packages/typia-validator/README.md +++ b/packages/typia-validator/README.md @@ -17,7 +17,7 @@ interface Author { const route = app.post('/author', typiaValidator('json', validate), (c) => { const data = c.req.valid('json') - return c.jsonT({ + return c.json({ success: true, message: `${data.name} is ${data.age}`, }) diff --git a/packages/typia-validator/test/index.test.ts b/packages/typia-validator/test/index.test.ts index 20f12b63c..f6296ad38 100644 --- a/packages/typia-validator/test/index.test.ts +++ b/packages/typia-validator/test/index.test.ts @@ -19,7 +19,7 @@ describe('Basic', () => { const route = app.post('/author', typiaValidator('json', validate), (c) => { const data = c.req.valid('json') - return c.jsonT({ + return c.json({ success: true, message: `${data.name} is ${data.age}`, })