Benno
Benno
Explore posts from servers
HHono
Created by Benno on 8/28/2024 in #help
Enforcing strict types for Hono's c.json() responses?
Wait I can just directly pass the hono.TypedResponse instead of going through the hono.HandlerResponse. Now its working. Not perfect since the type gets enforced on the handler level (not at c.json) but better than before. Thanks for the hint 🙂
export type TOpenApiHonoResponse<GPathOperation> = hono.TypedResponse<
TOperationSuccessResponseContent<GPathOperation>
>;
export type TOpenApiHonoResponse<GPathOperation> = hono.TypedResponse<
TOperationSuccessResponseContent<GPathOperation>
>;
5 replies
HHono
Created by Benno on 8/28/2024 in #help
Enforcing strict types for Hono's c.json() responses?
No description
5 replies
HHono
Created by Benno on 8/28/2024 in #help
Enforcing strict types for Hono's c.json() responses?
Thanks, will check it out 🙂
5 replies
HHono
Created by Benno on 7/9/2024 in #help
Enforce OpenAPI types
Managed to make it somewhat work. Will improve it over time. I'm quite new to Hono but like it so far. https://discord.com/channels/1011308539819597844/1012485565087748156/1260595634583638076
4 replies
HHono
Created by Benno on 7/9/2024 in #help
Enforce OpenAPI types
ok seems to be possible via the validator interface wip: https://github.com/inbeta-group/monorepo/pull/49
4 replies
HHono
Created by Benno on 7/9/2024 in #help
Enforce OpenAPI types
Ok doesn't seem to be possible (yet). https://github.com/honojs/hono/pull/1634
4 replies