Closed rartino closed 5 years ago
We could in principle extend the current specification to provide lists for versions that have more than one URL:
"available_api_versions": {
"0.9.5": ["http://db.example.com/optimade/v0.9/, http://db.example.com/optimade/v0.9.5/"],
"0.9.2": "http://db.example.com/optimade/v0.9.2/",
"1.0.2": "http://db.example.com/optimade/v1.0/"
},
Allowing lists with multiple URLs would make both @rartino's 1) and 3) examples also valid (and would be backwards-compatible).
Oh, right, this one we probably want to get right for v0.10 as well.
I noticed just now that the present definition of available_api_versions
uses data values as keys. I think this technically isn't violating the (latest) letter of the standard, but its spirit.
Since we are making a bunch of backwards incompatible changes now anyway, is anyone opposed to going for:
"available_api_versions": [
{
version="0.9.5",
url="http://db.example.com/optimade/v0.9/"
},
{
version="0.9.5",
url="http://db.example.com/optimade/v0.9.5/"
},
{
version="0.9.2",
url="http://db.example.com/optimade/v0.9.2/"
},
{
version="1.0.2",
url="http://db.example.com/optimade/v1.0/"
},
],
It is a tiny bit more work to parse on the client side, but correspondingly easier to compose on the server side.
I'm fine with the latest proposal.
blocking-release moved to the correspoding PR.
I'm running in some trouble with the
available_api_versions
property in the info endpoint. The example specify it like this:This makes it impossible to serve the same API version on two different URLs. But, that seems a very natural thing to want to do. E.g., if one's implementation supports up to v0.9.5, then to let both
http://db.example.com/optimade/v0.9/
andhttp://db.example.com/optimade/v0.9.5/
both serve0.9.5
seems the right thing to do.So, would it not make more sense if we defined the dictionary the other way around?, i.e.,
Or, if we want the dictionary in this order, perhaps we can let the URL be a list?,