Skip to content

Commit

Permalink
Move to an extension
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Dec 18, 2024
1 parent 514b35b commit 830f9c2
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 54 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **New extensions:**
- [Remote Process Definition Extension](./extensions/remote-process-definition/README.md)
- [Processing Parameters Extension](./extensions/processing-parameters/README.md)
- Added `version` property to `GET /processes` [#517](https://github.com/Open-EO/openeo-api/issues/517)

### Fixed
Expand All @@ -33,7 +34,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `GET /file_formats`: Add `pointcloud` to the `gis_data_types`. [#475](https://github.com/Open-EO/openeo-api/issues/475)
- `GET /me`: New Relation types `alternate` and `related` for user-specific external pages. [#404](https://github.com/Open-EO/openeo-api/issues/404)
- `GET /credentials/oidc`: Allow `authorization_code` and `urn:ietf:params:oauth:grant-type:device_code` (both without PKCE) as grants for `default_clients`. [#410](https://github.com/Open-EO/openeo-api/issues/410)
- Added `GET /processing_options` to define the parameters that can be submitted when creating jobs or services. [#276](https://github.com/Open-EO/openeo-api/issues/276)
- `GET /jobs` and `GET /jobs/{job_id}`: Added a links property that can for example link to results and logs. [#453](https://github.com/Open-EO/openeo-api/issues/453)
- `GET /jobs/{job_id}/results`:
- Recommendation to add a link with relation type `canonical` which points to a signed URL with the same content as the response. [#397](https://github.com/Open-EO/openeo-api/issues/397)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ See also the [changelog](CHANGELOG.md) and the [milestones](https://github.com/O
| ------------------------------------------------------------------ | ------- | ------------ | ----------- |
| [Commercial Data](extensions/commercial-data/) | 0.1.0 | experimental | Provides an interface for discovering, ordering and using commercial data. |
| [Federation](extensions/federation/) | 0.1.0 | experimental | Covers federation aspects, i.e. where multiple back-ends are exposed as a single API. |
| [Processing Parameters](extensions/processing-parameters/) | 0.1.0 | experimental | Explore and handle additional processing parameters that a back-end can offer for the processing modes (sync. processing, batch jobs, web services). |
| [Remote Process Definition](extensions/remote-process-definition/) | 0.1.0 | experimental | Load user-defined processes that are hosted externally through the process namespace into process graphs. |

## Repository
Expand Down
12 changes: 12 additions & 0 deletions extensions/processing-parameters/.spectral.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: "spectral:oas"
rules:
contact-properties: true
tag-description: true
oas3-parameter-description: true
oas3-unused-component: true
operation-id-kebab-case:
given: "$..operationId"
then:
function: pattern
functionOptions:
match: ^[a-z][a-z0-9\-]*$
11 changes: 11 additions & 0 deletions extensions/processing-parameters/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Processing Parameters Extension

The Processing Parameters Extension to the openEO API provides an interface to explore and handle additional processing options that a back-end can offer for the three processing modes (synchronous processing, batch jobs, secondary web services).

- Version: **0.1.0**
- Stability: **experimental**
- [OpenAPI document](openapi.yaml)
- Conformance class: `https://api.openeo.org/extensions/processing-parameters/0.1.0`

**Note:** This document only documents the additions to the specification.
Extensions can not change or break existing behavior of the openEO API.
98 changes: 98 additions & 0 deletions extensions/processing-parameters/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
openapi: 3.0.2
info:
title: openEO API - Processing Parameters Extension
version: 0.1.0
description: |-
The Processing Parameters Extension to the openEO API provides an interface to explore and handle additional processing options that a back-end can offer for the three processing modes (synchronous processing, batch jobs, secondary web services).
contact:
name: openEO Consortium
url: 'https://openeo.org'
email: [email protected]
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
externalDocs:
url: https://github.com/Open-EO/openeo-api/blob/draft/extensions/workspaces/README.md
tags:
- name: Capabilities
description: General information about the API implementation and other supported capabilities provided by the back-end.
- name: Data Processing
description: Organizes and manages data processing on the back-end, either as synchronous on-demand computation or batch jobs.
- name: Batch Jobs
description: Management of batch processing tasks (jobs) and their results.
- name: Secondary Services
description: On-demand access to data using other web service protocols.
servers:
- url: 'https://openeo.example/api/{version}'
description: >-
The URL of the API MAY freely be chosen by the back-end providers. The
path, including API versioning, is a *recommendation* only. Nevertheless,
all servers MUST support HTTPS as the authentication methods are not
secure with HTTP only!
variables:
version:
default: v1
description: >-
API versioning is RECOMMENDED. As the openEO API is following
[SemVer](https://semver.org/) only the MAJOR part of the stable
version numbers (i.e. versions >= 1.0.0) SHOULD be used for API
versioning in the URL. The reason is that backward-incompatible
changes are usually introduced by major changes. Therefore, the
version number in the URL MUST not be used by the clients to detect
the version number of the API. Use the version number returned from
`GET /` instead.
paths:
/processing_options:
get:
summary: Additional processing options
operationId: list-processing-options
description: |-
Lists additional custom processing options ("additional back-end specific properties" in the API specification)
that a back-end offers for the different processing modes (synchronous processing, batch jobs, secondary web services).
The options specified here can be added to the corresponding `POST` requests at the top-level of the object that is sent as the payload.
All options SHOULD explicitly be made optional with reasonable defaults as otherwise the interoperability between the implementations decreases.
tags:
- Capabilities
- Data Processing
- Batch Jobs
- Secondary Services
security:
- {}
- Bearer: []
responses:
'200':
description: >-
An object with a list of parameters per processing mode.
content:
application/json:
schema:
description: Processing parameters per processing mode.
type: object
properties:
create_job_parameters:
$ref: '#/components/schemas/processing_create_parameters'
create_service_parameters:
$ref: '#/components/schemas/processing_create_parameters'
create_synchronous_parameters:
$ref: '#/components/schemas/processing_create_parameters'
components:
schemas:
processing_create_parameters:
title: Creation Parameters
description: |-
List of additional custom parameters that a back-end offers during the creation
of batch jobs (`POST /jobs`) and secondary web services (`POST /services`) respectively.
type: array
items:
$ref: '../../openapi.yaml#/components/schemas/parameter'
example:
- name: memory
description: Maximum amount of memory that will be allocated for processing, in gigabytes.
optional: true
default: 32
schema:
type: integer
minimum: 1
securitySchemes:
Bearer:
$ref: '../../openapi.yaml#/components/securitySchemes/Bearer'
24 changes: 24 additions & 0 deletions extensions/processing-parameters/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@openeo/api-extension-processing-parameters",
"version": "0.1.0",
"author": "openEO Consortium",
"license": "Apache-2.0",
"description": "The openEO API specification.",
"homepage": "https://openeo.org",
"bugs": {
"url": "https://github.com/Open-EO/openeo-api/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Open-EO/openeo-api.git"
},
"devDependencies": {
"@stoplight/spectral-cli": "^6.6.0",
"redoc-cli": "^0.13.21"
},
"scripts": {
"start": "redoc-cli serve openapi.yaml --watch --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true",
"build": "redoc-cli bundle openapi.yaml -o redoc.html --title \"openEO API - Processing Parameters Extension\" --cdn --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true",
"test": "spectral lint openapi.yaml"
}
}
53 changes: 0 additions & 53 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2469,43 +2469,6 @@ paths:
$ref: '#/components/responses/client_error_auth'
5XX:
$ref: '#/components/responses/server_error'
/processing_options:
get:
summary: Additional processing options
operationId: list-processing-options
description: |-
Lists additional custom processing options that a back-end offers for the
different processing modes (synchronous processing, batch jobs, secondary web services).
The options specified here can be added to the corresponding `POST` requests
at the top-level of the object that is sent as the payload.
All options SHOULD explicitly be made optional with reasonable defaults
as otherwise the interoperability between the implementations decreases.
tags:
- Capabilities
- Data Processing
- Batch Jobs
- Secondary Services
security:
- {}
- Bearer: []
responses:
'200':
description: >-
An object with a list of parameters per processing mode.
content:
application/json:
schema:
description: Processing parameters per processing mode.
type: object
properties:
create_job_parameters:
$ref: '#/components/schemas/processing_create_parameters'
create_service_parameters:
$ref: '#/components/schemas/processing_create_parameters'
create_synchronous_parameters:
$ref: '#/components/schemas/processing_create_parameters'

/service_types:
get:
summary: Supported secondary web service protocols
Expand Down Expand Up @@ -5883,22 +5846,6 @@ components:
"foo" but cannot be 1. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.2).
allOf:
- $ref: '#/components/schemas/json_schema'
processing_create_parameters:
title: Creation Parameters
description: |-
List of additional custom parameters that a back-end offers during the creation
of batch jobs (`POST /jobs`) and secondary web services (`POST /services`) respectively.
type: array
items:
$ref: '#/components/schemas/parameter'
example:
- name: memory
description: Maximum amount of memory that will be allocated for processing, in gigabytes.
optional: true
default: 32
schema:
type: integer
minimum: 1
error:
title: General Error
description: >-
Expand Down

0 comments on commit 830f9c2

Please sign in to comment.