Add support for EarthRanger server v2 jsonform schema transformations that replace oneOf arrays where each item is in the form of
{ "const": ..., "title": ... }
with a semantically equivalent enum array. The original oneOf schema is retained separately, as the title values on each const entry are required to render the form field options correctly.
Example:
"oneOf": [
{ "const": "uuid-1", "title": "Source 1" },
{ "const": "uuid-2", "title": "Source 2" }.
...
]
Is transformed into:
"enum": ["uuid-1", "uuid-2", ...]
Action:
- Accept
enum & x-enumExtra as a valid CHOICE_LIST structure
- Handle no options with empty enums
Expectation:
validateV2Schema accepts and handles enum as choice list for display in React Native app implementation
Add support for EarthRanger server v2 jsonform schema transformations that replace
oneOfarrays where each item is in the form of{ "const": ..., "title": ... }with a semantically equivalent enum array. The original
oneOfschema is retained separately, as thetitlevalues on eachconstentry are required to render the form field options correctly.Example:
Is transformed into:
Action:
enum&x-enumExtraas a validCHOICE_LISTstructureExpectation:
validateV2Schemaaccepts and handlesenumas choice list for display in React Native app implementation