apiaryio / gavel2html

Renders HTML diff from Gavel.js output
MIT License
0 stars 0 forks source link

Missing required property is not present in the diff #20

Open artem-zakharchenko opened 5 years ago

artem-zakharchenko commented 5 years ago

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:

https://github.com/apiaryio/gavel2html/blob/99897d716d44c85997399f6bb4ef8c9450cfbf26/src/converter.coffee#L137-L144

artem-zakharchenko commented 5 years ago

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