nlsfi / hakunapi

OGC API Features Java server
https://github.com/nlsfi/hakunapi
MIT License
12 stars 3 forks source link

force json based outputformats when none specified #87

Closed nls-jajuko closed 10 months ago

nls-jajuko commented 10 months ago

Force json based outputformats when none specified in request f parameter or accept header

There is some randomness in Jersey request matching when request has not specified any output format - sometimes html and other times json responses.

Added force to GlobalFQueryFilter with a supporting class MediaTypes with some constants for output formats.

Other approach would be to include qs q-values : https://jakarta.ee/specifications/restful-ws/3.1/jakarta-restful-ws-spec-3.1.html#selecting_from_multiple_media_types

jampukka commented 10 months ago

Looks good to me