You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
With a large JSON schema, or a schema that has many $ref tags, calling generateDefaultUISchema does not result in the creation of an all-inclusive UI schema because the uischema generator only generates “shallow” UI schemas. This means a UI schema would need to be created from scratch for every control, a potentially cumbersome and involved task.
Describe the solution you'd like
Two suggestions:
Revise generateDefaultUISchema to generate a complete UI schema instead of a shallow one.
Enable the ability to create a partial UI schema that would allow modification to specific control(s) without having to specify all JSON schema objects in the UI schema. In other words, display all objects by default (similar to not specifying a UI schema at all) but alter the specific ones called out in the UI schema. As it works now, if they aren't called out in the UI schema they aren't displayed.
Describe alternatives you've considered
I haven't found any alternatives other than to manually create a large UI schema from scratch. Even then it's unclear whether that would work due to the shallow process previously described.
Framework
Core
RendererSet
Material
Additional context
The main goal was to alter the display of a subset of controls in my UI which are referenced by $ref tags. Being able to alter a specific subset of controls without having to add all controls to a UI schema strikes me as a common use-case.
The text was updated successfully, but these errors were encountered:
Hi @DiskCrasher ,
thank you for your insights! It is on purpose that the default UI Schema generation only generates a shallow UI Schema: It is expected that complex renderers like object or array renderers are used for nested objects by default. Furthermore, $ref cycles could lead to infinitely nested UI Schemas.
Thus, we would like to keep the original behavior for the default generation.
However, you could build a complete generation by copying the code from packages/core/src/generators/uischema.ts and extending it.
If you implement this, we would consider adding it as a separate utility next to the default generation method :)
Is your feature request related to a problem? Please describe.
With a large JSON schema, or a schema that has many
$ref
tags, calling generateDefaultUISchema does not result in the creation of an all-inclusive UI schema because the uischema generator only generates “shallow” UI schemas. This means a UI schema would need to be created from scratch for every control, a potentially cumbersome and involved task.Describe the solution you'd like
Two suggestions:
generateDefaultUISchema
to generate a complete UI schema instead of a shallow one.Describe alternatives you've considered
I haven't found any alternatives other than to manually create a large UI schema from scratch. Even then it's unclear whether that would work due to the shallow process previously described.
Framework
Core
RendererSet
Material
Additional context
The main goal was to alter the display of a subset of controls in my UI which are referenced by
$ref
tags. Being able to alter a specific subset of controls without having to add all controls to a UI schema strikes me as a common use-case.The text was updated successfully, but these errors were encountered: