-
Notifications
You must be signed in to change notification settings - Fork 22
Metadata overrides
Metadata enables dynamic querying of data sources provided by Conseil and allows for chain-agnostic UIs, like Arronax, to be built while still providing a high level of specialization. Some of the metadata override keys are helpful for query construction, but a large number of them exist for rendering.
In addition to the metadata derived from the schema, it's possible to extend and override it. This information is stored in configuration files inside conseil-api/src/main/resources/metadata/
which are referenced from conseil-api/src/main/resources/metadata.conf
that is itself included from conseil-api/src/main/resources/application.conf
. Metadata hierarchy is platform/network/entity/attribute, different options are available at each level.
Note the naming convention in this file. Hyphenated keys become camel-cased when presented via the metadata service in JSON format. For example display-name
in the config file appears as displayName
in the JSON response.
These overrides are available at all levels.
-
description
: Item description. -
display-name
: Item name. -
visible
: Item visibility, default isfalse
. This means when a new entity is added to the Conseil database, it must be explicitly enabled.
-
display-name-plural
: Arronax uses this to render entity tab titles here it will show "Blocks" instead of "Block".
-
currency-symbol
: Associated with Currency type fields, contains currency symbol or code, for example, 'XTZ', or 'ꜩ' -
currency-symbol-code
: Same ascurrency-symbol
, but stores the Unicode code point of the currency symbol, for 'ꜩ' it would be42793
-
data-format
: Presently used to customize date format. String contents of this item have no impact on how the data is sent or queried, it would be up to the implementing UI to interpret this content. -
display-order
: Hints to a UI as to the order in which the fields should appear by default. Lower ordered items would be presented first. -
display-priority
: Hints to the UI the relative priority of the data, allowing lower priority information that could be removed due to space constraints while keeping more relevant things in view. In contrast to order, lower priority items would be dropped off the view first. -
data-type
: One of: DateTime, String, Int, Decimal, Boolean, Hash, AccountAddress, Currency. -
placeholder
: Intended to be used for sample values that might appear as placeholder text in search boxes. -
reference
: Associates the field with an attribute of another entity. This is effectively a foreign key reference. -
scale
: Used with Decimal and Currency types to scale the value for display. This number is anint
power of 10.