-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add required yaml files composed of various existing schemas
Add short documentation on how to generate the desired files. Small fix to make operationId unique
- Loading branch information
Showing
6 changed files
with
162 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
openapi/paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Process Description | ||
get: | ||
summary: retrieve a process description | ||
description: | | ||
The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation: | ||
Implementations SHOULD consider supporting the OGC process description. | ||
For more information, see [Section 7.8](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_description). | ||
operationId: getProcessDescription | ||
tags: | ||
- Processes | ||
parameters: | ||
- $ref: "../../parameters/processes-core/processId-path.yaml" | ||
responses: | ||
200: | ||
$ref: "../../responses/processes-core/rProcessDescription.yaml" | ||
404: | ||
$ref: "../../responses/common-core/rNotFound.yaml" | ||
put: | ||
summary: replace a process. | ||
description: | | ||
Replaces a process. | ||
For more information, see [Section 6.4](http://docs.ogc.org/DRAFTS/20-044.html#_18582f42-ebc6-4284-9333-c089068f62b6). | ||
operationId: replace | ||
tags: | ||
- DRU | ||
parameters: | ||
- $ref: "../../parameters/processes-core/processId-path.yaml" | ||
requestBody: | ||
description: |- | ||
An OGC Application Package used to deploy a new process. | ||
required: true | ||
content: | ||
application/ogcapppkg+json: | ||
schema: | ||
$ref: "../../schemas/processes-dru/ogcapppkg.yaml" | ||
application/cwl: | ||
example: "empty" | ||
application/cwl+json: | ||
example: "{empty}" | ||
responses: | ||
204: | ||
$ref: "../../responses/processes-dru/rEmpty.yaml" | ||
403: | ||
$ref: "../../responses/processes-dru/rImmutableProcess.yaml" | ||
404: | ||
$ref: "../../responses/common-core/rNotFound.yaml" | ||
409: | ||
$ref: "../../responses/processes-dru/rDuplicateProcess.yaml" | ||
500: | ||
$ref: "../../responses/common-core/rServerError.yaml" | ||
delete: | ||
summary: undeploy a process. | ||
description: | | ||
Undeploys a process. | ||
For more information, see [Section 6.5](http://docs.ogc.org/DRAFTS/20-044.html#_16391f9e-538f-4a84-9710-72a6bab82842). | ||
operationId: undeploy | ||
tags: | ||
- DRU | ||
parameters: | ||
- $ref: "../../parameters/processes-core/processId-path.yaml" | ||
responses: | ||
204: | ||
$ref: "../../responses/processes-dru/rEmpty.yaml" | ||
403: | ||
$ref: "../../responses/processes-dru/rImmutableProcess.yaml" | ||
404: | ||
$ref: "../../responses/common-core/rNotFound.yaml" | ||
500: | ||
$ref: "../../responses/common-core/rServerError.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
get: | ||
summary: retrieve the list of available processes | ||
description: | | ||
The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process. | ||
For more information, see [Section 7.7]https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_process_list). | ||
operationId: getProcesses | ||
tags: | ||
- Processes | ||
responses: | ||
200: | ||
$ref: "../../responses/processes-core/rProcessList.yaml" | ||
post: | ||
summary: deploy a process. | ||
description: | | ||
Deploys a process. | ||
For more information, see [Section 6.3](http://docs.ogc.org/DRAFTS/20-044.html#_87a6983e-d060-458c-95ab-27e232e64822). | ||
operationId: deploy | ||
tags: | ||
- DRU | ||
parameters: | ||
- $ref: "../../parameters/processes-dru/w-param.yaml" | ||
requestBody: | ||
description: |- | ||
An OGC Application Package used to deploy a new process. | ||
required: true | ||
content: | ||
application/ogcapppkg+json: | ||
schema: | ||
$ref: "../../schemas/processes-dru/ogcapppkg.yaml" | ||
application/cwl: | ||
example: "empty" | ||
application/cwl+json: | ||
example: "{empty}" | ||
responses: | ||
201: | ||
$ref: "../../schemas/processes-core/processSummary.yaml" | ||
403: | ||
$ref: "../../responses/processes-dru/rImmutableProcess.yaml" | ||
409: | ||
$ref: "../../responses/processes-dru/rDuplicateProcess.yaml" | ||
500: | ||
$ref: "../../responses/common-core/rServerError.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@gfenoy Is this because of the difficulty to support multiple operations methods e.g., GET, POST) at the same path (as per OAI/OpenAPI-Specification#417 and OAI/OpenAPI-Specification#2922)?
The goal of this main yaml file is to keep that main file short so as to make it easy to combine multiple OGC APIs in one top-level document, and the lengthy explanations and the script to generate combined paths kind of get in the way here. Very unfortunate that it is not supported yet by OpenAPI.
Perhaps moving the instructions to the pProcessListDeploy.yaml would address my biggest concern of keeping ogcapi-process.yaml short & sweet. This would also make it obvious when looking at that file by having the comment at the top that this file is auto-generated and should not be manually modified. We could also potentially set up the GitHub actions to auto-generate it. In some repos (e.g., Coverages) the bundled JSON is already auto-generated by a GitHub action.