-
Notifications
You must be signed in to change notification settings - Fork 38
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
Spectral ruleset to validate pattern files #95
Comments
I've run into a wall with this. Spectral aggressively follows $ref files, treating them as actual objects in the document, rather than as an indication the schema for section of the document. This means that if you run into a $ref it just immediately resolves the reference from the meta schema and tries to validate that - which is obviously not what we want to do. I can't seem to disable this - see stoplightio/spectral#2195 Not quite sure how to proceed; one option would be to trim $ref links from the document before validation, which we'd need to do in the CLI. @lbulanti-ms what do you think about this? |
@willosborne and I have been looking into this and we think that removing the $refs at validation time is a good work around. We managed to achieve that with a script, we are planning to use the same approach in the cli. This means that we won't be able to validate the patterns directly from spectral but we will need to use the calm cli. |
Issue #95 - Strip from patterns when validating with spectral
This is done. We solved this problem by stripping $refs when validating patterns in the CLI, and including a script to do the same for CI tools. |
Feature Request
Add a new ruleset to validate pattern files, with the same functionality as the existing one (which only supports instantiations).
Description of problem
Currently we have no spectral rulesets to validate pattern files
Potential solutions
Make new ruleset to validate patterns with same checks as existing ruleset.
The text was updated successfully, but these errors were encountered: