relations.json

What links between entities mean.

relations

A link from entities of one type to entities of another, such as brand from product to brand.

codestringRequired

The code of a relation definition, such as brand or compatible_with.

fromstringRequired

The code of an entity type, such as product, category or a merchant's own store.

tostringRequired

The code of an entity type, such as product, category or a merchant's own store.

labelstring or map of strings

A plain value, or a map from locale to value such as { "de": "Farbe", "en": "Color" }.

inputstring

How links arrive: inline on the entity, or as a stream of their own. Default: inline.

2 values

How links arrive: inline on the entity, or as a stream of their own. Default: inline.

How links arrive: inline on the entity, or as a stream of their own. Default: inline.

qualifiersarray of objects

Notes that belong to one link, such as "only with sport suspension". Shown and traced, never filtered silently.

A note a single link may carry.

2 fields
codestringRequired

The code of a relation definition, such as brand or compatible_with.

labelstring or map of strings

A plain value, or a map from locale to value such as { "de": "Farbe", "en": "Color" }.

A link to a target that does not exist creates it, as a feed's brand name creates its brand.

aliasesmap of strings

Spellings OrbSearch maps onto a target's id, such as "Robert Bosch GmbH": "bosch". They survive every feed.

Whether the target's title becomes searchable text of the source. Forty printer names may; a thousand vehicle names may not. Default: false.

$schema

The JSON Schema an editor checks this file against; kept as written.

Example

tests/fixtures/home/relations.json (trimmed)
{
  "$schema": "../../../contracts/schema/relations.json",
  "relations": [
    {
      "code": "brand",
      "from": "product",
      "to": "brand",
      "label": { "de": "Marke", "en": "Brand" },
      "create_missing": true,
      "search_target_title": true
    }
  ]
}

Guide: The release files

On this page