-
Notifications
You must be signed in to change notification settings - Fork 16
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 request: validate request based on examples #95
Comments
not sure to understand , do you want to have API with no schema but just example and create a schema on the fly from the example (usually not super clean , cf enum and constrains , but enough for canvas ) |
So wiretap currently validates that a request (parameters, body, etc) match the schema in your OpenAPI document. But I would also like to turn on a mode where it ensures that the values sent exist in the For example for a schema like: schema:
type: object
properties:
test:
type: string
examples:
- "some example 1"
- "another example" and a body like: {
"test": "some value that doesn't match examples"
} wiretap would return a validation error. My use case is we are writing some tests around wiretap as a mock server and it would be good if it could help us validate that we serialized the data correctly and serialized it to an expected value |
would be great if wiretap could validate the request included values that matched the examples in the spec.
Some way to configure wiretap to turn on example validation and ensure that the request contained one of the examples
The text was updated successfully, but these errors were encountered: