Commit 5025db3
committed
PB-1677: Advertise /search as geo+json
Just having it as `application/json` prevents the STAC Browser from
making use of the search functionality. The STAC Browser only shows:
> Item Search is not supported by this API
And indeed, the STAC specs require the Media Type `application/geo+json`
for [the /search link
relation](https://github.com/radiantearth/stac-api-spec/blob/release/v1.0.0/item-search/README.md?plain=1#L62).
This isn't visible on the deployed STAC Browser because on the deploy
branch `geoadmin_master` there is a fix (`preprocessSTAC`) for this that
replaces the `application/json` with `application/geo+json` on the
browser side, see [this
commit](geoadmin/stac-browser@dae6a0e).
There is a branch `fix_PB-1550_remove_obsolete_preconditioning_hook`
where this was removed again (see [this
commit](geoadmin/stac-browser@30e708a))
but it was never merged.
The browser-side fix, however, is not there on the `main` branch that I
used for local testing. So I noticed that the link relation for /search
is wrong and thus propose the fix here.
It will anyway be probably be nessary for when we use an up-to-date
version of the STAC Browser, see PB-2381. Ideally we would get rid of
the `preprocessSTAC` in the old STAC browser but we can also just throw
it away in the course of updating to the new browser. As I understand
it, `preprocessSTAC` will work no matter what media type it gets.1 parent cb88411 commit 5025db3
4 files changed
Lines changed: 5 additions & 5 deletions
File tree
- app/stac_api/serializers
- spec
- components
- static/spec/v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
0 commit comments