-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
test(oas): reduce the amount of boilerplate #1472
Conversation
1d772fa
to
a4e1c24
Compare
73d723b
to
72b8cf0
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.
Other than naming comment, seems good 👍
Btw is the reason for adding props like openapi: '3.0.2'
requried so that isOpenApiv2
/isOpenApiv3
can work?
import { isOpenApiv2, isOpenApiv3 } from '../../../../formats'; | ||
import * as ruleset from '../../index.json'; | ||
|
||
export async function loadRules(rules: (keyof typeof ruleset['rules'])[], opts?: IConstructorOpts): Promise<Spectral> { |
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.
Maybe call it createWithRules
(or something similar) since it doesn't just load the rules?
Yeah, |
Extracted from #1470
Related to #1082
Checklist
Does this PR introduce a breaking change?