addonscript-spec/docs/schema/relation.md

46 lines
1.6 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"],
"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
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
[namespace of the addon](addon.md#namespace), if it was not set explicitly.
2021-06-23 22:06:21 +02:00
### version
2022-02-16 23:27:55 +01:00
This is a [maven version range](../concepts/versioning.md#dependancy-version-requirement-specification) that specifies, which versions
2022-01-25 14:44:31 +01:00
of the related addon are targeted by this relation. You can either set this property or `semver`, but exactly one of them has to be set.
2021-11-14 00:37:29 +01:00
2022-01-25 14:44:31 +01:00
### semver
2021-06-23 22:06:21 +02:00
2022-01-25 14:44:31 +01:00
This is a [semver version range](https://github.com/semver/semver/pull/584) of supported versions of this relation.
It will only allow versions of the related addon, which have a valid semver version number, which is in this range.
2021-06-23 22:06:21 +02:00
2021-11-13 20:47:21 +01:00
### repositories
2021-11-14 00:17:32 +01:00
This is an array of [repository](repository.md) IDs. These are the repositories, from which AddonScript should try to get this relation from,
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
2021-11-13 20:47:21 +01:00
the namespace from all defined repositories.
2021-06-23 22:06:21 +02:00
### flags
2022-06-08 19:44:19 +02:00
This is an array of [flags](../concepts/flags.md) for this relation. If this property is not present in a relation object, the relation will
inherit the [side flags](../concepts/flags.md#side-flags) from the [version](addon.md) and have the `required` flag set by default.