diff --git a/CHANGES.rst b/CHANGES.rst index 281639ae9..3711e28f9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,7 +16,10 @@ Changes: Fixes: ------ -- No change. +- Add missing conformance and requirement references for *OGC API - Processes - Part 2: DRU* + (fixes `##620 `_). +- Add the appropriate HTTP error type to respect ``/conf/dru/deploy/unsupported-content-type`` + (fixes `#624 `_). .. _changes_5.9.0: diff --git a/weaver/wps_restapi/api.py b/weaver/wps_restapi/api.py index a736df12b..c0cbb4d8d 100644 --- a/weaver/wps_restapi/api.py +++ b/weaver/wps_restapi/api.py @@ -395,16 +395,12 @@ def get_conformance(category, settings): # f"{ogcapi_proc_part2}/conf/docker/deploy/body", # f"{ogcapi_proc_part2}/conf/docker/replace/body", f"{ogcapi_proc_part2}/conf/dru", - # FIXME: https://github.com/crim-ca/weaver/issues/624 - # f"{ogcapi_proc_part2}/conf/dru/deploy/content-type", + f"{ogcapi_proc_part2}/conf/dru/deploy/content-type", f"{ogcapi_proc_part2}/conf/dru/deploy/post-op", - # FIXME: https://github.com/crim-ca/weaver/issues/624 - # f"{ogcapi_proc_part2}/conf/dru/deploy/unsupported-content-type", - # FIXME: https://github.com/crim-ca/weaver/issues/624 - # f"{ogcapi_proc_part2}/conf/dru/replace/content-type", + f"{ogcapi_proc_part2}/conf/dru/deploy/unsupported-content-type", + f"{ogcapi_proc_part2}/conf/dru/replace/content-type", f"{ogcapi_proc_part2}/conf/dru/replace/put-op", - # FIXME: https://github.com/crim-ca/weaver/issues/624 - # f"{ogcapi_proc_part2}/conf/dru/replace/unsupported-content-type", + f"{ogcapi_proc_part2}/conf/dru/replace/unsupported-content-type", f"{ogcapi_proc_part2}/conf/dru/undeploy/delete-op", f"{ogcapi_proc_part2}/conf/dru/undeploy/response-immutable-success", f"{ogcapi_proc_part2}/conf/dru/undeploy/response-immutable", @@ -414,6 +410,7 @@ def get_conformance(category, settings): f"{ogcapi_proc_part2}/conf/dru/static-indicator", f"{ogcapi_proc_part2}/conf/dru/test-process", f"{ogcapi_proc_part2}/conf/dru/test-process", + f"{ogcapi_proc_part2}/conf/deploy-replace-undeploy", f"{ogcapi_proc_part2}/conf/ogcapppkg", f"{ogcapi_proc_part2}/conf/ogcapppkg/deploy/body", f"{ogcapi_proc_part2}/conf/ogcapppkg/deploy/response", @@ -421,6 +418,15 @@ def get_conformance(category, settings): f"{ogcapi_proc_part2}/conf/ogcapppkg/deploy/response-success", f"{ogcapi_proc_part2}/conf/ogcapppkg/replace/body", f"{ogcapi_proc_part2}/conf/ogcapppkg/replace/response", + f"{ogcapi_proc_part2}/req/cwl", + f"{ogcapi_proc_part2}/req/cwl/execution-unit", + f"{ogcapi_proc_part2}/req/cwl/deploy/body", + # FIXME: multi-CWL $graph (class: Workflow), must allow section of 1 with 'w' query param + # (https://github.com/crim-ca/weaver/issues/739) + # f"{ogcapi_proc_part2}/req/cwl/deploy/w-param", + # f"{ogcapi_proc_part2}/req/cwl/deploy/exception-workflow-not-found", + f"{ogcapi_proc_part2}/req/cwl/package/response-body", + f"{ogcapi_proc_part2}/req/cwl/replace/body", f"{ogcapi_proc_part2}/per/deploy-replace-undeploy/replace/body", f"{ogcapi_proc_part2}/rec/deploy-replace-undeploy/deploy/body-ogcapppkg", f"{ogcapi_proc_part2}/rec/deploy-replace-undeploy/replace/body-ogcapppkg", @@ -431,19 +437,28 @@ def get_conformance(category, settings): f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/deploy/response-body", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/deploy/response-pid", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/deploy/response", + f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/deploy/unsupported-content-type", + f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/package/get-op", + f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/package/response-body", + f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/package/response-success", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/replace/body", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/replace/content-type", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/replace/put-op", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/replace/response", + f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/replace/unsupported-content-type", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/static/indicator", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/undeploy/delete-op", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/undeploy/response", f"{ogcapi_proc_part2}/req/deploy-replace-undeploy/ogcapppkg", + f"{ogcapi_proc_part2}/req/dru/mutable-process", f"{ogcapi_proc_part2}/req/dru/test-process", f"{ogcapi_proc_part2}/req/ogcapppkg", + f"{ogcapi_proc_part2}/req/ogcapppkg/deploy/body", f"{ogcapi_proc_part2}/req/ogcapppkg/execution-unit-docker", + f"{ogcapi_proc_part2}/req/ogcapppkg/package/response-body", f"{ogcapi_proc_part2}/req/ogcapppkg/process-description", f"{ogcapi_proc_part2}/req/ogcapppkg/profile-docker", + f"{ogcapi_proc_part2}/req/ogcapppkg/replace/body", f"{ogcapi_proc_part2}/req/ogcapppkg/schema", # FIXME: below partially, for full Part 3, would need $graph support # (see https://github.com/crim-ca/weaver/issues/56 and below '/conf/app-pck/cwl') diff --git a/weaver/wps_restapi/utils.py b/weaver/wps_restapi/utils.py index f69eba78e..8cc695951 100644 --- a/weaver/wps_restapi/utils.py +++ b/weaver/wps_restapi/utils.py @@ -217,7 +217,7 @@ def parse_content(request=None, # type: except colander.Invalid as exc: raise HTTPUnsupportedMediaType(json={ "title": "Unsupported Media Type", - "type": "UnsupportedMediaType", + "type": "http://www.opengis.net/def/exceptions/ogcapi-processes-2/1.0/unsupported-media-type", "detail": str(exc), "status": HTTPUnsupportedMediaType.code, "cause": {"Content-Type": None if content_type is None else str(content_type)},