import { Node } from '../models/Node'; /** * Used to resolve references ($ref or operationRef) to a JSON object. Users of the * apicurio-data-models library can provide zero or more custom implementations of * this interface in order to provide a way to resolve reference URI formats that * are not supported by default. However, internal references and external http[s] * based references are supported by default. * * When providing custom reference resolvers, those custom resolvers will be used * before any default/built-in resolvers. * * @author eric.wittmann@gmail.com * @class */ export interface IReferenceResolver { /** * Resolves a reference to a JSON object or {@link Node}. * @param {string} reference * @param {Node} from * @return {Node} null if the resolver cannot resolve the reference */ resolveRef(reference: string, from: Node): Node; }