ocilo / skype-http

Unofficial Skype API for Node.js via HTTP
https://ocilo.github.io/skype-http
MIT License
51 stars 24 forks source link

Better support for unexpected responses #80

Open demurgos opened 6 years ago

demurgos commented 6 years ago

To provide guarantees about the interfaces of the objects returned by the API, we use a models for the responses and check the types at runtime (as of v0.0.14). We would like this model to be relatively strict to detect API changes as quickly as possible and provide a faithful documentation of the data. This strict model combined with thrown errors on failure makes it currently hard to use the library in the face of unexpected responses due to changes. A quick fix was merged to ignore extra keys.

To improve the situation, here is the approach I'd like to follow:

This kind of support will be rolled out over multiple versions but I wanted to write down the general direction for this part of the lib.