Describe required collection level metadata about EDR Queries (#1744)

* Add data_queries to describe EDR Queries

* Fix flake8

* Use covjson media type

* Update pygeoapi-config-0.x.yml

Update schema definition to match https://schemas.opengis.net/ogcapi/edr/1.1/openapi/schemas/collections/extent.yaml

* Add data_queries to describe EDR Queries

* Fix flake8

* Use covjson media type

* Update pygeoapi-config-0.x.yml

Update schema definition to match https://schemas.opengis.net/ogcapi/edr/1.1/openapi/schemas/collections/extent.yaml

* Enable query type registration

* Update base_edr.py

* Add GeoJSON as a valid response type

* Preserve query_types as list

* Revert changes to min required by EDR spec
This commit is contained in:
Benjamin Webb
2024-07-24 18:25:23 -04:00
committed by GitHub
parent 6c538ca330
commit 3adfdb2341
+9
View File
@@ -1209,6 +1209,7 @@ class API:
if edr:
# TODO: translate
LOGGER.debug('Adding EDR links')
collection['data_queries'] = {}
parameters = p.get_fields()
if parameters:
collection['parameter_names'] = {}
@@ -1229,6 +1230,14 @@ class API:
}
for qt in p.get_query_types():
data_query = {
'link': {
'href': f'{self.get_collections_url()}/{k}/{qt}',
'rel': 'data'
}
}
collection['data_queries'][qt] = data_query
title1 = l10n.translate('query for this collection as JSON', request.locale) # noqa
title1 = f'{qt} {title1}'
title2 = l10n.translate('query for this collection as HTML', request.locale) # noqa