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

Missing required property is not present in the diff #20

Open
artem-zakharchenko opened this issue Jul 29, 2019 · 1 comment
Open

Missing required property is not present in the diff #20

artem-zakharchenko opened this issue Jul 29, 2019 · 1 comment

Comments

@artem-zakharchenko
Copy link
Contributor

What

Consider I have the next specification toward my response body:

{
  "username": "admin",
  "notExistingProp": true
}

When the actual response body is:

{
  "username": "admin",
  "extraPropA": "...",
  "extraPropB": "..."
}

I see both extraPropA and extraPropB as new added properties, but I don't see the notExistingProp as red missing property.

Why

Perhaps a logic flaw during the analyzis if a property is missing:

if errorPointer? # filter out non json related errors
if @areArraysIdentical pathArrayTransformed, jsonPointer.parse(errorPointer)
# key is missing in real and is present in expected, so it's missing
if errorPointer not in @dataRealPointers[compiledPointersKey]
if message
message = ' | ' + message
message = error['message'] + message
state = -1

@artem-zakharchenko
Copy link
Contributor Author

Still actual and is the reason for this behavior present in the core app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant