-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Name: James Brown
Affiliation: GSA/data.gov
Type of issue: Schema systemic issue with oneOf
Issue: Currently the default when describing possible options for a field utilizes oneOf. This is limiting, in that it can only match a single implementation of the options (not matching multiple). This becomes an issue when there is overlap. For example, accrualPeriodicity can be multiple different standards (ISO, DCAT, etc), and there is overlap for terms like quarterly. Also for date validation (which is in dozens of places), a valid year implementation like 2025 will fail because it matches multiple possible formats. See example here.
Recommended change(s):
Given there isn't currently any planned implementation where something matching multiple passing valid items should fail, we should turn all oneOf into anyOf implementations. Also should take the opportunity to "flatten" where possible.