Do not require links in process metadata (#1284)

* Move get_manager to base module

* Process manager now knows about existing processes

* Guard API from manager.get_job() errors

* Guard API from job-related errors

* moved process-related exceptions to pygeoapi.process.base

* manager is now responsible for instantiating a processor

* Guard API from manager.get_job() errors

* Guard API from job-related errors

* made process description links optional

* removed duplicated exception class

* Removed process.exceptions module, which got accidentally reintroduced after a rebase

---------

Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
This commit is contained in:
Ricardo Garcia Silva
2023-07-03 11:32:35 +01:00
committed by GitHub
parent 44768fc488
commit 2def8e5e47
+5 -3
View File
@@ -1140,10 +1140,12 @@ def get_oas_30(cfg):
'description': md_desc, # noqa
'externalDocs': {}
}
for link in l10n.translate(p.metadata['links'], locale_):
for link in p.metadata.get('links', []):
if link['type'] == 'information':
tag['externalDocs']['description'] = link['type']
tag['externalDocs']['url'] = link['url']
translated_link = l10n.translate(link, locale_)
tag['externalDocs']['description'] = translated_link[
'type']
tag['externalDocs']['url'] = translated_link['url']
break
if len(tag['externalDocs']) == 0:
del tag['externalDocs']