From 2c0d1d8d0964d534a429b3b3bb224e2cd07811be Mon Sep 17 00:00:00 2001 From: Sarah Jordan Date: Tue, 24 Dec 2024 09:23:52 -0600 Subject: [PATCH] updates for parsing with stac browser change type to application/json and parse id from jsondata --- pygeoapi/provider/hateoas.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygeoapi/provider/hateoas.py b/pygeoapi/provider/hateoas.py index cc3ad5285..dfb98123f 100644 --- a/pygeoapi/provider/hateoas.py +++ b/pygeoapi/provider/hateoas.py @@ -120,7 +120,7 @@ def get_data_path(self, baseurl, urlpath, entrypath): try: jsondata = _get_json_data(f'{data_path}/collection.json') resource_type = 'Collection' - for key in ['license', 'extent']: + for key in ['license', 'extent', 'id']: if key in jsondata: content[key] = jsondata[key] except Exception: @@ -151,7 +151,7 @@ def get_data_path(self, baseurl, urlpath, entrypath): child_links.append({ 'rel': 'child', 'href': newpath, - 'type': 'text/html', + 'type': 'application/json', 'created': "-", 'entry:type': 'Catalog' }) @@ -159,7 +159,7 @@ def get_data_path(self, baseurl, urlpath, entrypath): child_links.append({ 'rel': 'child', 'href': newpath, - 'type': 'text/html', + 'type': 'application/json', 'created': "-", 'entry:type': 'Collection' })