Skip to content

Commit

Permalink
Merge pull request #284 from Open-EO/issue-268
Browse files Browse the repository at this point in the history
User-defined process parameters are recursively defined
  • Loading branch information
m-mohr committed May 28, 2020
2 parents 6ab9db7 + b397029 commit 88637d3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Clarified that version numbers in well-known discovery should be unique. [#287](https://github.com/Open-EO/openeo-api/issues/287)
- Several clarifications and improvements for the documentation.

### Fixed
- Parameters passed to child process graphs are not defined recursively any longer. [#268](https://github.com/Open-EO/openeo-api/issues/268)
- Parameters for child process graphs are not specified for return values and service type parameters any longer. [#268](https://github.com/Open-EO/openeo-api/issues/268)

## 1.0.0-rc.2 - 2020-02-20

### Added
Expand Down
81 changes: 59 additions & 22 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ paths:
description: List of parameters made available to user-defined processes.
type: array
items:
$ref: '#/components/schemas/process_parameter'
$ref: '#/components/schemas/parameter'
links:
description: |-
Links related to this service type, e.g. more
Expand Down Expand Up @@ -4814,7 +4814,7 @@ components:
description:
$ref: '#/components/schemas/process_description'
schema:
$ref: '#/components/schemas/process_schema'
$ref: '#/components/schemas/data_type_schema'
process_experimental:
type: boolean
description: >-
Expand Down Expand Up @@ -4906,13 +4906,11 @@ components:
process graph, if one is specified.
items:
$ref: '#/components/schemas/process_parameter'
process_parameter:
title: Process Parameter
base_parameter:
type: object
required:
- name
- description
- schema
properties:
name:
type: string
Expand All @@ -4936,8 +4934,26 @@ components:
The default value for this parameter.
Required parameters SHOULD NOT specify a default value. Optional parameters SHOULD always specify a default value.
nullable: true
schema:
$ref: '#/components/schemas/process_schema'
parameter:
title: Parameter
allOf:
- $ref: '#/components/schemas/base_parameter'
- type: object
required:
- schema
properties:
schema:
$ref: '#/components/schemas/data_type_schema'
process_parameter:
title: Process Parameter
allOf:
- $ref: '#/components/schemas/base_parameter'
- type: object
required:
- schema
properties:
schema:
$ref: '#/components/schemas/parameter_schema'
job_id:
type: string
description: >-
Expand Down Expand Up @@ -5189,23 +5205,46 @@ components:
example:
- href: 'https://example.openeo.org/docs/errors/SampleError'
rel: about
process_schema:
title: Supported Data Type(s)
description: >-
Either a single data type or a list of data types.
data_type_schema:
title: Data Types
description: Either a single data type or a list of data types.
oneOf:
- $ref: '#/components/schemas/process_json_schema'
- $ref: '#/components/schemas/json_schema'
- title: Multiple data types
description: |-
A list of data types this parameter or return value supports, specified as JSON Schemas.
Note: To validate the list of JSON Schemas using a JSON Schema validator, wrap the list of schemas in an object with a property `anyOf`: `{"anyOf": ...}`
description: A list of data types this parameter supports, specified as JSON Schemas.
type: array
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/json_schema'
parameter_schema:
title: Parameter Data Types
description: Either a single data type or a list of data types.
oneOf:
- $ref: '#/components/schemas/parameter_json_schema'
- title: Multiple data types
description: A list of data types supported, specified as JSON Schemas.
type: array
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/process_json_schema'
process_json_schema:
$ref: '#/components/schemas/parameter_json_schema'
parameter_json_schema:
title: Single Data Type
allOf:
- $ref: '#/components/schemas/json_schema'
- type: object
properties:
parameters:
type: array
description: |-
A list of parameters passed to the child process graph.
The order in the array corresponds to the parameter order to
be used in clients that don't support named parameters.
items:
$ref: '#/components/schemas/parameter'
json_schema:
type: object
title: Single data type
description: |-
Expand Down Expand Up @@ -5235,8 +5274,6 @@ components:
$ref: '#/components/schemas/json_schema_type'
subtype:
type: string
parameters:
$ref: '#/components/schemas/process_parameters'
pattern:
type: "string"
format: "regex"
Expand All @@ -5259,8 +5296,8 @@ components:
- type: array
minItems: 1
items:
$ref: '#/components/schemas/process_json_schema'
- $ref: '#/components/schemas/process_json_schema'
$ref: '#/components/schemas/json_schema'
- $ref: '#/components/schemas/json_schema'
additionalProperties: true
json_schema_type:
type: string
Expand Down

0 comments on commit 88637d3

Please sign in to comment.