This PR changes the default response type of /api/v2/observations/stations (AKA the stations list endpoint) to be a GeoJSON feature collection.
The proposed implementation makes the default response media type be application/geo+json. It is still possible to get the previous response type by simply passing the accept header Accept: application/json - we can decide later if it is worth keeping the plain JSON response or just have the GeoJSON.
The response payload is modeled after the response produced by pygeoapi's collection items endpoint for OGC API Features, with some small tweaks:
renamed numberMatched and numberReturned to number_matched and number_returned
added number_total
for brevity, the main links contents is an object of simple key: value links, we may change to a list of proper Link types later
added links to each feature
Example request using the httpie client (the limit query parameter is passed just for getting a small response that I can paste here:
This PR changes the default response type of
/api/v2/observations/stations
(AKA the stations list endpoint) to be a GeoJSON feature collection.The proposed implementation makes the default response media type be
application/geo+json
. It is still possible to get the previous response type by simply passing the accept headerAccept: application/json
- we can decide later if it is worth keeping the plain JSON response or just have the GeoJSON.The response payload is modeled after the response produced by pygeoapi's collection items endpoint for OGC API Features, with some small tweaks:
numberMatched
andnumberReturned
tonumber_matched
andnumber_returned
number_total
links
contents is an object of simplekey: value
links, we may change to a list of properLink
types laterlinks
to each featureExample request using the httpie client (the
limit
query parameter is passed just for getting a small response that I can paste here:and corresponding response