env builder API now parts of repositories
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
27ad758268
commit
afd8a4b37b
4 changed files with 21 additions and 14 deletions
|
@ -10,7 +10,8 @@ This endpoint can be used to build the launch environment for an [instance addon
|
||||||
|
|
||||||
If an [instance addon](../../concepts/instance.md), which has to provide a launch configuration, has the
|
If an [instance addon](../../concepts/instance.md), which has to provide a launch configuration, has the
|
||||||
`env` [manifest flag](../../concepts/flags.md#manifest-flags), AddonScript will send a request to this
|
`env` [manifest flag](../../concepts/flags.md#manifest-flags), AddonScript will send a request to this
|
||||||
endpoint if the API instance [specified in the manifest](../../schema/manifest.md#envapi) of that addon.
|
endpoint of an API instance, on which the [repository](../../schema/repository.md) of the
|
||||||
|
[namespace](../../schema/manifest.md#namespace) of this addon can be found.
|
||||||
This request contains information about the AddonScript [schema version](../../schema/api_env_request.md#addonscript),
|
This request contains information about the AddonScript [schema version](../../schema/api_env_request.md#addonscript),
|
||||||
which will be used in the request and about which [addon](../../schema/api_env_request.md#addon) this request is for.
|
which will be used in the request and about which [addon](../../schema/api_env_request.md#addon) this request is for.
|
||||||
Moreover it contains for both sides a list of addons, including their version, which will be part of the
|
Moreover it contains for both sides a list of addons, including their version, which will be part of the
|
||||||
|
@ -19,7 +20,7 @@ of this [addon](../../schema/api_env_request.md#addon) uses the `env` [relation
|
||||||
to tell AddonScript, which [related addons](../../schema/relation.md) MAY and which MUST be requested on this endpoint
|
to tell AddonScript, which [related addons](../../schema/relation.md) MAY and which MUST be requested on this endpoint
|
||||||
and which [versions](../../schema/relation.md#version) of them are valid. Which exact version of them and which optional
|
and which [versions](../../schema/relation.md#version) of them are valid. Which exact version of them and which optional
|
||||||
addons will be requested is either decided by the user, if the instance addon is installed manually, or by another
|
addons will be requested is either decided by the user, if the instance addon is installed manually, or by another
|
||||||
[instance addon](../../concepts/instance.md), which delegates the launch configuration to this addon. In latetr case,
|
[instance addon](../../concepts/instance.md), which delegates the launch configuration to this addon. In later case,
|
||||||
that [instance addon](../../concepts/instance.md) uses the `env` [relation flag](../../concepts/flags.md#relational-flags)
|
that [instance addon](../../concepts/instance.md) uses the `env` [relation flag](../../concepts/flags.md#relational-flags)
|
||||||
to specify an exact version for each addon, that will be requested. Each required `env` addon MUST be covered this way
|
to specify an exact version for each addon, that will be requested. Each required `env` addon MUST be covered this way
|
||||||
while only those optional `env` addons will be requested, which are covered this way. Lastly the request also contains
|
while only those optional `env` addons will be requested, which are covered this way. Lastly the request also contains
|
||||||
|
@ -46,6 +47,11 @@ The request body MUST be an [Environment Builder Request Object](../../schema/ap
|
||||||
- `200 OK`: The launch environment was successfully build.
|
- `200 OK`: The launch environment was successfully build.
|
||||||
The response body MUST be an [Environment Builder Response Object](../../schema/api_env_response.md).
|
The response body MUST be an [Environment Builder Response Object](../../schema/api_env_response.md).
|
||||||
- `400 Bad Request`: The server was not able to build the launch environment because of
|
- `400 Bad Request`: The server was not able to build the launch environment because of
|
||||||
invalid information sned by the client.
|
invalid information send by the client. The client SHOULD NOT try this request on
|
||||||
|
another API instance, since the request is invalid.
|
||||||
|
- `404 Not Found`: The launch environment can't be build for this addon, because no information
|
||||||
|
about it was found on this API instance. The client SHOULD try to use another API instance
|
||||||
|
to build the environment.
|
||||||
- `500 Internal Server Error`: The server was not able to build the launch environment
|
- `500 Internal Server Error`: The server was not able to build the launch environment
|
||||||
because of an internal error.
|
because of an internal error. The client MAY try to request the environment on another
|
||||||
|
API instance.
|
|
@ -19,7 +19,8 @@ addon manifest, including for which side it is available and for which side it i
|
||||||
- `instance` This flag specifies, that this is a manifest of an [instance addon](instance.md).
|
- `instance` This flag specifies, that this is a manifest of an [instance addon](instance.md).
|
||||||
- `env` This flag is only valid for [instance addons](instance.md). It specifies, that the
|
- `env` This flag is only valid for [instance addons](instance.md). It specifies, that the
|
||||||
[environment builder API](../api/features/env.md) will be used to get the launch files for this addon.
|
[environment builder API](../api/features/env.md) will be used to get the launch files for this addon.
|
||||||
An addon with this flag MUST have the [env_api](../schema/manifest.md#envapi) property.
|
An addon with this flag MUST have a [repository](../schema/repository.md) for it's
|
||||||
|
[canonical namespace](../schema/manifest.md#namespace).
|
||||||
|
|
||||||
## Relational flags
|
## Relational flags
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
"relations": [],
|
"relations": [],
|
||||||
"flags": {},
|
"flags": {},
|
||||||
"repositories": [],
|
"repositories": [],
|
||||||
"env_api": "https://example.com",
|
|
||||||
"meta": {}
|
"meta": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -53,13 +52,9 @@ This is an array of [relation objects](relation.md) which represent addons in re
|
||||||
|
|
||||||
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
|
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
|
||||||
addons can be retrieved. Each AddonScript manifest SHOULD have a repository for the [canonical namespace](#namespace) of
|
addons can be retrieved. Each AddonScript manifest SHOULD have a repository for the [canonical namespace](#namespace) of
|
||||||
that manifest, from which AddonScript implementations MAY check for updates for this addon.
|
that manifest, from which AddonScript implementations MAY check for updates for this addon. If this addon has the `env`
|
||||||
|
[manifest flag](../concepts/flags.md#manifest-flags), it MUST have such a repository to provide API instances, which can
|
||||||
### env_api
|
be used to request the [launch environment](../api/features/env.md#build-launch-environment).
|
||||||
|
|
||||||
This is the base URL of an [AddonScript API](../api) instance, which has the `env` feature and will be used to
|
|
||||||
build the launch environment for this addon. This property will only be used if this addon has the `env`
|
|
||||||
[manifest flag](../concepts/flags.md#manifest-flags).
|
|
||||||
|
|
||||||
### meta
|
### meta
|
||||||
|
|
||||||
|
|
|
@ -19,3 +19,8 @@ This is an array of base URLs of [AddonScript API](../api) instances, on which t
|
||||||
repository can be found. To get an addon from this repository, AddonScript will
|
repository can be found. To get an addon from this repository, AddonScript will
|
||||||
try to get it from the [addon endpoint](../api/features/addons.md#get-addon)
|
try to get it from the [addon endpoint](../api/features/addons.md#get-addon)
|
||||||
of these API instances in the order, in which they are specified in this array.
|
of these API instances in the order, in which they are specified in this array.
|
||||||
|
Instances in this array with the `env` [feature](../api/features/env.md) will
|
||||||
|
be used by AddonScript, to request the launch environment for an addon with a
|
||||||
|
[canonical namespace](../concepts/namespaces.md#canonical-namespaces) equal
|
||||||
|
to the [namespace](#namespace) of this repository. The first API instance with
|
||||||
|
the `env` feature will be used in this case with the others as fallback.
|
Loading…
Reference in a new issue