-
Notifications
You must be signed in to change notification settings - Fork 78
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
Feature: Add simple array validation rules #215
Comments
Is this not described properly? too wide? or could already be achieved somehow? |
Not completely sure, but when #239 is merged you can try with using I created the following rule to make sure an oauth2 security scheme is defined:
|
You might want to anchor that regex value, just in case. |
It's been merged, so you can pull and try with master, or use |
The next version of the name: oneof-a-b-or-c
object: security
schema:
type: array
items:
oneOf:
- required:
- A
- required:
- B
- required:
- C |
Great work Mike! All new rules will be going in via oas-kit, and once we merge #248 we'll have all their awesome rules. |
Detailed description
Most current rules don't seem to support a property (object) containing an array.
Context
Given the following:
I would like to check if the
security
property contains at least one ofA, B or C
I thought
or
might do it, but it turns out most of the rules don't quite support this array structure.The text was updated successfully, but these errors were encountered: