Skip to content

Add support for v2 enum choice lists #41

@doneill

Description

@doneill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions