Constructors
constructor
Parameters
Returns Ajv
Properties
Readonly RULES
Readonly _compilations
Optional errors
Readonly formats
formats: {}
logger
opts
Readonly refs
refs: {}
Readonly schemas
schemas: {}
Readonly scope
Static MissingRefError
Static ValidationError
Methods
$dataMetaSchema
Parameters
keywordsJsonPointers: string[]
_addDefaultMetaSchema
- _addDefaultMetaSchema(): void
Returns void
_addSchema
- _addSchema(schema: AnySchema, meta?: boolean, baseId?: string, validateSchema?: boolean | "log", addSchema?: boolean): SchemaEnv
Parameters
Optional meta: boolean
Optional baseId: string
Optional validateSchema: boolean | "log"
Optional addSchema: boolean
_addVocabularies
Returns void
addFormat
Parameters
Returns Ajv
addKeyword
Parameters
Returns Ajv
addMetaSchema
- addMetaSchema(schema: AnySchemaObject, key?: string, _validateSchema?: boolean | "log"): Ajv
Parameters
Optional key: string
Optional _validateSchema: boolean | "log"
Returns Ajv
addSchema
- addSchema(schema: AnySchema | AnySchema[], key?: string, _meta?: boolean, _validateSchema?: boolean | "log"): Ajv
Parameters
Optional key: string
Optional _meta: boolean
Optional _validateSchema: boolean | "log"
Returns Ajv
addVocabulary
Parameters
Returns Ajv
compile
Type parameters
Parameters
Type parameters
Parameters
schema: JTDSchemaType<T, Record<string, never>>
Optional _meta: boolean
Type parameters
Parameters
schema: T
Optional _meta: boolean
Type parameters
Parameters
Type parameters
Parameters
compileAsync
Type parameters
Parameters
Type parameters
Parameters
schema: JTDSchemaType<T, Record<string, never>>
Optional _meta: boolean
Type parameters
Parameters
Type parameters
Parameters
defaultMeta
errorsText
Parameters
Returns string
getKeyword
Parameters
getSchema
Type parameters
Parameters
removeKeyword
- removeKeyword(keyword: string): Ajv
Parameters
Returns Ajv
removeSchema
- removeSchema(schemaKeyRef?: string | RegExp | AnySchema): Ajv
Parameters
Optional schemaKeyRef: string | RegExp | AnySchema
Returns Ajv
validate
- validate(schema: string | "/home/runner/work/forge/forge/node_modules/webpack-dev-middleware/node_modules/ajv/dist/ajv".Schema, data: unknown): boolean
- validate(schemaKeyRef: string | AnySchema, data: unknown): boolean | Promise<unknown>
- validate<T>(schema: string | "/home/runner/work/forge/forge/node_modules/webpack-dev-middleware/node_modules/ajv/dist/ajv".Schema | UncheckedJSONSchemaType<T, false>, data: unknown): data is T
- validate<T>(schema: JTDSchemaType<T, Record<string, never>>, data: unknown): data is T
- validate<N, T>(schema: T, data: unknown): data is JTDDataType<T>
- validate<T>(schema: AsyncSchema, data: unknown): Promise<T>
- validate<T>(schemaKeyRef: string | AnySchema, data: unknown): data is T | Promise<T>
Parameters
Returns boolean
Parameters
schemaKeyRef: string | AnySchema
data: unknown
Returns boolean | Promise<unknown>
Type parameters
Parameters
Returns data is T
Type parameters
Parameters
Returns data is T
Type parameters
Parameters
Type parameters
Parameters
Returns Promise<T>
Type parameters
Parameters
schemaKeyRef: string | AnySchema
data: unknown
Returns data is T | Promise<T>
validateSchema
- validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>
Parameters
Optional throwOrLogError: boolean
Returns boolean | Promise<unknown>