-
-
Notifications
You must be signed in to change notification settings - Fork 69
Allow Multiple Spec Files #250
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
Comments
Hi @channyein87 the hook should run against all files that meet the name pattern If you're looking for option that you can specify your files , there is no atm. |
Hi @p1c2u Thanks for the reply. I got the below error when trying to use multiple spec files. Please refer the sample test workflow below. openapi-spec-validator...................................................Failed
- hook id: openapi-spec-validator
- exit code: 2
usage: openapi-spec-validator [-h] [--errors {best-match,all}]
[--schema {2.0,3.0.0,3.1.0,detect}]
filename
openapi-spec-validator: error: unrecognized arguments: src/openapi-specs/petstore-simple.openapi.yaml I put the spec files in https://github.com/channyein87/temp/tree/openapi-spec-validator/src/openapi-specs It looks like the openapi-spec-validator file1.yaml file2.yaml |
I see the issue now. |
Thanks! As this is very useful, can you release a version 0.6.1 with this fix? |
Is there a way to use
pre-commit hook
to run against multiple spec files? I have multiple spec files in the repo for deploying multiple API Gateways (e.g. api1.openapi.yaml, api2.openapi.yaml).The text was updated successfully, but these errors were encountered: