SchemaJsonFileLocater Class

A SchemaLocator implementation for locating JSON Schema files from the file system using configurable search paths.

Extends

Implements

Methods

Name Description
constructor(): SchemaJsonFileLocater    
getSchema<T extends Schema>(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | T> Attempts to retrieve a Schema with the given SchemaKey by using the configured  
getSchemaInfo(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): Promise<undefined | SchemaInfo> Gets the schema info which matches the provided SchemaKey.  
getSchemaKey(data: string): SchemaKey Protected Constructs a SchemaKey based on the information in the Schema JSON  
getSchemaSync<T extends Schema>(schemaKey: SchemaKey, matchType: SchemaMatchType, context: SchemaContext): undefined | T Attempts to retrieve a Schema with the given SchemaKey by using the configured  

Inherited methods

Name Inherited from Description
addSchemaSearchPath(schemaPath: string): void Inherited SchemaFileLocater Add one search path used by this locator to find the
addSchemaSearchPaths(schemaPaths: string[]): void Inherited SchemaFileLocater Adds more search paths used by this locator to find the
compareSchemaKeyByVersion(lhs: FileSchemaKey, rhs: FileSchemaKey): number Inherited SchemaFileLocater Compares two Schema versions.
fileExists(filePath: string): Promise<undefined | boolean> Inherited SchemaFileLocater  
fileExistsSync(filePath: string): undefined | boolean Inherited SchemaFileLocater  
findEligibleSchemaKeys(desiredKey: Readonly<SchemaKey>, matchType: SchemaMatchType, format: string): FileSchemaKey[] Protected Inherited SchemaFileLocater Attempts to find all Schema files in the configurable search paths that match
readUtf8FileToString(filePath: string): Promise<undefined | string> Inherited SchemaFileLocater  
readUtf8FileToStringSync(filePath: string): undefined | string Inherited SchemaFileLocater  

Inherited properties

Name Type Inherited from Description
searchPaths Inherited string[] SchemaFileLocater  

Defined in

Last Updated: 14 November, 2024