This repository was archived by the owner on Apr 20, 2021. It is now read-only.
Add new step validating by reciprocity JSON payload against schema#111
Closed
gmorel wants to merge 5 commits intoBehatch:behat-2.xfrom
Closed
Add new step validating by reciprocity JSON payload against schema#111gmorel wants to merge 5 commits intoBehatch:behat-2.xfrom
gmorel wants to merge 5 commits intoBehatch:behat-2.xfrom
Conversation
…hem when reset/restart session. They are on Behat\Mink\Driver\BrowserKitDriver and there is no way to get them.
the JSON should be invalid according to the schema "(?P<filename>[^"]*)" This should ease JSON schema relevancy validation
Author
|
ping @sanpii |
Member
|
Hello, I have somes problems with this PR:
|
Member
|
The PR #155 has added this feature. Can I close this PR? |
Author
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi
A new Step:
Basically we noticed sometimes our tests validating Json payload against JSON Schema were not relevant. This was because of a small error on our JSON schema. This should ease JSON schema relevancy validation/debug.
A concrete example
You have a JsonSchema validating a Json payload. This JsonSchema includes another JsonSchema and you get the feeling that the included JsonSchema is ignored. Hence your Json payload seems always valid.
By modifying the included JsonSchema by renaming one of the payload key. You would expect that that your included JsonSchema will raise an error when using this step:
If not you might have found a deeper issue.
Cheers