Skip to content

Commit 2043789

Browse files
committed
update conformance classes and filter-lang
1 parent 54f8501 commit 2043789

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

pygeoapi/api/itemtypes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@
8484
'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/queryables-query-parameters', # noqa
8585
'http://www.opengis.net/spec/ogcapi-features-4/1.0/conf/create-replace-delete', # noqa
8686
'http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/schemas',
87-
'http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/core-roles-features' # noqa
87+
'http://www.opengis.net/spec/ogcapi-features-5/1.0/conf/core-roles-features', # noqa
88+
'http://www.opengis.net/spec/cql2/1.0/conf/cql2-text',
89+
'http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2'
90+
8891
]
8992

9093
CONFORMANCE_CLASSES_RECORDS = [
@@ -522,8 +525,8 @@ def get_collection_items(
522525

523526
LOGGER.debug('Processing filter-lang parameter')
524527
filter_lang = request.params.get('filter-lang')
525-
# Currently only cql-text is handled, but it is optional
526-
if filter_lang not in [None, 'cql-json', 'cql-text']:
528+
filter_langs = [None, 'cql-json', 'cql-text', 'cql2-text', 'cql2-json']
529+
if filter_lang not in filter_langs:
527530
msg = 'Invalid filter language'
528531
return api.get_exception(
529532
HTTPStatus.BAD_REQUEST, headers, request.format,

tests/api/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def test_conformance(config, api_):
589589

590590
assert isinstance(root, dict)
591591
assert 'conformsTo' in root
592-
assert len(root['conformsTo']) == 42
592+
assert len(root['conformsTo']) == 44
593593
assert 'http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs' \
594594
in root['conformsTo']
595595

0 commit comments

Comments
 (0)