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

JSON comparison system - Add new param to allow custom validation start point in JSON hierarchy #120

Open
2 tasks done
timkimadobe opened this issue Oct 13, 2023 · 0 comments
Labels
feature-request Requesting a new product feature. Used by issue templates triage-required Triage required on a new issue logged for this project. Used by issue templates

Comments

@timkimadobe
Copy link
Contributor

timkimadobe commented Oct 13, 2023

Prerequisites

  • This is not a Security Disclosure, otherwise please follow the guidelines in Security Policy.
  • I have searched in this repository's issues to see if it has already been reported.

Feature request summary

Enabling the ability to specify a custom starting point in the actual side JSON hierarchy will allow test writers to make the testing intent more clear:

  1. The actual JSON does not have to be manipulated
  2. The expected JSON does not need wrapper containers to match the hierarchy of actual

This supports the use case of test case validation that is only interested in a specific child node in the JSON hierarchy onwards. With the change, the user no longer has to maintain the JSON hierarchy outside of what they actually want to validate

Current behavior

For example, in the current system given
actual

{
  "level1": {
    "level2": {
      "level3": 3
    }
  },
  "key1": 1,
  "key2": 2
}

your expected would have to be:

{
  "level1": {
    "level2": {
      "level3": 3
    }
  }
}

Expected behavior

With this new proposal, it could be:
actualStartPath: "level1.level2" +

{
  "level3": 3
}

Additional implementation details or code snippets

No response

@timkimadobe timkimadobe added feature-request Requesting a new product feature. Used by issue templates triage-required Triage required on a new issue logged for this project. Used by issue templates labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Requesting a new product feature. Used by issue templates triage-required Triage required on a new issue logged for this project. Used by issue templates
Projects
None yet
Development

No branches or pull requests

1 participant