Skip to content
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

Improvement request: Support literal values in Criterion object when type: simple and context provided #246

Open
TristanSpeakEasy opened this issue Aug 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@TristanSpeakEasy
Copy link

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

@frankkilcommins frankkilcommins added the enhancement New feature or request label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants