From 68b793360c46a89c2870797454b41722cb1884c2 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Thu, 6 Jul 2023 10:36:06 -0400 Subject: [PATCH] fix minor JSON schema titles causing invalid ref definition names --- .../CatalogSearch/package.cwl | 90 +++++++++---------- weaver/wps_restapi/swagger_definitions.py | 5 +- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/tests/functional/application-packages/CatalogSearch/package.cwl b/tests/functional/application-packages/CatalogSearch/package.cwl index c6ae0f45c..d4233abef 100644 --- a/tests/functional/application-packages/CatalogSearch/package.cwl +++ b/tests/functional/application-packages/CatalogSearch/package.cwl @@ -1,51 +1,51 @@ { - "processDescription": { - "process": { - "id": "CatalogSearch", - "title": "Catalog Search for Thredds URLs", - "abstract": "Get files url from Thredds Catalog and provides file list as JSON Document.", - "keywords": [], - "inputs": [{ - "id": "url", - "title": "URL of the Catalog", - "formats": [ - { - "mimeType": "application/netcdf", - "default": true - }, - { - "mimeType": "application/xml", - "default": true - } - ], - "minOccurs": "1", - "maxOccurs": "1" - }], - "outputs": [ - { - "id": "output", - "title": "JSON file with Catalog URLs", - "formats": [ - { - "mimeType": "application/json", - "default": true - } - ] - } - ] - }, - "processVersion": "1.0.0", - "jobControlOptions": [ - "async-execute" + "processDescription": { + "process": { + "id": "CatalogSearch", + "title": "Catalog Search for Thredds URLs", + "abstract": "Get files url from Thredds Catalog and provides file list as JSON Document.", + "keywords": [ ], + "inputs": [ { + "id": "url", + "title": "URL of the Catalog", + "formats": [ + { + "mimeType": "application/netcdf", + "default": true + }, + { + "mimeType": "application/xml", + "default": true + } ], - "outputTransmission": [ - "value" - ] - }, - "executionUnit": [ + "minOccurs": "1", + "maxOccurs": "1" + } ], + "outputs": [ { - "href": "tests/functional/application-packages/CatalogSearch/package.cwl" + "id": "output", + "title": "JSON file with Catalog URLs", + "formats": [ + { + "mimeType": "application/json", + "default": true + } + ] } + ] + }, + "processVersion": "1.0.0", + "jobControlOptions": [ + "async-execute" ], - "deploymentProfileName": "http://www.opengis.net/profiles/eoc/wpsApplication" + "outputTransmission": [ + "value" + ] + }, + "executionUnit": [ + { + "href": "tests/functional/application-packages/CatalogSearch/package.cwl" + } + ], + "deploymentProfileName": "http://www.opengis.net/profiles/eoc/wpsApplication" } diff --git a/weaver/wps_restapi/swagger_definitions.py b/weaver/wps_restapi/swagger_definitions.py index 012c20fee..f846a706a 100644 --- a/weaver/wps_restapi/swagger_definitions.py +++ b/weaver/wps_restapi/swagger_definitions.py @@ -4613,7 +4613,6 @@ class CWLTypeList(ExtendedSequenceSchema): class CWLType(OneOfKeywordSchema): - title = "CWL Type" _one_of = [ CWLTypeBase(summary="CWL type definition."), CWLTypeList(summary="Combination of allowed CWL types."), @@ -4663,7 +4662,7 @@ class CWLInputItem(CWLInputObject): class CWLInputList(ExtendedSequenceSchema): - input = CWLInputItem(title="Input", description=f"Input specification. {CWL_DOC_MESSAGE}") + input = CWLInputItem(description=f"Input specification. {CWL_DOC_MESSAGE}") class CWLInputEmpty(EmptyMappingSchema): @@ -4729,7 +4728,7 @@ class CWLCommandParts(ExtendedSequenceSchema): class CWLCommand(OneOfKeywordSchema): _one_of = [ ExtendedSchemaNode(String(), title="String command."), - CWLCommandParts(title="Command Parts") + CWLCommandParts(title="CommandParts", summary="Command Parts") ]