Interface SchemaProvider

An interface to be implemented by objects that initialize Joi schema objects.

Hierarchy

  • SchemaProvider

Properties

Properties

init: ((props) => Promise<AnySchema<any>>)

Type declaration

    • (props): Promise<AnySchema<any>>
    • Initialize Joi schema

      Parameters

      Returns Promise<AnySchema<any>>

name: string | (() => string)

Name of the schema that this provider initializes.

Type declaration

    • (): string
    • Returns string

schema?: ((props) => ObjectSchema<any>)

Type declaration

    • (props): ObjectSchema<any>
    • Create a schema used to validate properties used to initialize a new schema.

      Parameters

      • props: SchemaProps

      Returns ObjectSchema<any>

Generated using TypeDoc