diff --git a/extensions/deploy_replace_undeploy/standard/openapi/examples/README.md b/extensions/deploy_replace_undeploy/standard/openapi/examples/README.md deleted file mode 100644 index 4bb548e9..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/examples/README.md +++ /dev/null @@ -1 +0,0 @@ -Add OpenAPI YAML examples to this directory. If not used, delete the directory. diff --git a/extensions/deploy_replace_undeploy/standard/openapi/examples/openapi.yaml b/extensions/deploy_replace_undeploy/standard/openapi/examples/openapi.yaml deleted file mode 100644 index 0944730d..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/examples/openapi.yaml +++ /dev/null @@ -1,242 +0,0 @@ -openapi: 3.0.2 -info: - title: "OGC API - Processes - Part 2: Transactions" - version: "1.0.0" - description: |- - WARNING - THIS IS WORK IN PROGRESS - This document extends the OpenAPI definition from OGC API - Processes - - Part 1: Core to add transactional capabilities. - contact: - name: Panagiotis (Peter) A. Vretanos - email: pvretano@cubewerx.com - license: - name: OGC license - url: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/LICENSE" -servers: - - description: Mock server - url: https://www.someserver.com/wps -paths: - /: - get: - summary: landing page of this API - description: |- - The landing page provides links to the API definition, the conformance - declaration and the metadata about the processes offered by this - service. - operationId: getLandingPage - tags: - - Capabilities - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/LandingPage.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" - /conformance: - get: - summary: information about standards that this API conforms to - description: |- - Lists all requirements classes specified in the standard (e.g., - OGC API - Processes - Part 1: Core) that the server conforms to - operationId: getConformanceClasses - tags: - - ConformanceDeclaration - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ConformanceDeclaration.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" - /processes: - get: - summary: retrieve available processes - description: |- - Lists all available processes this server offers. - operationId: getProcesses - tags: - - ProcessCollection - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ProcessCollection.yaml" - post: - summary: Deploys a new process - description: Adds a new process to the API. - operationId: deployProcess - tags: - - Deploy Process - requestBody: - description: |- - The request body contains a description of the process to deploy. - Part 2 does not mandate a specific process description language - or schema but this example uses the recommended OGC Application - Package schema. - content: - application/json: - schema: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/extensions/transactions/openapi/schemas/ogcapppkg.yaml" - responses: - 201: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/processSummary.yaml" - 400: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/NotSupported.yaml" - 409: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/extensions/transactions/openapi/schemas/responses/DuplicateProcess.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/ServerError.yaml" - /processes/{processId}: - get: - summary: retrieve a process description - description: |- - Describes a process. - operationId: getProcessDescription - tags: - - ProcessDescription - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ProcessDescription.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - put: - summary: update process - description: Updates a previously deployed process. - operationId: updateProcess - tags: - - Replace Process - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - requestBody: - description: |- - The request body contains a description of the process to replace - the existing process. Part 2 does not mandate a specific process - description language or schema but this example uses the - recommended OGC Application Package schema. - content: - application/json: - schema: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/extensions/transactions/openapi/schemas/ogcapppkg.yaml" - responses: - 204: - description: The process was updated. - 400: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/NotSupported.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/ServerError.yaml" - delete: - summary: undeploy process - description: Remove a previously deployed processes from the API. - operationId: undeployProcess - tags: - - Undeploy Process - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - responses: - 204: - description: The process was deleted. - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/ServerError.yaml" - /processes/{processId}/jobs: - get: - summary: retrieve the list of jobs for a process. - description: Lists available jobs of a process. - operationId: getJobs - tags: - - JobCollection - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/JobCollection.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - post: - summary: execute a process. - description: Submits a new job. - operationId: execute - tags: - - Execute - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - requestBody: - description: Mandatory execute request JSON - required: true - content: - application/json: - schema: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/execute.yaml" - responses: - 200: - $ref: 'https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ExecuteSync.yaml' - 201: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ExecuteAsync.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" - callbacks: - jobCompleted: - "{$request.body#/subscriber/successUri}": - post: - requestBody: - content: - application/json: - schema: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/results.yaml" - responses: - 200: - description: Results received successfully - /processes/{processId}/jobs/{jobId}: - get: - summary: retrieve the status of a job - description: Shows the status of a job. - operationId: getStatus - tags: - - Status - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/jobId.yaml" - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/Status.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" - delete: - summary: cancel a job execution, remove a finished job - description: Cancel a job execution and remove it from the jobs list. - operationId: dismiss - tags: - - Dismiss - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/jobId.yaml" - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/Status.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" - /processes/{processId}/jobs/{jobId}/results: - get: - summary: retrieve the result(s) of a job - description: |- - Lists available results of a job. In case of a failure, lists - exceptions instead. - operationId: getResult - tags: - - Result - parameters: - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/processIdPathParam.yaml" - - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/parameters/jobId.yaml" - responses: - 200: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/Results.yaml" - 404: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/NotFound.yaml" - 500: - $ref: "https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/responses/ServerError.yaml" diff --git a/extensions/deploy_replace_undeploy/standard/openapi/parameters/README.md b/extensions/deploy_replace_undeploy/standard/openapi/parameters/README.md deleted file mode 100644 index 3a15ee42..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/parameters/README.md +++ /dev/null @@ -1 +0,0 @@ -Add OpenAPI parameter components to this directory. If not used, delete the directory. diff --git a/extensions/deploy_replace_undeploy/standard/openapi/responses/README.md b/extensions/deploy_replace_undeploy/standard/openapi/responses/README.md deleted file mode 100644 index 470ddc24..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/responses/README.md +++ /dev/null @@ -1 +0,0 @@ -Add OpenAPI response components to this directory. If not used, delete the directory. diff --git a/extensions/deploy_replace_undeploy/standard/openapi/schemas/README.md b/extensions/deploy_replace_undeploy/standard/openapi/schemas/README.md deleted file mode 100644 index 0c6787ac..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/schemas/README.md +++ /dev/null @@ -1 +0,0 @@ -Add OpenAPI schema components to this directory. If not used, delete the directory. diff --git a/extensions/deploy_replace_undeploy/standard/openapi/schemas/ogcapppkg.yaml b/extensions/deploy_replace_undeploy/standard/openapi/schemas/ogcapppkg.yaml deleted file mode 100644 index 13979f76..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/schemas/ogcapppkg.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -required: - - executionUnit -properties: - processDescription: - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/process.yaml - executionUnit: - oneOf: - - $ref: executionUnit.yaml - - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml - - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/qualifiedInputValue.yaml - - type: array - items: - oneOf: - - $ref: executionUnit.yaml - - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml - - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/qualifiedInputValue.yaml \ No newline at end of file diff --git a/extensions/deploy_replace_undeploy/standard/openapi/schemas/staticIndicator.yaml b/extensions/deploy_replace_undeploy/standard/openapi/schemas/staticIndicator.yaml deleted file mode 100644 index 05706027..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/schemas/staticIndicator.yaml +++ /dev/null @@ -1,7 +0,0 @@ -allOf: - - $ref: "https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml" - - type: object - properties: - mutable: - type: boolean - default: true diff --git a/extensions/deploy_replace_undeploy/standard/openapi/schemas/swagger/ogcapppkg.yaml b/extensions/deploy_replace_undeploy/standard/openapi/schemas/swagger/ogcapppkg.yaml deleted file mode 100644 index 8be38c11..00000000 --- a/extensions/deploy_replace_undeploy/standard/openapi/schemas/swagger/ogcapppkg.yaml +++ /dev/null @@ -1,49 +0,0 @@ -type: object -required: - - executionUnit -properties: - processDescription: - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/swagger/process.yaml - executionUnit: - description: Resource containing an executable or runtime information for executing the process. - type: array - minItems: 1 - items: - type: object - properties: - config: - type: object - description: Hardware requirements and configuration properties for executing the process. - properties: - cpuMin: - description: Minimum number of CPUs required to run the process (unit is CPU core). - type: number - minimum: 1 - cpuMax: - description: Maximum number of CPU dedicated to the process (unit is CPU core) - type: number - memoryMin: - description: Minimum RAM memory required to run the application (unit is GB) - type: number - memoryMax: - description: Maximum RAM memory dedicated to the application (unit is GB) - type: number - storageTempMin: - description: Minimum required temporary storage size (unit is GB) - type: number - storageOutputsMin: - description: Minimum required output storage size (unit is GB) - type: number - jobTimeout: - description: Timeout delay for a job execution (in seconds) - type: number - additionalProperties: true - additionalProperties: true - example: - type: docker - image: mydocker/ndvi:latest - config: - cpuMin: 2 - cpuMax: 5 - memoryMin: 1 - memoryMax: 3 diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-duplicate.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-duplicate.adoc index 95a1c383..604a7bb1 100644 --- a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-duplicate.adoc +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-duplicate.adoc @@ -4,8 +4,8 @@ [%metadata] label:: /req/deploy-replace-undeploy/deploy/response-duplicate -part:: If a process with the same identifier already exists on the server, the satus code of the response SHALL be `303`. -part:: A response with HTTP status code `303` SHALL include a `Location` header with the URI of the duplicated processes (path: `/processes/{processId}`). +part:: If a process with the same identifier already exists on the server, the satus code of the response SHALL be `409`. +part:: A response with HTTP status code `409` MAY include a `Location` header with the URI of the duplicated processes (path: `/processes/{processId}`). part:: The content of that response SHALL be based upon the OpenAPI 3.0 schema https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/core/openapi/schemas/exception.yaml[exception.yaml]. part:: The `type` of the exception SHALL be "http://www.opengis.net/def/exceptions/ogcapi-processes-2/1.0/duplicated-process". diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-immutable.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-immutable.adoc index 84d4e23a..7b4dbb03 100644 --- a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-immutable.adoc +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-immutable.adoc @@ -4,9 +4,9 @@ [%metadata] label:: /req/deploy-replace-undeploy/deploy/response-immutable -part:: If a process with the same identifier already exists on the server and is immutable, the satus code of the response SHALL be `303`. -part:: A response with HTTP status code `303` SHALL include a `Location` header with the URI of the existing process (path: `/processes/{processId}`). -part:: The content of that response SHALL be based upon the OpenAPI +part:: If a process with the same identifier already exists on the server and is immutable, the satus code of the response SHALL be `403`. +part:: A response with HTTP status code `403` MAY include a `Location` header with the URI of the existing process (path: `/processes/{processId}`). +part:: The content of that response shall be based upon the OpenAPI 3.0 schema https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/core/openapi/schemas/exception.yaml[exception.yaml]. part:: The `type` of the exception SHALL be "http://www.opengis.net/def/exceptions/ogcapi-processes-2/1.0/immutable-process". ==== diff --git a/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc b/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc index 0fe95977..a862ba9f 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc @@ -30,7 +30,7 @@ include::../requirements/ogcapppkg/REQ_schema.adoc[] .link:http://schemas.opengis.net/ogcapi/processes/part2/1.0/openapi/schemas/ogcapppkg.yaml[Schema for the OGC Application Package] [source,yaml] ---- -include::../openapi/schemas/ogcapppkg.yaml[] +include::../../../openapi/schemas/processes-dru/ogcapppkg.yaml[] ---- ==== processDescription property diff --git a/openapi/README.md b/openapi/README.md index ff3dfbce..b719edee 100644 --- a/openapi/README.md +++ b/openapi/README.md @@ -8,4 +8,27 @@ The list of supported paths should be ajusted in `ogcapi-processes-3.yaml`. The `ogcapi-processes-3.bundled.json` was generated with `swagger-cli bundle` from `ogcapi-processes-3.yaml` and its dependencies included from the components sub-directories. +The `paths/processes-dru/pProcessListDeploy.yaml` and `paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml` files are generated by concatening multiple files in a single one. you can use the command below to update their value with the current schema: + +``` +cd openapi +# Refresh pProcessListDeploy.yaml content +rm paths/processes-dru/pProcessListDeploy.yaml ; \ +for i in processes-core/pProcessList.yaml \ + processes-dru/pDeploy.yaml ; \ +do \ + cat paths/$i >> paths/processes-dru/pProcessListDeploy.yaml; +done + +# Refresh pProcessDescriptionReplaceUndeploy.yaml content +rm paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml; \ +for i in processes-core/pProcessDescription.yaml \ + processes-dru/pReplace.yaml \ + processes-dru/pUndeploy.yaml ; \ +do \ + cat paths/$i >> paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml ;\ +done + +``` + See also [SwaggerCLI](https://apitools.dev/swagger-cli/) and its [GitHub repository](https://github.com/APIDevTools/swagger-cli). diff --git a/openapi/ogcapi-processes.yaml b/openapi/ogcapi-processes.yaml index b5cb2fe9..18ac8a91 100644 --- a/openapi/ogcapi-processes.yaml +++ b/openapi/ogcapi-processes.yaml @@ -29,10 +29,18 @@ paths: # OGC API - Processes - Part 1: Core /processes: - $ref: 'paths/processes-core/pProcessList.yaml' + # If OGC API - Part 1 only uncomment the line below + #$ref: 'paths/processes-core/pProcessList.yaml' + + # OGC API - Processes Part 2: Deploy, Replace, Undeploy + $ref: 'paths/processes-dru/pProcessListDeploy.yaml' /processes/{processId}: - $ref: 'paths/processes-core/pProcessDescription.yaml' + # OGC API - Processes Part 1: Core + #$ref: 'paths/processes-core/pProcessDescription.yaml' + + # OGC API - Processes Part 2: Deploy, Replace, Undeploy + $ref: 'paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml' /processes/{processId}/execution: $ref: 'paths/processes-workflows/pExecution-workflows.yaml' @@ -47,6 +55,7 @@ paths: /jobs/{jobId}/results: $ref: 'paths/processes-core/pJobResults.yaml' + components: schemas: # $ref: './schemas/index.yaml' # Not supported? @@ -146,6 +155,12 @@ components: statusInfo: $ref: 'schemas/processes-core/statusInfo.yaml' + # OGC API - Common - Part 2: Deploy, Replace, Undeploy + ogcapppkg: + $ref: 'schemas/processes-dru/ogcapppkg.yaml' + staticIndicator: + $ref: 'schemas/processes-dru/staticIndicator.yaml' + parameters: # Common - Core f-metadata: @@ -188,6 +203,10 @@ components: maxDuration: $ref: 'parameters/processes-core/maxDuration.yaml' + # OGC API - Common - Part 2: Deploy, Replace, Undeploy + w: + $ref: 'parameters/processes-dru/w-param.yaml' + responses: # Generic Errors NotFound: @@ -234,3 +253,15 @@ components: $ref: 'responses/processes-core/rExecuteSync.yaml' ExecuteSyncRawRef: $ref: 'responses/processes-core/rExecuteSyncRawRef.yaml' + + # OGC API - Common - Part 2: Deploy, Replace, Undeploy + DeployProcess: + $ref: 'responses/processes-dru/rDeployProcess.yaml' + EmptyResponse: + $ref: 'responses/processes-dru/rEmpty.yaml' + + # Part 2 additional excepions + DuplicateProcess: + $ref: 'responses/processes-dru/rDuplicateProcess.yaml' + ImmutableProcess: + $ref: 'responses/processes-dru/rImmutableProcess.yaml' diff --git a/openapi/parameters/processes-dru/w-param.yaml b/openapi/parameters/processes-dru/w-param.yaml new file mode 100644 index 00000000..e5d4e41d --- /dev/null +++ b/openapi/parameters/processes-dru/w-param.yaml @@ -0,0 +1,6 @@ +name: w +description: Point to the workflow identifier for deploying a CWL containing multiple workflow definitions +in: query +required: false +schema: + type: string diff --git a/openapi/paths/processes-dru/pDeploy.yaml b/openapi/paths/processes-dru/pDeploy.yaml new file mode 100644 index 00000000..e4ddbbde --- /dev/null +++ b/openapi/paths/processes-dru/pDeploy.yaml @@ -0,0 +1,37 @@ +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: + schema: + $ref: "https://raw.githubusercontent.com/common-workflow-language/cwl-v1.2/1.2.1_proposed/json-schema/cwl.yaml" + application/cwl+json: + schema: + $ref: "https://raw.githubusercontent.com/common-workflow-language/cwl-v1.2/1.2.1_proposed/json-schema/cwl.yaml" + application/cwl+yaml: + schema: + $ref: "https://raw.githubusercontent.com/common-workflow-language/cwl-v1.2/1.2.1_proposed/json-schema/cwl.yaml" + 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" diff --git a/openapi/paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml b/openapi/paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml new file mode 100644 index 00000000..4ebf9739 --- /dev/null +++ b/openapi/paths/processes-dru/pProcessDescriptionReplaceUndeploy.yaml @@ -0,0 +1,75 @@ +# 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: + schema: + type: string + application/cwl+json: + schema: + example: {} + 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" diff --git a/openapi/paths/processes-dru/pProcessListDeploy.yaml b/openapi/paths/processes-dru/pProcessListDeploy.yaml new file mode 100644 index 00000000..2f206af5 --- /dev/null +++ b/openapi/paths/processes-dru/pProcessListDeploy.yaml @@ -0,0 +1,46 @@ +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: + schema: + type: string + application/cwl+json: + schema: + example: {} + 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" diff --git a/openapi/paths/processes-dru/pReplace.yaml b/openapi/paths/processes-dru/pReplace.yaml new file mode 100644 index 00000000..b8ae7c0c --- /dev/null +++ b/openapi/paths/processes-dru/pReplace.yaml @@ -0,0 +1,36 @@ +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: + schema: + type: string + application/cwl+json: + schema: + example: {} + 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" diff --git a/openapi/paths/processes-dru/pUndeploy.yaml b/openapi/paths/processes-dru/pUndeploy.yaml new file mode 100644 index 00000000..9e08b351 --- /dev/null +++ b/openapi/paths/processes-dru/pUndeploy.yaml @@ -0,0 +1,20 @@ +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" diff --git a/extensions/deploy_replace_undeploy/standard/openapi/responses/DeployProcess.yaml b/openapi/responses/processes-dru/rDeployProcess.yaml similarity index 66% rename from extensions/deploy_replace_undeploy/standard/openapi/responses/DeployProcess.yaml rename to openapi/responses/processes-dru/rDeployProcess.yaml index d2683168..8f1097ac 100644 --- a/extensions/deploy_replace_undeploy/standard/openapi/responses/DeployProcess.yaml +++ b/openapi/responses/processes-dru/rDeployProcess.yaml @@ -7,7 +7,4 @@ headers: content: application/json: schema: - content: - application/json: - schema: - $ref: "../schemas/staticIndicator.yaml" + $ref: "../../schemas/processes-dru/staticIndicator.yaml" diff --git a/extensions/deploy_replace_undeploy/standard/openapi/responses/DuplicateProcess.yaml b/openapi/responses/processes-dru/rDuplicateProcess.yaml similarity index 62% rename from extensions/deploy_replace_undeploy/standard/openapi/responses/DuplicateProcess.yaml rename to openapi/responses/processes-dru/rDuplicateProcess.yaml index e8db3db8..108976c3 100644 --- a/extensions/deploy_replace_undeploy/standard/openapi/responses/DuplicateProcess.yaml +++ b/openapi/responses/processes-dru/rDuplicateProcess.yaml @@ -2,7 +2,7 @@ description: the processes being added is already deployed (i.e. duplicate) content: application/json: schema: - $ref: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/exception.yaml + $ref: ../../schemas/common-core/exception.yaml text/html: schema: type: string \ No newline at end of file diff --git a/openapi/responses/processes-dru/rEmpty.yaml b/openapi/responses/processes-dru/rEmpty.yaml new file mode 100644 index 00000000..3eef7b46 --- /dev/null +++ b/openapi/responses/processes-dru/rEmpty.yaml @@ -0,0 +1 @@ +description: successful operation (no response body) diff --git a/openapi/responses/processes-dru/rImmutableProcess.yaml b/openapi/responses/processes-dru/rImmutableProcess.yaml new file mode 100644 index 00000000..b4d1c6cf --- /dev/null +++ b/openapi/responses/processes-dru/rImmutableProcess.yaml @@ -0,0 +1,8 @@ +description: the processes is not mutable +content: + application/json: + schema: + $ref: ../../schemas/common-core/exception.yaml + text/html: + schema: + type: string \ No newline at end of file diff --git a/extensions/deploy_replace_undeploy/standard/openapi/schemas/executionUnit.yaml b/openapi/schemas/processes-dru/executionUnit.yaml similarity index 100% rename from extensions/deploy_replace_undeploy/standard/openapi/schemas/executionUnit.yaml rename to openapi/schemas/processes-dru/executionUnit.yaml diff --git a/openapi/schemas/processes-dru/ogcapppkg-array.yaml b/openapi/schemas/processes-dru/ogcapppkg-array.yaml new file mode 100644 index 00000000..8d143015 --- /dev/null +++ b/openapi/schemas/processes-dru/ogcapppkg-array.yaml @@ -0,0 +1,6 @@ +type: array +items: + oneOf: + - $ref: "executionUnit.yaml" + - $ref: "../common-core/link.yaml" + - $ref: "../processes-core/qualifiedInputValue.yaml" diff --git a/openapi/schemas/processes-dru/ogcapppkg.yaml b/openapi/schemas/processes-dru/ogcapppkg.yaml index f4ff463f..26a2acf4 100644 --- a/openapi/schemas/processes-dru/ogcapppkg.yaml +++ b/openapi/schemas/processes-dru/ogcapppkg.yaml @@ -3,47 +3,10 @@ required: - executionUnit properties: processDescription: - $ref: ../processes-core/process.yaml + $ref: "../processes-core/process.yaml" executionUnit: - description: Resource containing an executable or runtime information for executing the process. - type: array - minItems: 1 - items: - type: object - properties: - config: - description: Hardware requirements and configuration properties for executing the process. - properties: - cpuMin: - description: Minimum number of CPUs required to run the process (unit is - CPU core). - type: number - minValue: 1 - cpuMax: - description: Maximum number of CPU dedicated to the process (unit is CPU core) - type: number - memoryMin: - description: Minimum RAM memory required to run the application (unit is GB) - type: number - memoryMax: - description: Maximum RAM memory dedicated to the application (unit is GB) - type: number - storageTempMin: - description: Minimum required temporary storage size (unit is GB) - type: number - storageOutputsMin: - description: Minimum required output storage size (unit is GB) - type: number - jobTimeout: - description: Timeout delay for a job execution (in seconds) - type: number - additionalProperties: true - additionalProperties: true - example: - type: docker - image: mydocker/ndvi:latest - config: - cpuMin: 2 - cpuMax: 5 - memoryMin: 1 - memoryMax: 3 + oneOf: + - $ref: "executionUnit.yaml" + - $ref: "../common-core/link.yaml" + - $ref: "../processes-core/qualifiedInputValue.yaml" + - $ref: "ogcapppkg-array.yaml" \ No newline at end of file diff --git a/openapi/schemas/processes-dru/staticIndicator.yaml b/openapi/schemas/processes-dru/staticIndicator.yaml new file mode 100644 index 00000000..34f20d6c --- /dev/null +++ b/openapi/schemas/processes-dru/staticIndicator.yaml @@ -0,0 +1,7 @@ +allOf: + - $ref: ../processes-core/processSummary.yaml + - type: object + properties: + mutable: + type: boolean + default: true