@apistudio/apim-cli
Version:
CLI for API Management Products
18 lines (16 loc) • 484 B
text/typescript
import type { Arazzo1Rule } from '../../visitors';
import type { UserContext } from '../../walk';
export const SourceDescriptionsNotEmpty: Arazzo1Rule = () => {
return {
SourceDescriptions: {
enter(sourceDescriptions, { report, location }: UserContext) {
if (!sourceDescriptions?.length) {
report({
message: 'The `sourceDescriptions` list must have at least one entry.',
location,
});
}
},
},
};
};