Skip to content

fix: preserve $ref in resolved schemas for recursive ui:definitions#4967

Merged
heath-freenome merged 2 commits intorjsf-team:mainfrom
adamrimon:fix/lazy-ref-resolution
Feb 27, 2026
Merged

fix: preserve $ref in resolved schemas for recursive ui:definitions#4967
heath-freenome merged 2 commits intorjsf-team:mainfrom
adamrimon:fix/lazy-ref-resolution

Conversation

@adamrimon
Copy link
Contributor

@adamrimon adamrimon commented Feb 22, 2026

Reasons for making this change

Fixes #4966. In #4947 I accidentally missed committing a simple change in resolveAllReferences that preserves $ref as __rjsf_ref on resolved schemas. Without it, resolveUiSchema can't look up ui:definitions beyond the first recursion level.

Along with the fix, I added unit tests in resolveUiSchema.test.ts and integration tests in uiSchema.test.tsx covering ui:definitions with recursive schemas including a 5-level recursive depth test.

Checklist

  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated the changelog with a description of the PR

@adamrimon adamrimon force-pushed the fix/lazy-ref-resolution branch from 5c3a875 to 5e779d0 Compare February 22, 2026 14:52
@adamrimon adamrimon force-pushed the fix/lazy-ref-resolution branch from 5e779d0 to f538741 Compare February 22, 2026 14:55
@adamrimon adamrimon marked this pull request as draft February 22, 2026 14:57
@adamrimon adamrimon force-pushed the fix/lazy-ref-resolution branch from 822e58b to 5f749e9 Compare February 22, 2026 15:41
@adamrimon adamrimon marked this pull request as ready for review February 22, 2026 15:41
@adamrimon adamrimon force-pushed the fix/lazy-ref-resolution branch 3 times, most recently from 0493d5c to 243bca6 Compare February 23, 2026 12:09
Copy link
Member

@heath-freenome heath-freenome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamrimon Thanks for the hard work on this

@heath-freenome heath-freenome merged commit 1f7541d into rjsf-team:main Feb 27, 2026
10 checks passed
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.

ui:definitions not applied beyond first recursion level

2 participants