-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change GeoJSON to be used for f=json, add f=elastic-json for old format #119
Conversation
@josegar74 @fxprunayre - I will merge this thursday (after the geojson changes). |
@@ -55,5 +58,6 @@ public GnMediaType(String type) { | |||
APPLICATION_GN_XML = new MediaType("application", "gn+xml"); | |||
APPLICATION_JSON_LD = new MediaType("application", "ld+json"); | |||
APPLICATION_GEOJSON = new MediaType("application", "geo+json"); | |||
APPLICATION_ELASTICJSON = new MediaType("application", "elastic+json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPLICATION_ELASTICJSON = new MediaType("application", "elastic+json"); | |
APPLICATION_ELASTICJSON = new MediaType("application", "gnindex+json"); |
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @fxprunayre - I've changed it to "gnindex+json".
Thanks for the review - its really really helpful!
Quality Gate passedIssues Measures |
The OGCAPI-Records spec says to use GeoJSON for
/collections/<collectionId>/items
and/collections/<collectionId>/items/<itemId>
responses.This PR changes the current default (the underlying Elastic Search results) and, instead, uses GeoJSON.
I've also added a
f=elastic-json
for the old behaviour. This shouldn't be used, and will be removes in the future. However, I don't want to remove it now since people might be relying on it, and its useful for debugging.Also, see #118 for improvements to the GeoJSON output.