Skip to content

Commit

Permalink
Merge pull request #404 from GeoLabs/features/fix-issue-282
Browse files Browse the repository at this point in the history
Fix issue #282
  • Loading branch information
bpross-52n committed Jun 10, 2024
2 parents c6411e6 + 346a71c commit 1df9bb7
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[rec_deploy-replace-undeploy_package_response-cwl]]
[recommendation]
====
[%metadata]
label:: /rec/deploy-replace-undeploy/package/response-cwl
part:: If a process deployed as a <<rc_cwl,CWL>>, implementations SHOULD consider supporting the <<rc_cwl,CWL>> encoding.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rec_deploy-replace-undeploy_package_response-ogcapppkg]]
[recommendation]
====
[%metadata]
label:: /rec/deploy-replace-undeploy/package/response-ogcapppkg
part:: If a process was deployed as an <<rc_ogcapppkg,OGC Application Package>>, implementations SHOULD consider supporting the <<rc_ogcapppkg,OGC Application Package>> encoding.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[req_cwl_package_response-body]]
[requirement]
====
[%metadata]
label:: /req/cwl/package/response-body
part:: A response with HTTP status code `200` SHALL include a body that contains:
* the <<rc_cwl,CWL>> to use to deploy the process, in case the Content-Type used to deploy the process was `application/cwl`.
* the <<rc_ogcapppkg,OGC Application Package>> to use to deploy the process, in case the Content-Type used to deploy the process was `application/ogcapppkg+json`.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[req_deploy-replace-undeploy_package_get-op]]
[requirement]
====
[%metadata]
label:: /req/deploy-replace-undeploy/package/get-op
part:: For every dynamically added process (using method: POST on path: /processes/{processId}), the server SHALL support the HTTP GET operation at the path `/processes/{processId}/package`.
part:: The parameter `processId` is each `id` property in the process collection response (JSONPath: `$.processes[*].id`).
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_deploy-replace-undeploy_package_response-body]]
[requirement]
====
[%metadata]
label:: /req/deploy-replace-undeploy/package/response-body
part:: A response with HTTP status code `200` SHALL include a body that contains the request body used to deploy or replace the process.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_deploy-replace-undeploy_package_response-success]]
[requirement]
====
[%metadata]
label:: /req/deploy-replace-undeploy/package/response-success
part:: A successful access to the resource SHALL be reported as a response with a HTTP status code `200`.
====
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_ogcapppkg_package_response-body]]
[requirement]
====
[%metadata]
label:: /req/ogcapppkg/package/response-body
part:: A response with HTTP status code `200` SHALL include a body that contains the <<rc_ogcapppkg,OGC Application Package>> to use to deploy the process.
====
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
|2023-12-06 |None |Gérald Fenoy |all |Abstract Test Suite Updates
|2023-12-07 |None |Gérald Fenoy |all |Fix mixed status code and value in security consideration
|2023-12-08 |None |Gérald Fenoy |all |Add requirements for managing docker image as execution unit
|2024-04-26 |None |Gérald Fenoy |all |Add section for retrieving formal description of a mutable process
|===
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,28 @@ See <<deploy-replace-undeploy-http_status_codes,HTTP status codes>> for general
If the process with the specified identifier does not exist on the server, see requirement /req/core/process-exception/no-such-process from <<OAProc-1>>.

If the process exist but is immutable then <<req_deploy-replace-undeploy_deploy_response-immutable,/req/deploy-replace-undeploy/deploy/response-immutable>> applies.

[[deploy-replace-undeploy-package]]
=== Retrieving the formal description

For every mutable process, it is possible to retrieve its formal description. It corresponds to the request's body used to deploy or replace the process.

==== Operation

include::../requirements/deploy-replace-undeploy/package/REQ_get-op.adoc[]

==== Response

===== Overview

include::../requirements/deploy-replace-undeploy/package/REQ_response-success.adoc[]

include::../requirements/deploy-replace-undeploy/package/REQ_response-body.adoc[]

==== Exceptions

See <<deploy-replace-undeploy-http_status_codes,HTTP status codes>> for general guidance.

If the process with the specified identifier does not exist on the server, see requirement /req/core/process-exception/no-such-process from <<OAProc-1>>.

If the process exist but is immutable then <<req_deploy-replace-undeploy_deploy_response-immutable,/req/deploy-replace-undeploy/deploy/response-immutable>> applies.
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,9 @@ include::../requirements/ogcapppkg/deploy/REQ_body.adoc[]
==== OGC Application Package body

include::../requirements/ogcapppkg/replace/REQ_body.adoc[]

=== Formal description

==== OGC Application Package content

include::../requirements/ogcapppkg/package/REQ_response-body.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ include::../requirements/cwl/deploy/REQ_exception-workflow-not-found.adoc[]

include::../requirements/cwl/replace/REQ_body.adoc[]

=== Formal description

==== CWL content

include::../requirements/cwl/package/REQ_response-body.adoc[]
25 changes: 25 additions & 0 deletions openapi/paths/processes-dru/pPackage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
get:
summary: retrieve the formal description used to deploy a process
description: |
Access the formal description that can be used to deploy a process on an OGC API - Processes Server Instance.
operationId: getPackage
tags:
- Package
responses:
200:
description: The formal used to deploy a process
content:
application/ogcapppkg+json:
schema:
$ref: "../../schemas/processes-dru/ogcapppkg.yaml"
application/cwl:
schema:
$ref: "https://raw.githubusercontent.com/common-workflow-lab/cwl-ts-auto/main/json_schemas/cwl_schema.yaml"
application/cwl+json:
schema:
$ref: "https://raw.githubusercontent.com/common-workflow-lab/cwl-ts-auto/main/json_schemas/cwl_schema.yaml"
application/cwl+yaml:
schema:
$ref: "https://raw.githubusercontent.com/common-workflow-lab/cwl-ts-auto/main/json_schemas/cwl_schema.yaml"
404:
$ref: "../../responses/common-core/rNotFound.yaml"

0 comments on commit 1df9bb7

Please sign in to comment.