[openstreetmap/openstreetmap-website] Supporting multiple API versions (#2353)

Andy Allan notifications at github.com
Fri Aug 30 12:56:26 UTC 2019

> you still need some way of determining what version you -exactly- have in front of you

So let's take a feature like "notes" which was added in during the 0.6 era. I think your use-case is along the lines of "I'm an editor developer, and I want to know if notes are available on this endpoint, which might be osm.org or might be some other deployment that is running an older codebase that doesn't have notes yet, so that I can show/hide the relevant UI". If I've misunderstood let me know.

You're suggesting that we should therefore introduce the minor API version in responses. I suspect you don't need to know the minor version in every response (e.g. `/api/X/ways/1` -> `<osm version="7.9" ...`), but you need a response from the server to let you know what the server is capable of doing. So maybe just in the `/api/X/capabilities` call? And then you can show/hide notes functionality depending on whether X.Y is greater than the version number where notes were introduced.

But then, why bother with lists of features and their corresponding minor version numbers? That's a bit indirect, since we could just put the additional features into the `capabilities` response e.g. `<feature name="notes" />` to indicate that the endpoint now supports notes. Would that work?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190830/f48dbd83/attachment.html>

More information about the rails-dev mailing list