Skip to content

Interface: ResourcefulPayloadValidatorGetter()

Function type for generating payload validation schemas based on request context.

These functions are called during create and update operations to generate context-specific validation schemas using Joi. They provide the core model-level validation that applies regardless of request-specific hooks.

ts
ResourcefulPayloadValidatorGetter(ctx: HttpContext, app: ApplicationService): PromiseAble<AnySchema<any>>;

Parameters

ParameterTypeDescription
ctxHttpContextHTTP context containing request information and authentication
appApplicationServiceApplication service instance for accessing app-level services

Returns

PromiseAble<AnySchema<any>>

Promise resolving to a Joi schema for validating the request payload