UNPKG

@opendoc/openapi-reference-parser

Version:

Get the dependencies of reference in openapi.

27 lines (26 loc) 1.05 kB
import { ReferenceStorage } from './types/reference-storage'; export declare abstract class Reference { static from($ref: string | string[]): Reference; abstract toString(): string; abstract set<T>(storage: ReferenceStorage<T>, value: T): void; abstract get<T>(storage: ReferenceStorage<T>): T | undefined; abstract equals(ref: Reference): boolean; } export declare class RelativeReference extends Reference { private paths; constructor(paths: string[]); resolve<T>(object: object): Promise<T | undefined>; toString(): string; set<T>(storage: ReferenceStorage<T>, value: T): void; get<T>(storage: ReferenceStorage<T>): T | undefined; equals(ref: Reference): boolean; } export declare class AbsoluteReference extends Reference { private address; constructor(address: string); resolve<T>(): Promise<T | undefined>; toString(): string; set<T>(storage: ReferenceStorage<T>, value: T): void; get<T>(storage: ReferenceStorage<T>): T | undefined; equals(ref: Reference): boolean; }