New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): improve ruleset validation #2026
Conversation
8069c55
to
088d42b
Compare
704bc83
to
c0d5c70
Compare
c0d5c70
to
2358b85
Compare
2358b85
to
1020bfc
Compare
Let's review #2062 first. It's a subset of the following PR. |
@P0lip : Does this issue require Spectral doc updates and if so, would you like help? |
Thanks @pamgoodrich, I think we're good. This mostly improves the existing functionality, so I expect no docs changes to be required, but I'll make sure to let you know in case something changes. |
1020bfc
to
39708e9
Compare
39708e9
to
e9fcea5
Compare
e9fcea5
to
f53ee36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We know im not the best at the sort of super advanced TypeScript here, but I believe the tests speak for themselves, and I can trust @P0lip with the rest.
# [@stoplight/spectral-cli-v6.5.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-cli-v6.4.2...@stoplight/spectral-cli-v6.5.0) (2022-08-03) ### Features * **core:** improve validation ([#2026](#2026)) ([8315162](8315162))
🎉 This PR is included in version @stoplight/spectral-cli-v6.5.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
# [@stoplight/spectral-core-v1.13.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-core-v1.12.4...@stoplight/spectral-core-v1.13.0) (2022-08-03) ### Features * **core:** improve validation ([#2026](#2026)) ([8315162](8315162))
🎉 This PR is included in version @stoplight/spectral-core-v1.13.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
# [@stoplight/spectral-functions-v1.7.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-functions-v1.6.2...@stoplight/spectral-functions-v1.7.0) (2022-08-03) ### Features * **core:** improve validation ([#2026](#2026)) ([8315162](8315162))
🎉 This PR is included in version @stoplight/spectral-functions-v1.7.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
Fixes #2186
This will let us remove https://github.com/stoplightio/platform-internal/tree/f7fddbb1bfe6a760819a2568a7eed50732774af7/services/projects/src/utils/assertValidRuleset
A non-exhaustive list of changes:
Added JSON Schema definitions that are suitable for JSON/YAML rulesets - going to be useful internally, particularly in the case of the ruleset-migrator package. Due to that,assertValidRuleset
accepts a second parameter, namelyformat
.Moved JSON Schema definitions describing rulesets fromsrc/meta
tosrc/ruleset/meta
Setup package exports so it's easier to import the validatorFormatsSet
has been renamed toFormats
ImprovetoJSON
signatures -> 2358b85Moved some files undersrc/ruleset
around to unify the directory structureDo note that although some changes are marked as additions, they are not such - it's mostly me slicing certain chunks of code into separate files. In other words, a notable deletion of code is usually followed by an addition somewhere.
Checklist
Does this PR introduce a breaking change?