Schema Validation
Overview
Section titled “Overview”Schema Validation is done with Zod, a typeScript-first schema validation with static type inference.
Response
Section titled “Response”These are the response shapes:
{ success: true, data: data, meta: MetaSchema.optional(),}
{ success: false, error: HttpErrorSchema, meta: MetaSchema.optional(),}HttpResponse(dataSchema: T) is the type for either.
Success
Section titled “Success”Successful responses should use the httpSuccess(reply, data, metaq) wrapper.
return httpSuccess(reply,data);