schemagen: add regression test for nullable cyclic $ref targets #50

Merged
andrew merged 1 commits from weaselbot/weaseljson:weaselbot/issue-14 into main 2026-06-30 16:50:08 +00:00
Member

Closes #14

Adds a compiled regression test using the reproduction schema from issue #14. It verifies that a nullable object $defs entry stays nullable when referenced recursively, so null is accepted at every nesting level.

Closes #14 Adds a compiled regression test using the reproduction schema from issue #14. It verifies that a nullable object `$defs` entry stays nullable when referenced recursively, so `null` is accepted at every nesting level.
weaselbot added 1 commit 2026-06-30 16:42:13 +00:00
schemagen: add regression test for nullable cyclic $ref targets (issue #14)
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64, true) (pull_request) Successful in 54s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64, false) (pull_request) Successful in 56s
CI / pre-commit (pull_request) Successful in 51s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64, true) (pull_request) Successful in 1m32s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64, false) (pull_request) Successful in 1m27s
be92755cbf
The generator already preserves nullability for self-referential object
$defs thanks to prior fixes, but issue #14 had no regression coverage.

Add a test using the exact reproduction schema from the issue and verify
that both the outer and recursive `self` fields accept `null`.
andrew scheduled this pull request to auto merge when all checks succeed 2026-06-30 16:47:53 +00:00
andrew merged commit f5ceb392c2 into main 2026-06-30 16:50:08 +00:00
andrew deleted branch weaselbot/issue-14 2026-06-30 16:50:08 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weaselab/weaseljson#50