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

In httpRequest, validate response data based on only fields #173

Open
hawkeyexl opened this issue Jul 2, 2024 · 0 comments
Open

In httpRequest, validate response data based on only fields #173

hawkeyexl opened this issue Jul 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hawkeyexl
Copy link
Contributor

Today, Doc Detective can validate an HTTP reponse body by checking for fields and values, but that isn't helpful when the values aren't known.

To support the use case of matching only the fields/structure of the response but not the field values, Doc Detective should provide a solution. Options:

  • Add a wildcard keyword to match any value in the current responseData option. This would technically satisfy the need but may not be intuitive. Can't simply use an empty string because that could be a valid, non-greedy JSON value, as could any wildcard strings.
  • Support validating the response body with a JSON schema, either from an OpenAPI spec or specified independently. This would be scalable using Ajv and would pave the way for future OpenAPI spec support.
@hawkeyexl hawkeyexl added the enhancement New feature or request label Jul 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

1 participant