Empty `errors` with `{rejectOnErrors: false}` when error in extensions
psixdev opened this issue · comments
I use raml-js-parser-2@1.1.48
to parse the raml api with the base file and two extensions with {rejectOnErrors: false}
.
I expect to get a list of errors and warnings in the array api.errors()
(or api.errors). However, I can get errors only if they occur in the base file or in the last extension (not always, depending on the loading function).
Here are some examples: https://github.com/PsiXdev/raml-js-parser-2-validation-error-examples
It looks like a bug.
Hi @psixdev !
Actually, the [loadSync|https://github.com/raml-org/raml-js-parser-2/blob/master/src/index.ts#L33] is not capable of accepting an array of overlays/extensions paths.
As for loadApiSync and loadRAMLSync, you have revealed a bug. Thank you! The fix will appear in the next release.
Regards,
Konstantin Sviridov
fixed by a828fd0