Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

invalid examples should not fail validation #68

Open
scags9876 opened this issue Sep 29, 2021 · 0 comments
Open

invalid examples should not fail validation #68

scags9876 opened this issue Sep 29, 2021 · 0 comments

Comments

@scags9876
Copy link

We use our openapi 3.0.1 specs to automatically generate mocks and run contract tests. These contract tests include testing that the implementing server correctly validates requests and returns expected 400 Bad Request responses. This means we have examples in our docs of invalid requests. We cannot use swagger-cli validate, but would like to, because the validation fails on examples that don't adhere to the schema.

Ideal behavior would be to either be able to mark an example somehow to ignore validation for it, or pass an argument or configuration into swagger-cli validate to bypass validation of certain examples.

I will attempt to create a minimal schema to illustrate the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant