Skip to content

Commit 6aa67b4

Browse files
authored
updates for parsing with stac browser (#1890)
change type to application/json and parse id from jsondata
1 parent c379f22 commit 6aa67b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pygeoapi/provider/hateoas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def get_data_path(self, baseurl, urlpath, entrypath):
120120
try:
121121
jsondata = _get_json_data(f'{data_path}/collection.json')
122122
resource_type = 'Collection'
123-
for key in ['license', 'extent']:
123+
for key in ['license', 'extent', 'id']:
124124
if key in jsondata:
125125
content[key] = jsondata[key]
126126
except Exception:
@@ -151,15 +151,15 @@ def get_data_path(self, baseurl, urlpath, entrypath):
151151
child_links.append({
152152
'rel': 'child',
153153
'href': newpath,
154-
'type': 'text/html',
154+
'type': 'application/json',
155155
'created': "-",
156156
'entry:type': 'Catalog'
157157
})
158158
elif entry_type == 'collection.json':
159159
child_links.append({
160160
'rel': 'child',
161161
'href': newpath,
162-
'type': 'text/html',
162+
'type': 'application/json',
163163
'created': "-",
164164
'entry:type': 'Collection'
165165
})

0 commit comments

Comments
 (0)