addonscript-spec/docs/schema/addon.md

65 lines
1.7 KiB
Markdown
Raw Normal View History

2021-06-23 22:06:21 +02:00
# Addon Object
2021-11-14 00:37:29 +01:00
```json
2021-06-23 22:06:21 +02:00
{
2021-07-18 12:32:57 +02:00
"addonscript": {},
"id": "myaddon",
2021-11-13 20:47:21 +01:00
"namespace": "com.example",
2022-01-25 14:44:31 +01:00
"version": "1.0",
"semver": "1.0.0",
2021-11-13 20:47:21 +01:00
"files": [],
"relations": [],
"flags": ["server", "client"],
2021-07-18 12:32:57 +02:00
"repositories": [],
"meta": {}
2021-06-23 22:06:21 +02:00
}
```
## Required properties
### addonscript
This is an [AddonScript object](addonscript.md) containing information about the version of AddonScript used in this file.
### id
2021-11-14 00:17:32 +01:00
This is the ID of the addon.
It should be written in the `kebab-case` format, meaning lowercase only and using `-` instead of spaces.
2021-11-13 20:47:21 +01:00
### version
2022-01-25 14:44:31 +01:00
This is the version number of this version. Versions are compared by [Maven version order rules](../versioning.md#version-order-specification).
If this version number is valid semver, the `semver` property is implicitly equal to `version` if it was not explicitly set.
2021-06-23 22:06:21 +02:00
## Optional properties
2022-01-25 14:44:31 +01:00
### semver
This is the version number of this version in semver format. It must follow the [semver versioning specifications](https://semver.org/spec/v2.0.0.html).
2021-11-13 20:47:21 +01:00
### namespace
2021-06-23 22:06:21 +02:00
2021-11-14 00:17:32 +01:00
The namespace of the addon in a reverse-DNS format. Used to identify addons across repositories, if it is present.
2021-06-23 22:06:21 +02:00
2021-11-13 20:47:21 +01:00
### files
2021-06-23 22:06:21 +02:00
2021-11-14 00:17:32 +01:00
This is an array of [file objects](file.md) including the files belonging to this addon.
2021-06-23 22:06:21 +02:00
2021-11-13 20:47:21 +01:00
### relations
2021-11-14 00:17:32 +01:00
This is an array of [relation objects](relation.md) which represent addons in relation to this one.
2021-06-23 22:06:21 +02:00
### flags
2021-11-13 20:47:21 +01:00
This is an array of [flags](../flags.md) for this version.
2021-11-14 00:37:29 +01:00
2021-11-13 20:47:21 +01:00
### repositories
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
addons can be retrieved.
2021-06-23 22:06:21 +02:00
### meta
2021-11-14 00:17:32 +01:00
This is a [meta object](meta.md) containing metadata about the addon.