Skip to content

repositories required in datacenters #5

Description

@crotwell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions