fix(register): Decision schema union types → OR-supported nullable (Decision couldn't re-import)#347
Merged
Conversation
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).
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
July 18, 2026 07:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
```
Verification
🤖 Generated with Claude Code