daveshanley / vacuum

vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports.
https://quobix.com/vacuum
MIT License
580 stars 48 forks source link

"oas3-valid-schema-example" should be split #403

Closed LasneF closed 9 months ago

LasneF commented 9 months ago

warning | Example for id is not valid: expected string, but got number vs Schema for id does not contain any examples or example data

those are 2 differents beast , in one hand i ame doing something wrong, in the other i am lazy , and there is nothing wrong about beeing lazy

invalid example should leads to an error , vs not provding exemple can be a warning . It deserves to have oas3-invalid-example vs oas3-missing-exemple and may be more

Notice that an explicit mentionned of this refactoring requirement is available in the documentaiton https://quobix.com/vacuum/rules/examples/oas3-valid-schema-example/

daveshanley commented 9 months ago

In v0.7 Two new rules were added that creates clean lines between all three rules.

oas3-missing-example oas3-example-external-check oas3-valid-schema-example

All of the logic has also been completely re-written in v0.7.0 for these rules, and they are now much faster and don't time out, the logic is clean.

Here they are documented:

https://quobix.com/vacuum/rules/examples/