We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
anymaniax
melloware
soartec-lab
Learn more about funding links in repositories.
Report abuse
1 parent 5b76e3b commit cf66f3fCopy full SHA for cf66f3f
packages/core/src/utils/validator.ts
@@ -17,11 +17,11 @@ export const ibmOpenapiValidator = async (specs: OpenAPIObject) => {
17
spectral.setRuleset(ibmOpenapiRuleset);
18
const { errors, warnings } = await spectral.run(specs);
19
20
- if (warnings.length) {
+ if (warnings && warnings.length) {
21
ibmOpenapiValidatorWarnings(warnings);
22
}
23
24
- if (errors.length) {
+ if (errors && errors.length) {
25
ibmOpenapiValidatorErrors(errors);
26
27
};
0 commit comments