You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the json schema, repositories is not required in datacenters. But because repositories is an array, there are two ways for a json to say a datacenter doesn't have any repositories, either a missing repositories subelement, or have repositories be a subelement but be of length zero.
It is much easier to write client software if there is only one way. Since the array must be allowed to be of zero length, making repositories required would be helpful.
It may seem a small thing, but to have to check for both the existence of repositories and for repositories to exist but be length zero is cumbersome and often overlooked as a source of bugs. This would also makes it work the same way as a top level query that doesn't return any datacenters, which results in {"version": 1.0, "datacenters": []}
Similar for services within repositories, the array should be required, but can be of zero length.
Datasets withing repositories is a trickier matter as there is a query parameter to not include them, so could probably remain optional, although a zero length array could also be used.
The text was updated successfully, but these errors were encountered:
In the json schema, repositories is not required in datacenters. But because repositories is an array, there are two ways for a json to say a datacenter doesn't have any repositories, either a missing repositories subelement, or have repositories be a subelement but be of length zero.
It is much easier to write client software if there is only one way. Since the array must be allowed to be of zero length, making repositories required would be helpful.
It may seem a small thing, but to have to check for both the existence of repositories and for repositories to exist but be length zero is cumbersome and often overlooked as a source of bugs. This would also makes it work the same way as a top level query that doesn't return any datacenters, which results in
{"version": 1.0, "datacenters": []}
Similar for services within repositories, the array should be required, but can be of zero length.
Datasets withing repositories is a trickier matter as there is a query parameter to not include them, so could probably remain optional, although a zero length array could also be used.
The text was updated successfully, but these errors were encountered: