Skip to content

Schemas for the file inputs that have none #388

Description

@DutchJaFO

Background

Three inputs are read with no schema defining them at all: the CSV a converter consumes, the
i18ntext/UI.*.json string tables, and the bulk-decide import file.
ADR 021's
rule 4 makes the absence of a schema the work rather than an exemption — including for CSV, which has
no official schema language and therefore needs a contract this project defines.

Depends on #384's sub-issue 1, which supplies the entry point these validate through. Independent of
sub-issue 3.

What needs to be done

  1. A defined contract for the CSV converter's input — column set, which columns are required, and how
    a violation is expressed — plus its validator, since no official one exists to borrow.
  2. A JSON schema for i18ntext/UI.*.json.
  3. A JSON schema for the bulk-decide import file.
  4. All three bound to their readers and validated through the entry point.

Expected tests

Test class / document Test method / what it verifies Starts
FileValidationTests CsvViolatingItsContract_IsRejectedWhole ❌
FileValidationTests CsvConformingToItsContract_IsAccepted ❌ (the control)
FileValidationTests UiStringTableViolatingItsSchema_IsRejected ❌
FileValidationTests BulkDecideFileViolatingItsSchema_IsRejected ❌

Definition of done

  • All expected tests listed above start red before implementation
  • All requirements implemented
  • All expected tests pass (green)
  • No regression in related tests
  • Findings summarised in a closing comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions