eclipsesource / eclipsesource/jsonforms

Remove AJV usage from combinator mappers

Open
#2,371 0 comments 0 reactions 1 assignee Claimed by @lucas-koehler View on GitHub
core effort/medium
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

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:
- If there is an type/kind/id (in this order) attribute: use to select initial entry. See if we can match this against a const in the schema. Otherwise try with first string and/or number property.
- id property should be configurable via a custom JSON Schema attribute (we already use a custom i18n attribute). The new attribute should start with x-jsf-. I.e. x-jsf-type-property
- allOf: Investigate whether calling mapStateToCombinatorRendererProps in mapStateToAllOfProps is necessary

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.