Skip to content

dictionary-request form cannot capture the required field for half the objectTypes #114

Description

@stiebitzhofer

The dictionary-request form offers eight objectTypes but can only capture a complete request for four of them. Pick one of the other four and the requester cannot supply the field the schema will reject the entry for.

schema/dictionary-entry.schema.json conditionally requires a field per kind (the allOf block, lines 50–68):

objectType schema requires form asks?
SingleValuedDataElement valueDataType yes
MultiLanguageDataElement valueDataType yes
RelatedResource valueDataType yes
DataElementCollection elements yes — "Collection members"
MultiValuedDataElement itemType no
MeasurementUnit symbol no
MeasurementUnit crossReferences.ucumCode no
Quantity dimension no
Value value no (partly covered for enumeration members, which the "Enumeration values" textarea expands into Value entries — but not for a standalone request)

The form's own header promises it "mirrors the entry envelope so triage can generate the draft YAML mechanically". For half the kinds it cannot: triage has to go back to the requester or invent the value. ucumCode is the sharpest case — check 2 validates its syntax, so a wrong guess fails the publish PR rather than degrading quietly.

Found while confirming that legalBasis had reached the form (it had, in the #78 commit). These fields did not.

Fix

Add the five missing inputs, grouped under a markdown note making clear that only the row matching the chosen objectType applies:

  • itemTypeMultiValuedDataElement
  • symbolMeasurementUnit (a language map in the envelope; the form takes the English symbol, drafting expands it)
  • ucumCodeMeasurementUnit
  • dimensionQuantity
  • valueValue

All stay required: false, because GitHub issue forms cannot express "required when this dropdown says X". The descriptions carry the condition instead.

Not adding uneceCommonCode, qudtUnit or conversions: real unit entries carry them, but they are registry lookups a maintainer does better than a requester, and none is schema-enforced. Drafting fills them.

Ratchet

This is the second time a schema change has left the form behind, so encode it rather than remember it: a test that walks the schema's allOf conditionals, collects every conditionally-required property, and asserts each has a corresponding input in dictionary-request.yml. Adding a kind-specific requirement to the schema then fails the suite until the form can ask for it.

Activity

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

    size:SSmall — hourstype:bugWrong behavior of validator, build, Worker, or site

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions