persona-community-5/.pnpm-store/v3/files/fc/ccbf795111a76c45f3e769762d41a070eeb30f935bbc595cee9630c74403bd4c25599d0bb9ffbce8da49b7d9138ad013b7a53ac24563d94c29c2b004d6b189
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

22 lines
753 B
Plaintext

import type { Arazzo1Rule } from '../../visitors';
import type { UserContext } from '../../walk';
export const SourceDescriptionType: Arazzo1Rule = () => {
return {
SourceDescriptions: {
enter(sourceDescriptions, { report, location }: UserContext) {
if (!sourceDescriptions.length) return;
for (const sourceDescription of sourceDescriptions) {
if (!['openapi', 'arazzo'].includes(sourceDescription?.type)) {
report({
message:
'The `type` property of the `sourceDescription` object must be either `openapi` or `arazzo`.',
location: location.child([sourceDescriptions.indexOf(sourceDescription)]),
});
}
}
},
},
};
};