import { JSONSchema , JSONSchemaStore } from "./JSONSchemaStore" ; import { parseJSON } from ".." ; import { readFromFileOrURL } from "./io/NodeIO" ; export class FetchingJSONSchemaStore extends JSONSchemaStore { constructor ( private readonly _httpHeaders ? ) { super ( ) ; } async fetch ( address ) { return parseJSON ( await readFromFileOrURL ( address , this . _httpHeaders ) , "JSON Schema" , address ) ; } }