@lucid-softworks/http-validation
v0.1.0
Published
Schema-based HTTP body, query, and route parameter validation.
Maintainers
Readme
@lucid-softworks/http-validation
Schema-based JSON body, query, and route-parameter validation.
import { validateHttpRequest } from "@lucid-softworks/http-validation";
const input = await validateHttpRequest(request, context, {
body: createUserSchema,
params: userParamsSchema,
});Sections are optional and retain their inferred output types. JSON syntax and
schema failures throw HttpValidationError labelled with their source.
