Arazzo-Specification
Arazzo-Specification copied to clipboard
Improvement request: Support literal values in Criterion object when `type: simple` and context provided
I had this question in the official open-api
slack community here: https://open-api.slack.com/archives/C022K8VD7AP/p1724764208525069
For a simple "Criterion" condition can the condition just be a "literal" that matches the provided context
for example the context of $response.body matches a json object literal?
- context: $response.body
condition: {"some": "json object"}
type: simple
would:
- condition: '$response.body == {"some": "json object"}'
also work?
Basically after some discussion it was determined the first form is not compatible with the spec and json schema as it is today.
But I would like to request that either a value
field or the condition
field is made capable of providing a literal to match against the provided context when simple
is provided.
Similar to how you can provide an "example value" in an OpenAPI document for Media Type Object that represents the request or response body.
This would ease the job of certain tooling to generate Arazzo documents but also consume simple criterion that is just trying to assert a response body for example matches something