@redocly/openapi-core
Version:
See https://github.com/Redocly/redocly-cli
21 lines • 818 B
JavaScript
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']),
reference: 'https://redocly.com/docs/cli/rules/respect/no-criteria-xpath',
});
}
},
},
};
};
//# sourceMappingURL=no-criteria-xpath.js.map