UNPKG

@redocly/openapi-core

Version:

See https://github.com/Redocly/redocly-cli

20 lines 719 B
import { isPlainObject } from '../../utils/is-plain-object.js'; export const NoCriteriaXpath = () => { return { CriterionObject: { enter(criteria, { report, location }) { if (!criteria.type) { return; } if (criteria.type === 'xpath' || (isPlainObject(criteria.type) && criteria.type.type === 'xpath')) { report({ message: 'The `xpath` type criteria is not supported by Respect.', location: location.child(['type']), }); } }, }, }; }; //# sourceMappingURL=no-criteria-xpath.js.map