Skip to content

fix(register): Decision schema union types → OR-supported nullable (Decision couldn't re-import)#347

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/decision-schema-union-types
Jul 18, 2026
Merged

fix(register): Decision schema union types → OR-supported nullable (Decision couldn't re-import)#347
rubenvdlinde merged 1 commit into
developmentfrom
fix/decision-schema-union-types

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Bug

The `Decision` schema has 7 properties (`sourceApp`, `subjectRegister`, `subjectSchema`, `subjectId`, `subjectLabel`, `outcomeCallbackUrl`, `externalReference`) declared with JSON-Schema union type `["string","null"]`. OpenRegister's schema validator rejects array types:

```
Failed to import schema: Invalid type '["string","null"]' at '/sourceApp'.
Must be one of: string, number, integer, boolean, array, object, null, file, geo, color, recurrence, NcFile, …
```

So the `Decision` schema fails every register (re)import — it is frozen in the DB at its 2026-06-26 state, and a fresh install cannot create it at all. Discovered live while applying the toezeggingen change: the decidesk register import silently dropped Decision on every run (Pass-1 import failure, caught-and-continued).

Fix

Convert each to the OR-supported nullable form already used elsewhere in this same register (`DecisionStage.outcome` / `.decidedAt` / `.note`):

```diff

  • "type": ["string", "null"],
  • "type": "string",
  • "nullable": true,
    ```

Verification

  • JSON valid; 0 union-typed properties remain.
  • Live-verified on 8080: after this fix, `Decision` no longer appears in the import's Pass-1 failures (the only remaining failures are unrelated other-app schemas: `brpPerson`, `mandaat`).
  • Scope: decidesk-only — 0 union-typed properties in openregister / doriath / hrmq / portaliq / docudesk / opencatalogi, so this is not a fleet-wide OR-validator regression.

🤖 Generated with Claude Code

7 Decision properties (sourceApp, subjectRegister, subjectSchema, subjectId,
subjectLabel, outcomeCallbackUrl, externalReference) used JSON-Schema union
type ["string","null"], which OpenRegister's schema validator rejects
('Invalid type … Must be one of: string, number, …'). The Decision schema
therefore FAILED every register (re)import — frozen in the DB at its
2026-06-26 state; fresh installs could not create it.

Converted to the OR-supported form already used by DecisionStage
(outcome/decidedAt/note): "type":"string","nullable":true. Verified live:
Decision no longer appears in Pass-1 import failures. decidesk-only issue
(0 union types in openregister/doriath/hrmq/portaliq/docudesk/opencatalogi).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants