UNPKG

@redocly/openapi-core

Version:

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

19 lines 895 B
export const NoMixedNumberRangeConstraints = () => { return { Schema(schema, { report, location }) { if (typeof schema.maximum === 'number' && typeof schema.exclusiveMaximum === 'number') { report({ message: 'Schema should not have both `maximum` and `exclusiveMaximum`. Use one or the other.', location: location.child(['exclusiveMaximum']).key(), }); } if (typeof schema.minimum === 'number' && typeof schema.exclusiveMinimum === 'number') { report({ message: 'Schema should not have both `minimum` and `exclusiveMinimum`. Use one or the other.', location: location.child(['exclusiveMinimum']).key(), }); } }, }; }; //# sourceMappingURL=no-mixed-number-range-constraints.js.map