3.0 KiB
3.0 KiB
@hono/typia-validator
0.1.2
Patch Changes
- #1027
70bae1d5734bb411b0e9d4ae8f5f010966da8d5c
Thanks @koteelok! - Move 'default' entry point down to fix imports in ESM environments.
0.1.1
Patch Changes
- #1024
4f1782919154946a4105a113884f2ae929dc9317
Thanks @gronxb! - Includetypia@8
as a peer dependency
0.1.0
Minor Changes
-
#888
c63470e4915a0680c624bf97d52487572185a2d5
Thanks @miyaji255! - Enables handling ofnumber
,boolean
, andbigint
types in query parameters and headers.- import { typiaValidator } from '@hono/typia-validator'; + import { typiaValidator } from '@hono/typia-validator/http'; import { Hono } from 'hono'; import typia, { type tags } from 'typia'; interface Schema { - pages: `${number}`[]; + pages: (number & tags.Type<'uint32'>)[]; } const app = new Hono() .get( '/books', typiaValidator( - typia.createValidate<Schema>(), + typia.http.createValidateQuery<Schema>(), async (result, c) => { if (!result.success) return c.text('Invalid query parameters', 400); - return { pages: result.data.pages.map(Number) }; } ), async c => { const { pages } = c.req.valid('query'); // { pages: number[] } //... } )
0.0.5
Patch Changes
- #570
66366075d4f268ad0190a30f1c77ca433cacf0b3
Thanks @ryoppippi! - PeerDependency of Typia is updated from v5 to v6
0.0.4
Patch Changes
- #488
1cc5e0a5b07a14723c5d21ceea33ad9caef33025
Thanks @Frog-kt! - Fixed a part of deprecated response json method in hono since v4.