@stoplight/spectral
Version:
A flexible object linter with out of the box support for OpenAPI v2 and v3.
16 lines (15 loc) • 450 B
TypeScript
import { JsonPath } from '@stoplight/types';
export declare type IFunction<O = any> = (targetValue: any, options: O, paths: IFunctionPaths, otherValues: IFunctionValues) => void | IFunctionResult[];
export interface IFunctionPaths {
given: JsonPath;
target?: JsonPath;
}
export interface IFunctionValues {
original: any;
given: any;
resolved?: any;
}
export interface IFunctionResult {
message: string;
path?: JsonPath;
}