addonscript-spec/docs/schema/relation.md

42 lines
1.4 KiB
Markdown
Raw Normal View History

2021-06-23 22:06:21 +02:00
# Relation Object
```json
{
2022-02-27 20:26:01 +01:00
"id": "othermod",
"namespace": "com.example",
2022-01-25 14:44:31 +01:00
"version": "[1.0]",
2021-11-13 20:47:21 +01:00
"repositories": ["repo1"],
2022-09-03 21:23:53 +02:00
"flags": {}
2021-06-23 22:06:21 +02:00
}
```
## Required properties
### id
2022-02-27 20:26:01 +01:00
This is the ID of the addon this relation refers to.
2021-06-23 22:06:21 +02:00
### version
This is an [AddonScript version range](../concepts/versioning.md#addonscript-version-ranges) that specifies, which versions
of the related addon are targeted by this relation.
2022-01-25 14:44:31 +01:00
## Optional properties
2022-02-27 20:26:01 +01:00
### namespace
This is the [namespace](../concepts/namespaces.md) of the related addon. This property will be implicitly equal to the
2022-08-31 16:11:10 +02:00
[namespace of the addon](manifest.md#namespace), if it was not set explicitly.
2022-02-27 20:26:01 +01:00
2021-11-13 20:47:21 +01:00
### repositories
This is an array of [repository](repository.md) IDs. These are the repositories, from which AddonScript will try to get this relation from,
2021-11-14 00:17:32 +01:00
in the order as they are specified in the array. If this property is not set or the array is empty, AddonScript will try to resolve the relation by
the namespace from all [defined repositories](manifest.md#repositories).
2021-11-13 20:47:21 +01:00
2021-06-23 22:06:21 +02:00
### flags
2022-09-03 21:23:53 +02:00
This is an [flags object](flags.md) which contains [relational flags](../concepts/flags.md#relational-flags) for both sides for this relation.
If a relation has no flag for a side, the relation will be ignored for that side. This behavior is different from the `incompatible` flag,
since the related addon can still be installed on that side without any conflict.