Skip to content

Commit f5f89f4

Browse files
committed
address PR comments
1 parent a743a0e commit f5f89f4

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/source/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ default.
258258
storage_crs_coordinate_epoch: 2017.23 # optional, if storage_crs is a dynamic coordinate reference system
259259
always_xy: false # optional should CRS respect axis ordering
260260
formatters: # list of 1..n formatter definitions
261-
- name: path.to.formatter
261+
- name: path.to.formatter # Python path of formatter definition
262262
attachment: true # whether or not to provide as an attachment or normal response
263-
geom: False # whether or not to include geometry
263+
geom: false # whether or not to include geometry
264264
265265
hello-world: # name of process
266266
type: process # REQUIRED (collection, process, or stac-collection)

pygeoapi/api/itemtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Colin Blackburn <[email protected]>
88
# Ricardo Garcia Silva <[email protected]>
99
#
10-
# Copyright (c) 2025 Tom Kralidis
10+
# Copyright (c) 2026 Tom Kralidis
1111
# Copyright (c) 2025 Francesco Bartoli
1212
# Copyright (c) 2022 John A Stevenson and Colin Blackburn
1313
# Copyright (c) 2023 Ricardo Garcia Silva
@@ -670,7 +670,7 @@ def get_collection_items(
670670
content, request.locale)
671671
return headers, HTTPStatus.OK, content
672672
elif request.format in [df.f for df in dataset_formatters.values()]:
673-
formatter = [v for k, v in dataset_formatters.items() if
673+
formatter = [v for v in dataset_formatters.values() if
674674
v.f == request.format][0]
675675

676676
try:

pygeoapi/formatter/base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Authors: Tom Kralidis <[email protected]>
44
#
5-
# Copyright (c) 2022 Tom Kralidis
5+
# Copyright (c) 2026 Tom Kralidis
66
#
77
# Permission is hereby granted, free of charge, to any person
88
# obtaining a copy of this software and associated documentation
@@ -47,7 +47,11 @@ def __init__(self, formatter_def: dict):
4747
self.extension = None
4848
self.mimetype = None
4949

50-
self.name = formatter_def['name']
50+
try:
51+
self.name = formatter_def['name']
52+
except KeyError:
53+
raise RuntimeError('name is required')
54+
5155
self.geom = formatter_def.get('geom', False)
5256
self.attachment = formatter_def.get('attachment', False)
5357

0 commit comments

Comments
 (0)