oas3-schema
rule - hidden errors
#1567
Unanswered
barrett-schonefeld
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note: I opened a bug report outlining this same information in #1568. I apologize for duplicating the information, but an issue is a better forum for this discussion. Feel free to delete this discussion in favor of #1568.
The
oas3-schema
rule seems to only show one error at a time. This means that repairing the given error may only reveal anotheroas3-schema
error. This pattern of correcting errors to reveal more errors makes the user resolve problems one-at-a-time, invoking Spectral each time until all errors are resolved.Below is an example document meant to illustrate discriminator errors (the document is not meant to describe a real, useful API). It provides two different examples of invalid discriminators. Yet, when I run Spectral against this document, I get only one error for the first schema with the discriminator field that is not an object. Then, if I remove or fix the first schema, the error for the missing
propertyName
field is revealed.First, please let me know if I have laid this out properly and if the behavior is reproducible.
If so, is there a particular reason or use case in mind on which this behavior is based?
Would it seem desirable in the Spectral team and in the Spectral community to show all schema errors?
Beta Was this translation helpful? Give feedback.
All reactions