Skip to content
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

Allow spectral.setRuleset to take a yaml string or buffer #2368

Open
LMS007 opened this issue Dec 20, 2022 · 0 comments
Open

Allow spectral.setRuleset to take a yaml string or buffer #2368

LMS007 opened this issue Dec 20, 2022 · 0 comments
Labels
enhancement New feature or request triaged

Comments

@LMS007
Copy link

LMS007 commented Dec 20, 2022

It seems that setRuleset does not work with "extends" inside an object so its very limited with JSON objects which are not completely aggregated into a single object already.

Secondly, rulesets are generally written in YAML (I think just about every example is in YAML) and converting from YAML to JSON seems unnecessary and could be problematic.

It would be helpful is setRuleset could take an yaml file from memory rather than some fetcher for a file. In my case I don't have a file itself, I have a buffer of a file imported from an HTTP request. It seems like what I have to do it write this to a temporary file to then just read it in again, can't I just pass the data directly?

@P0lip P0lip added the enhancement New feature or request label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

3 participants