Closed helrond closed 4 years ago
I think I want to talk this one out a bit with you. As it stands, Dates, Notes, Children, and Ancestors are just Reference objects. As far as I'm aware, you can't conditionally require a property if a defined object appears in another object.
There are things called Property Dependencies in JSON Schema, but I'm not sure they'd get the job done for what we're looking for. https://json-schema.org/understanding-json-schema/reference/object.html?highlight=dependencies#property-dependencies
I think we could add a source field to the Reference object resource, but it currently has an array of External_IDs which already have a source. A better solution may be to repurpose that for dates and notes. Otherwise, it's built in for children and ancestors.
Because we are pulling from multiple data sources, certain properties might be coming from multiple sources. In order to correctly merge these objects, we'll need to identify the source from which these properties are derived. Currently, these fields are:
Agent
Collection
Object