Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant