UNPKG

@stoplight/spectral

Version:

A flexible object linter with out of the box support for OpenAPI v2 and v3.

32 lines (31 loc) 1.1 kB
import { Dictionary, GetLocationForJsonPath, IDiagnostic, IParserResult, JsonPath } from '@stoplight/types'; import { Resolver } from '@stoplight/json-ref-resolver'; import { IFunction } from './function'; import { IRule, Rule } from './rule'; export declare type FunctionCollection = Dictionary<IFunction, string>; export declare type RuleCollection = Dictionary<Rule, string>; export declare type PartialRuleCollection = Dictionary<Partial<Rule>, string>; export declare type RunRuleCollection = Dictionary<IRunRule, string>; export interface IRunRule extends IRule { name: string; } export declare type RuleDeclarationCollection = Dictionary<boolean, string>; export interface IConstructorOpts { resolver?: Resolver; } export interface IRunOpts { resolvedTarget?: object; } export interface IRuleResult extends IDiagnostic { summary?: string; path: JsonPath; } export interface IGivenNode { path: JsonPath; value: any; } export interface IParsedResult { parsed: IParserResult; getLocationForJsonPath: GetLocationForJsonPath<any, any>; source?: string; }