This document discusses principles of backwards and forwards compatibility for APIs and web services. It advocates for ignoring unknown data fields rather than validating strictly against schemas. APIs should allow unknown data to be forwarded and gracefully handled rather than causing failures. Standards evolve over time, so strict validation of schemas can break compatibility whereas ignoring extra unknown data preserves it.
11. > GET /rainbow-dash
> Host: api.equestria.magic
> Accept: application/vnd.equestria.ponies.v1+xml
< 200 OK
< Content-Type: application/vnd.equestria.ponies.v1+xml
< ..
12. “We encourage resource owners
to only use true content negotiation
(without redirects) when the
only difference between formats is
mechanical in nature.”
Roy Fielding
13. A conversation I could have had
“User: I need the gravatar of /user/
rainbow-dash
- Me: it’s only in the v2 format
- User: But there’s no @accept on <img>!
- Me: No kidding.”
15. “In the world of Web services, there is a
strong argument that contracts should be
stored and transmitted in a machine-
readable format.”
A guy called Don