-
Notifications
You must be signed in to change notification settings - Fork 380
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
Remove AJV usage from combinator mappers #2371
Comments
lucas-koehler
added a commit
that referenced
this issue
Jan 31, 2025
In contrast to oneOf and anyOf rendererer, allOf renderers do not need the `indexOfFittingSchema` because all schemas apply at once. Thus, remove using mapStateToCombinatorRendererProps from mapStateToAllOfProps and, with this, the unnecessary calculation of the index. Part of #2371
lucas-koehler
added a commit
that referenced
this issue
Jan 31, 2025
- Adapt algorithm to determine the fitting schema index for combinators to no longer use AJV - New heuristic uses identifying properties that should match a const value in the schema - Adapt MaterialOneOfRenderer.test.tsx to fit new heuristic - Describe changes and add examples to migration guide - Adapt some of the anyOf and oneOf examples to custom and new identification properties #2371
lucas-koehler
added a commit
that referenced
this issue
Jan 31, 2025
In contrast to oneOf and anyOf rendererer, allOf renderers do not need the `indexOfFittingSchema` because all schemas apply at once. Thus, remove using mapStateToCombinatorRendererProps from mapStateToAllOfProps and, with this, the unnecessary calculation of the index. Part of #2371
lucas-koehler
added a commit
that referenced
this issue
Jan 31, 2025
- Adapt algorithm to determine the fitting schema index for combinators to no longer use AJV - New heuristic uses identifying properties that should match a const value in the schema - Adapt MaterialOneOfRenderer.test.tsx to fit new heuristic - Describe changes and add examples to migration guide - Adapt some of the anyOf and oneOf examples to custom and new identification properties #2371
lucas-koehler
added a commit
that referenced
this issue
Jan 31, 2025
In contrast to oneOf and anyOf rendererer, allOf renderers do not need the `indexOfFittingSchema` because all schemas apply at once. Thus, remove using mapStateToCombinatorRendererProps from mapStateToAllOfProps and, with this, the unnecessary calculation of the index. Part of #2371
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Direct AJV usage in renderers (i.e. oneof renderer to determine applicable sub schema) should be removed completely as this is a hacky attempt to select the suitable subschema.
In general, we want to get rid of mandatory ajv usage in general.
For combinator renderers, AJV is invoked in
mapStateToCombinatorRendererProps
. This should be re-written to use a heuristic instead:The text was updated successfully, but these errors were encountered: