Skip to content

Feature request: first class support for data validation in Event Handler #4516

@dreamorosi

Description

@dreamorosi

Use case

As a customer I want to use Standard Schema-compatible libraries to validate requests and/or responses when using Event Handler.

When enabled, things like body and query parameters (at minimum) should be strongly typed in route handlers and possibly middleware functions.

Solution/User Experience

At this point is too early for us to suggest an API or a design beyond what already described in #3500.

As part of the issue pre-work we'll have to do a proof of concept and come up with a spec, before starting implementation.

When working on the design, we should make sure we take in account the design for the OpenAPI feature, since it's highly likely that schema generation will rely on Standard Schemas.

It's also unclear at this point if we can support Standard Schema-compatible libraries as a whole or if we'll have to narrow down to Zod only.

Alternative solutions

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    event-handlerThis item relates to the Event Handler Utilityfeature-requestThis item refers to a feature request for an existing or new utilityon-holdThis item is on-hold and will be revisited in the future

    Type

    No type

    Projects

    Status

    On hold

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions