Catch Breaking Changes by Diffing API Traffic
akitasoftware.com
akitasoftware.com
edit:
We did it via a front-end proxy that would send the request to the original system, get the response and send it, then send the request to the test system along with the response from the first system and diffed them. Had a bunch of heuristics for various element types where you could expect differences between them (timestamps mostly).
I'm glad to see others taking this concept forward and doing great things with it.
We use gql + apollo codegen + typescript + CI tests and haven't had a breaking API change like this in three years
In our API for example we have an explicit set of (what we call) presentable attributes, an explicit mapping between our internal naming of properties to the external attributes that are presented publicly.
This allows us to maintain the external contract whilst the internal structure may change wildly. Furthermore, with a generally simple set of unit tests, we can catch scenarios that might be cause for failures before any such changes go to production.
Adding this extra layer of diffing feels like unnecessary complexity and if you end up using a proxy to catch responses, potentially even an extra source of data leakage and exploitation.
Shopify has this great blog post about their solution for change management in their external APIs that also makes the point that change impact analysis is not easy: https://engineering.shopify.com/blogs/engineering/shopify-ma...
Also, quick point: we don't proxy for precisely the reason you brought up. Akita works without sending any user data back to our servers, just the metadata.
what apis are do you support at the moment, http only or binary aswell?