Skip to content

Commit a062369

Browse files
committed
Make several fields in user-defined processes nullable. #264
1 parent 1774edd commit a062369

File tree

2 files changed

+57
-28
lines changed

2 files changed

+57
-28
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- `/jobs/{job_id}/logs` and `GET /services/{service_id}/logs`: Reintroduced the missing `offset` parameter.
1212

1313
### Changed
14-
- `GET /process_graphs`: Field `id` is required for each process.
1514
- For batch jobs (`/jobs`), services (`/services`) and sync. processing (`/result`) the property `process_graph` got replaced by `process`. It contains a process graph and optionally all process metadata. [#260](https://github.com/Open-EO/openeo-api/issues/260)
15+
- `GET /process_graphs`: Field `id` is required for each process.
16+
- Several properties in user-defined processes can now be `null` (see also [#264](https://github.com/Open-EO/openeo-api/issues/264)):
17+
- `GET /process_graphs` and `GET /process_graphs/{process_graph_id}`: Process properties `summary`, `description`, `parameters` and `returns`.
18+
- `POST /validation`: Process property `id`.
19+
- Child processes in process graphs (fka callbacks): `id`, `summary`, `description`, `parameters` and `returns`.
1620

1721
### Removed
1822
- `POST /process_graphs` and `PATCH /process_graphs/{process_graph_id}`. Use `PUT /process_graphs/{process_graph_id}` instead. [#260](https://github.com/Open-EO/openeo-api/issues/260)

openapi.yaml

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,26 +2357,28 @@ paths:
23572357
description: >-
23582358
The user-defined processes submitted by a user,
23592359
usually without process graph, examples, exceptions and links to keep the response size small.
2360-
type: object
2361-
required:
2362-
- id
2363-
properties:
2364-
id:
2365-
$ref: '#/components/schemas/process_id'
2366-
summary:
2367-
$ref: '#/components/schemas/process_summary'
2368-
description:
2369-
$ref: '#/components/schemas/process_description'
2370-
categories:
2371-
$ref: '#/components/schemas/process_categories'
2372-
parameters:
2373-
$ref: '#/components/schemas/process_parameters'
2374-
returns:
2375-
$ref: '#/components/schemas/process_return_value'
2376-
deprecated:
2377-
$ref: '#/components/schemas/process_deprecated'
2378-
experimental:
2379-
$ref: '#/components/schemas/process_experimental'
2360+
allOf:
2361+
- type: object
2362+
required:
2363+
- id
2364+
properties:
2365+
id:
2366+
$ref: '#/components/schemas/process_id'
2367+
summary:
2368+
$ref: '#/components/schemas/process_summary'
2369+
description:
2370+
$ref: '#/components/schemas/process_description'
2371+
categories:
2372+
$ref: '#/components/schemas/process_categories'
2373+
parameters:
2374+
$ref: '#/components/schemas/process_parameters'
2375+
returns:
2376+
$ref: '#/components/schemas/process_return_value'
2377+
deprecated:
2378+
$ref: '#/components/schemas/process_deprecated'
2379+
experimental:
2380+
$ref: '#/components/schemas/process_experimental'
2381+
- $ref: '#/components/schemas/nullable_process'
23802382
links:
23812383
$ref: '#/components/schemas/links_pagination'
23822384
example:
@@ -2445,6 +2447,7 @@ paths:
24452447
description: A user-defined process with processing instructions as process graph.
24462448
allOf:
24472449
- $ref: '#/components/schemas/process'
2450+
- $ref: '#/components/schemas/nullable_process'
24482451
- required:
24492452
- id
24502453
- process_graph
@@ -4627,13 +4630,29 @@ components:
46274630
$ref: '#/components/schemas/link'
46284631
process_graph:
46294632
$ref: '#/components/schemas/process_graph'
4633+
nullable_process:
4634+
type: object
4635+
properties:
4636+
summary:
4637+
nullable: true
4638+
description:
4639+
nullable: true
4640+
parameters:
4641+
nullable: true
4642+
returns:
4643+
nullable: true
46304644
process_graph_with_metadata:
46314645
title: Process Graph with metadata
46324646
description: A process graph, optionally enriched with process metadata.
46334647
allOf:
46344648
- $ref: '#/components/schemas/process'
4635-
- required:
4649+
- $ref: '#/components/schemas/nullable_process'
4650+
- type: object
4651+
required:
46364652
- process_graph
4653+
properties:
4654+
id:
4655+
nullable: true
46374656
process_id:
46384657
type: string
46394658
description: |-
@@ -4691,17 +4710,16 @@ components:
46914710
process_exceptions:
46924711
type: object
46934712
title: Process Exceptions
4694-
description: >-
4713+
description: |-
46954714
Declares any exceptions (errors) that might occur during execution
4696-
of this process. MUST be used only for exceptions that stop the
4697-
execution of a process and are therefore not to be used for
4698-
warnings, or notices or debugging messages.
4699-
4715+
of this process. This list is just for informative purposes and may be
4716+
incomplete. This list MUST only contain exceptions that stop the
4717+
execution of a process and MUST NOT contain warnings, notices or
4718+
debugging messages.
47004719
47014720
The keys define the error code and MUST match the following pattern:
47024721
`^\w+$`
47034722
4704-
47054723
This schema follows the schema of the general openEO error list (see
47064724
errors.json).
47074725
additionalProperties:
@@ -4750,6 +4768,13 @@ components:
47504768
47514769
The order in the array corresponds to the parameter order to
47524770
be used in clients that don't support named parameters.
4771+
4772+
**Note:** Specifying an empty array is different from (if allowed)
4773+
`null` or the property being absent.
4774+
An empty array means the process has no parameters.
4775+
`null` / property absent means that the parameters are unknown as
4776+
the user has not specified them. There could still be parameters in the
4777+
process graph, if one is specified.
47534778
items:
47544779
$ref: '#/components/schemas/process_parameter'
47554780
process_parameter:

0 commit comments

Comments
 (0)