Skip to content

Bug: usage of oneOf causing problems #90

@jbrown-xentity

Description

@jbrown-xentity

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions