Interface IValidateWithSwaggerOptions

Options for 'validateWithSwagger()' function.

interface IValidateWithSwaggerOptions {
    documentation: {
        callbacks?: {
            [callback: string]: ReferenceObject | CallbackObject;
        };
        deprecated?: boolean;
        description?: string;
        externalDocs?: ExternalDocumentationObject;
        operationId?: string;
        parameters?: (ReferenceObject | ParameterObject)[];
        requestBody?: ReferenceObject | RequestBodyObject;
        responses: ResponsesObject;
        security?: SecurityRequirementObject[];
        servers?: ServerObject[];
        summary?: string;
        tags?: string[];
    };
    onValidationFailed?: Nilable<JsonSchemaValidationFailedHandler>;
}

Properties

documentation: {
    callbacks?: {
        [callback: string]: ReferenceObject | CallbackObject;
    };
    deprecated?: boolean;
    description?: string;
    externalDocs?: ExternalDocumentationObject;
    operationId?: string;
    parameters?: (ReferenceObject | ParameterObject)[];
    requestBody?: ReferenceObject | RequestBodyObject;
    responses: ResponsesObject;
    security?: SecurityRequirementObject[];
    servers?: ServerObject[];
    summary?: string;
    tags?: string[];
}

The documentation to use as schema for the validation.

Type declaration

onValidationFailed?: Nilable<JsonSchemaValidationFailedHandler>

The custom error handler.

Generated using TypeDoc