Closed
Conversation
1572b8b to
b8ff16e
Compare
Avoid returning objects with circular references
Prepare core package for resolving refs in an asynchronous manner: - synchronous resolving functions have been removed, only a refactored resolveLocalSchema remains - `refParserOptions` props is made available to most renderer property sets - to avoid ending up with unresolvable refs (i.e. the scoped down schema is too narrow), we now require refs to be absolute. This has a couple of implications: first, the UI schema generation must produce absolute schema paths, second, `toDataPath` must be adapted as schema path now contain more keywords than before - as ref resolving is asynchronous, testers are as well. This changes the signature of a tester: they return Promises and additionally also expect a `refResolver` paramter for resolving any refs - enum props do not feature an `indexOfFittingSchema` prop anymore as it involved ref resolving
- Add ScopedRenderer component capable of resolving a JSON pointer given by an UI schema element. This is essentially the replacement mechanism for resolving refs lazily in-place - Adapt JSONForms and DispatchCell components - Add RefResolver component which is intended to be registered as a renderer. This deals with cases where the root schema only contains a `$ref`
Adapt Material UI renderers to new resolution mechanism. Note that array-based renderers utilize manual resolution via `ResolveRef`. This is necessary because when de-referencing the `items` property we can end up with a schema that's a `$ref` again which is not the case for regular controls.
Adapt array with detail example to feature absolute paths for detail view
* `ResolveRef` has been renaemd to `RefResolver` * `refResolver` prop of `RefResolver` has been renamed to `resolveRef` * `RefResolver` type has been renamed to `RefResolverFunction`
6a62ef9 to
383040e
Compare
Member
|
I'll close this PR as it's open for a long time. There is a copy of the contribution branch as part of the repository which could prove useful should we go into this direction at some point in the future. |
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.
Some thing we need to clarify from the top of my head:
ResolveRef(clear resolving design) + when to useScopedRendererrefResovlercallback)resolveLocalSchema