openapi-fastify
    Preparing search index...

    Type Alias AutoValidateConfig

    AutoValidateConfig:
        | boolean
        | {
            config?: AjvOptions;
            request?: AutoValidateRequestResponseConfig;
            response?: AutoValidateRequestResponseConfig;
        }

    Type Declaration

    • boolean
    • {
          config?: AjvOptions;
          request?: AutoValidateRequestResponseConfig;
          response?: AutoValidateRequestResponseConfig;
      }
      • Optionalconfig?: AjvOptions
      • Optionalrequest?: AutoValidateRequestResponseConfig
        • Whether to automatically validate the request body.
        • If true, the request body will be validated against the schema via the preValidation hook.
        {validate: true, errorResponse: {status: 400, payload: {error: "Invalid Request Body", errors: Ajv.Errors[]}}}
        
      • Optionalresponse?: AutoValidateRequestResponseConfig
        • Whether to automatically validate the response.
        • If true, the response will be validated against the schema via the preSerialization hook.
        {validate: true, errorResponse: {status: 500, payload: {error: "Invalid Response", errors: Ajv.Errors[]}}}`