From 2caec2b24014a71a6c83a0fa50551678643426d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Fenoy?= Date: Fri, 26 Apr 2024 12:40:16 +0200 Subject: [PATCH 1/2] Fix issue #282 Add /processes/{processId}/package path for accessing the formal description used to deploy a process Add specific recommendations and requirements for OGC Application Package and CWL conformance classes --- .../package/REC_response-cwl.adoc | 9 +++++++ .../package/REC_response-ogcapppkg.adoc | 8 ++++++ .../cwl/package/REQ_response-body.adoc | 10 ++++++++ .../package/REQ_get-op.adoc | 9 +++++++ .../package/REQ_response-body.adoc | 7 ++++++ .../package/REQ_response-success.adoc | 7 ++++++ .../ogcapppkg/package/REQ_response-body.adoc | 7 ++++++ .../clause_6_deploy_replace_undeploy.adoc | 25 +++++++++++++++++++ .../standard/sections/clause_7_apppkg.adoc | 6 +++++ .../standard/sections/clause_9_cwl.adoc | 5 ++++ openapi/paths/processes-dru/pPackage.yaml | 25 +++++++++++++++++++ 11 files changed, 118 insertions(+) create mode 100644 extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-cwl.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-ogcapppkg.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/requirements/cwl/package/REQ_response-body.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-body.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-success.adoc create mode 100644 extensions/deploy_replace_undeploy/standard/requirements/ogcapppkg/package/REQ_response-body.adoc create mode 100644 openapi/paths/processes-dru/pPackage.yaml diff --git a/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-cwl.adoc b/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-cwl.adoc new file mode 100644 index 00000000..8ff745f3 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-cwl.adoc @@ -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 <>, implementations SHOULD consider supporting the <> encoding. + +==== diff --git a/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-ogcapppkg.adoc b/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-ogcapppkg.adoc new file mode 100644 index 00000000..0de7b211 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/recommendations/deploy-replace-undeploy/package/REC_response-ogcapppkg.adoc @@ -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 <>, implementations SHOULD consider supporting the <> encoding. +==== diff --git a/extensions/deploy_replace_undeploy/standard/requirements/cwl/package/REQ_response-body.adoc b/extensions/deploy_replace_undeploy/standard/requirements/cwl/package/REQ_response-body.adoc new file mode 100644 index 00000000..b7cdf0f3 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/requirements/cwl/package/REQ_response-body.adoc @@ -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 <> to use to deploy the process, in case the Content-Type used to deploy the process was `application/cwl`. + * the <> to use to deploy the process, in case the Content-Type used to deploy the process was `application/ogcapppkg+json`. + +==== diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc new file mode 100644 index 00000000..5957afa0 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc @@ -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 (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`). + +==== diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-body.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-body.adoc new file mode 100644 index 00000000..0305cf17 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-body.adoc @@ -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. +==== diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-success.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-success.adoc new file mode 100644 index 00000000..feaa48a2 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_response-success.adoc @@ -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`. +==== diff --git a/extensions/deploy_replace_undeploy/standard/requirements/ogcapppkg/package/REQ_response-body.adoc b/extensions/deploy_replace_undeploy/standard/requirements/ogcapppkg/package/REQ_response-body.adoc new file mode 100644 index 00000000..dd6374d8 --- /dev/null +++ b/extensions/deploy_replace_undeploy/standard/requirements/ogcapppkg/package/REQ_response-body.adoc @@ -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 <> to use to deploy the process. +==== diff --git a/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc b/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc index d6545274..6250eeb4 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc @@ -257,3 +257,28 @@ See <> 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 <>. If the process exist but is immutable then <> applies. + +[[deploy-replace-undeploy-package]] +=== Retrieving the formal description + +For every process deployed to the server, 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 <> 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 <>. + +If the process exist but is immutable then <> applies. 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 54e35023..452dd803 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/clause_7_apppkg.adoc @@ -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[] \ No newline at end of file diff --git a/extensions/deploy_replace_undeploy/standard/sections/clause_9_cwl.adoc b/extensions/deploy_replace_undeploy/standard/sections/clause_9_cwl.adoc index 13bd9782..92b35bb7 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/clause_9_cwl.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/clause_9_cwl.adoc @@ -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[] \ No newline at end of file diff --git a/openapi/paths/processes-dru/pPackage.yaml b/openapi/paths/processes-dru/pPackage.yaml new file mode 100644 index 00000000..c95127ca --- /dev/null +++ b/openapi/paths/processes-dru/pPackage.yaml @@ -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-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" + 404: + $ref: "../../responses/common-core/rNotFound.yaml" \ No newline at end of file From 346a71cdc91a8f498bad21f0a7c2272b3cf7b941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Fenoy?= Date: Mon, 29 Apr 2024 14:50:22 +0200 Subject: [PATCH 2/2] Updates following comments from @fmigneault, jerstlouis and pvretano --- .../deploy-replace-undeploy/package/REQ_get-op.adoc | 2 +- .../standard/sections/annex_history.adoc | 1 + .../standard/sections/clause_6_deploy_replace_undeploy.adoc | 2 +- openapi/paths/processes-dru/pPackage.yaml | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc index 5957afa0..10e72e92 100644 --- a/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc +++ b/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/package/REQ_get-op.adoc @@ -3,7 +3,7 @@ ==== [%metadata] label:: /req/deploy-replace-undeploy/package/get-op -part:: For every dynamically added process (path: /processes/{processId}), the server SHALL support the HTTP GET operation at the path `/processes/{processId}/package`. +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`). ==== diff --git a/extensions/deploy_replace_undeploy/standard/sections/annex_history.adoc b/extensions/deploy_replace_undeploy/standard/sections/annex_history.adoc index 4954565a..d3ee393d 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/annex_history.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/annex_history.adoc @@ -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 |=== diff --git a/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc b/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc index 6250eeb4..87a8fd7f 100644 --- a/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc +++ b/extensions/deploy_replace_undeploy/standard/sections/clause_6_deploy_replace_undeploy.adoc @@ -261,7 +261,7 @@ If the process exist but is immutable then <