From 12b2fa89356c3c213540faa33d57b5a019dd6a8e Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 24 Apr 2023 03:13:48 -0400 Subject: [PATCH] update OAFeat Part 3 based on specification updates (#1223) --- pygeoapi/api.py | 8 +++++--- tests/test_api.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index 0f582ea..7ea08dd 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -124,6 +124,8 @@ CONFORMANCE = { 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html', 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson', 'http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs', + 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/queryables', + 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/queryables-query-parameters', # noqa 'http://www.opengis.net/spec/ogcapi-features-4/1.0/conf/create-replace-delete' # noqa ], 'coverage': [ @@ -1010,14 +1012,14 @@ class API: collection['itemType'] = collection_data_type LOGGER.debug('Adding feature/record based links') collection['links'].append({ - 'type': FORMAT_TYPES[F_JSON], - 'rel': 'queryables', + 'type': 'application/schema+json', + 'rel': 'http://www.opengis.net/def/rel/ogc/1.0/queryables', 'title': 'Queryables for this collection as JSON', 'href': f'{self.get_collections_url()}/{k}/queryables?f={F_JSON}' # noqa }) collection['links'].append({ 'type': FORMAT_TYPES[F_HTML], - 'rel': 'queryables', + 'rel': 'http://www.opengis.net/def/rel/ogc/1.0/queryables', 'title': 'Queryables for this collection as HTML', 'href': f'{self.get_collections_url()}/{k}/queryables?f={F_HTML}' # noqa }) diff --git a/tests/test_api.py b/tests/test_api.py index 1ef68e0..38a291f 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -607,7 +607,7 @@ def test_conformance(config, api_): assert isinstance(root, dict) assert 'conformsTo' in root - assert len(root['conformsTo']) == 23 + assert len(root['conformsTo']) == 25 assert 'http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs' \ in root['conformsTo']