@apistudio/apim-cli
Version:
CLI for API Management Products
15 lines (13 loc) • 414 B
text/typescript
import type { Oas3Rule } from '../../visitors';
export const NoExampleValueAndExternalValue: Oas3Rule = () => {
return {
Example(example, { report, location }) {
if (example.value && example.externalValue) {
report({
message: 'Example object can have either `value` or `externalValue` fields.',
location: location.child(['value']).key(),
});
}
},
};
};