Why the code below doesn't return with an error? #1967
Unanswered
Andras-Csanyi
asked this question in
General
Replies: 1 comment
-
I'm not sure why it would fail. // schema provided
schema: {
type: 'string',
}, it'll report that, but otherwise the document you have complies with the rule you have. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a validator cli where we provide a list of custom rules. We are at the point where we need to upgrade Spectral from 5.x to 6.x (latest). My task is to make all the necessary changes coming with this upgrade. The rule below doesn't work for reasons I couldn't figure out yet. It worked well in
yaml
format with 5.x. One of the changes we do is transforming our rulesets to javascript format and enjoy the flexibility coming with it.My assumptions why it doesn't work:
given
values provided as an array can be a problem, however, Spectral code shows that it is either astring
orstring[]
. As a conclusion, it should be fine this way.I run out of ideas and any help is appreciated at this point.
Beta Was this translation helpful? Give feedback.
All reactions