Skip to content

Use OAS ruleset from the root of the repo directory if it exists #5520

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

Merged
merged 3 commits into from
Dec 14, 2022

Conversation

gatzjames
Copy link
Contributor

@gatzjames gatzjames commented Dec 14, 2022

changelog(Improvements): Added support for custom Ruleset files in Insomnia Git Sync'ed Design Documents. If you place a .spectral.yaml file in root of your repository, Insomnia will now load the custom ruleset to lint the OAS spec that is in the Design Document

Highlights:

  • Adds spectral-ruleset-bundler to parse rulesets
  • Updates the spectralRun bridge api to accept a ruleset path and try to load and use the ruleset to lint OAS files
  • The codemirror helper is registered on the design view to be aware of the paths
  • Display errors of loading the ruleset file / Display the loaded ruleset file UX

Closes INS-2194

@gatzjames gatzjames requested a review from a team December 14, 2022 10:06
@gatzjames gatzjames self-assigned this Dec 14, 2022
@gatzjames gatzjames force-pushed the feat/oas-custom-rulesets branch from fcb691a to 8ee51a7 Compare December 14, 2022 10:56
@gatzjames gatzjames marked this pull request as ready for review December 14, 2022 10:56
@jackkav jackkav force-pushed the feat/oas-custom-rulesets branch from 8ee51a7 to 720ae72 Compare December 14, 2022 11:47
@jackkav jackkav enabled auto-merge (squash) December 14, 2022 11:48
@jackkav jackkav merged commit 5b683f0 into Kong:develop Dec 14, 2022
pavkout pushed a commit to pavkout/insomnia that referenced this pull request Jan 18, 2023
…g#5520)

* read file from git path

* Fix using the default oas ruleset when none is found in the repo

* display warning and info messages from oas lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants