Schema editor
  • 27 Jun 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Schema editor

  • Dark
    Light
  • PDF

Data Resource

Schema editor is a dedicated environment for defining the Resource Schema of a Data resource. You can add, edit and delete fields your data resource can accept and pre-set the allowed types to specify the expected values. You will find yourself using the schema editor while configuring On-Device storage, creating a Firebase/Firestore connection, or creating Data Components.

On-Device Example

Via the "ADD NEW" button you can add new entries. Upon clicking, you should be presented with a pop-up screen displaying field types to choose from.

There are six field types:

  1. Text - A text string
  2. Number - Integer or a number with a floating point
  3. True/False - Boolean
  4. List - A list of objects
  5. Object - A single object with an undefined quality
  6. Any value - Removes a strict type definition; Field can take any value

Property types

You can delete a field via clicking the "Delete" button at the bottom of its properties.

Deleting

You can show an example for each property via the "Show Examples" button on the top right corner. It is always useful to verify the corectness before using a Resource.

Examples

Data Component Schema

In Data Components, schema can be fixed, requiring a certain number of fields with fixed types, or arbitrary, specifying only accepted field types and a minimum/maximum number of fields. Therefore, the schema editor differentiates in its configuration method.

Fixed Schema Editor

Fixed schema

The Fixed schema adapter is configured the same way as the Data Resource one. Use the "Add New" button to add new entries and choose the appropriate type from the pop-up.

Arbitrary schema editor

The field configuration for an arbitrary adapter stays similar to the fixed one. It has fewer options, as an arbitrary adapter is meant to scale with the provided data. What stands out is a mandatory field for required number of fields. Here you can limit the amount of fields that an adapter can take by setting the 'Maxium' value.

Arbitrary schema


Was this article helpful?