Skip to content

Commit 746002e

Browse files
authored
Revert namespace default (#313)
1 parent 29be866 commit 746002e

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
- Additional dimensions in `cube:properties` can only be of type `other`.
3434
- The extents `interval` and `bbox` can have multiple entries.
3535
- Allow all STAC versions that are compatible to STAC 0.9.0.
36-
- Process graph nodes have an additional field `namespace` to distinguish pre-defined and user-defined processes. The old behavior to prioritize user-defined over pre-defined processes has been removed. [#305](https://github.com/Open-EO/openeo-api/issues/305)
36+
- Process graph nodes have an additional field `namespace` to distinguish pre-defined and user-defined processes. The default behavior has not changed. [#305](https://github.com/Open-EO/openeo-api/issues/305)
3737
- Added `format: commonmark` to all properties supporting CommonMark formatting.
3838
- `errors.json`: The pre-defined error messages have been reworked. [#272](https://github.com/Open-EO/openeo-api/issues/272), [#273](https://github.com/Open-EO/openeo-api/issues/273)
3939
- Added `FolderOperationUnsupported`, `UnsupportedApiVersion`, `PermissionsInsufficient`, `ProcessGraphIdDoesntMatch` and `PredefinedProcessExists`.

openapi.yaml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ info:
205205
206206
**Back-end providers** MUST follow the schema for predefined processes as in [`GET /processes`](/#tag/Process-Discovery) to define new processes. This includes:
207207
208-
* Choosing a intuitive and ideally unique name as process id, consisting of only letters (a-z), numbers and underscores.
208+
* Choosing a intuitive process id, consisting of only letters (a-z), numbers and underscores. It MUST be unique across the pre-defined processes.
209209
* Defining the parameters and their exact (JSON) schemes.
210210
* Specifying the return value of a process also with a (JSON) schema.
211211
* Providing examples or compliance tests.
212212
* Trying to make the process universally usable so that other back-end providers or openEO can adopt it.
213213
214214
**Users** MUST follow the schema for user-defined processes as in [`GET /process_graphs`](/#tag/User-Defined-Processes) to define new processes. This includes:
215215
216-
* Choosing a intuitive and ideally unique name as process id, consisting of only letters (a-z), numbers and underscores.
216+
* Choosing a intuitive name as process id, consisting of only letters (a-z), numbers and underscores. It MUST be unique across the user-defined processes.
217217
* Defining the algorithm as a process graph.
218218
* Optionally, specifying the additional metadata for processes.
219219
@@ -273,7 +273,7 @@ info:
273273
274274
One of the nodes in a map of processes (the final one) MUST have the `result` flag set to `true`, all the other nodes can omit it as the default value is `false`. Having such a node is important as multiple end nodes are possible, but in most use cases it is important to exactly specify the return value to be used by other processes. Each child process graph must also specify a result node similar to the "main" process graph.
275275
276-
`process_id` MUST be a valid process ID in the `namespace` given. By default, the namespace is `null`, which includes all pre-defined processes listed at `GET /processes`. The namespace `user` refers to all user-defined processes listed as `GET /process_graphs`. Additional namespaces may be introduced later.
276+
`process_id` MUST be a valid process ID in the `namespace` given. Clients SHOULD warn the user if a user-defined process is added with the same identifier as one of the pre-defined process.
277277
278278
### Arguments
279279
@@ -4724,16 +4724,29 @@ components:
47244724
example: null
47254725
description: |-
47264726
The namespace the `process_id` is valid for.
4727+
4728+
The following options are pre-defined by the openEO API, but additional
4729+
namespaces may be introduced by back-ends or in a future version of the API.
47274730
4728-
By default, the namespace is `null`, which includes all pre-defined processes listed at `GET /processes`.
4729-
The namespace `user` refers to all user-defined processes listed as `GET /process_graphs`.
4730-
Additional namespaces may be introduced by back-ends or in a future version of the API.
4731+
* `null` (default): Checks both user-defined and pre-defined processes,
4732+
but prefers user-defined processes if both are available.
4733+
This allows users to add missing pre-defined processes for portability,
4734+
e.g. common processes from [processes.openeo.org](https://processes.openeo.org)
4735+
that have a process graph included.
4736+
It is RECOMMENDED to log the namespace selected by the back-end for debugging purposes.
4737+
* `backend`: Uses exclusively the pre-defined processes listed at `GET /processes`.
4738+
* `user`: Uses exclusively the user-defined processes listed at `GET /process_graphs`.
4739+
4740+
If multiple processes with the same identifier exist, Clients SHOULD
4741+
inform the user that it's recommended to select a namespace.
47314742
process_id:
47324743
type: string
47334744
description: |-
4734-
Unique identifier for the process.
4735-
4736-
MUST be unique across its namespace (e.g. pre-defined processes or user-defined processes).
4745+
The identifier for the process. It MUST be unique across its namespace
4746+
(e.g. pre-defined processes or user-defined processes).
4747+
4748+
Clients SHOULD warn the user if a user-defined process is added with the
4749+
same identifier as one of the pre-defined process.
47374750
pattern: '^\w+$'
47384751
example: ndvi
47394752
process_summary:

0 commit comments

Comments
 (0)