-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental_customMergeAllOf #4308
base: main
Are you sure you want to change the base?
experimental_customMergeAllOf #4308
Conversation
When I think about it now, I would probably implement it as an object (that would be easier for future compatibility). I imagine something like this:
WDYT? |
@MarekBodinger I totally understand why you want to add this. We feel like exposing the |
Also linking this bug: #2927 which may be fixed by an alternative/improved merge implementation |
I tried to just plug in |
I don't think it is a good to replace The approach already in progress, which introduces an I've completed the work on this and appreciate the feedback received. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@MarekBodingerBA can you resolve the conflicts? Likely because we merged #4312 |
@nickgros Unfortunately, I don't have access to a computer for next three weeks. Is it something that you are able to do, or should we wait until I come back? |
Reasons for making this change
NOTE: This is just a draft PR; details are subject to discussion.
In many cases, json-schema-merge-allof is a performance bottleneck for this library:
getDefaultFormState
(not just the merging itself) performs 7x faster in our implementation:I have a couple of questions:
experimental_customMergeAllOf
. Maybe it's better to provide the function wrapped in an object rather than the function itself.schemaParser
(which is only used incompileSchemaValidatorsCode
) relies internally onretrieveSchemaInternal
. I chose not to add this option here; is it necessary to include it?The functional change is located here, other changes are just adding the argument where needed.
Checklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update
to update snapshots, if needed.