SchemaFileLocater Class

Abstract class to hold common/overlapping functionality between SchemaJsonFileLocater and SchemaXmlFileLocater

  • Needs further testing and possibly moved to a separate package.

Extended by

Methods

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

Properties

Name Type Description
searchPaths string[]    

Defined in

Last Updated: 21 November, 2024