Clean up links on created collections and items
jisantuc opened this issue · 0 comments
Describe the bug
When you create a collection, we know where its items
link will live, but we don't include a link for it on the collection. That's a drag, since it means that you have to know the structure of STAC APIs to get to it if it's not already on the collection. We should create that one.
Also, for the self
link, we don't url encode the collection id, so you can end up with a link like "http://localhost:9090/collections/my collection"
in the response, which is not useful (you can't click on it because link inference, for FF at least, dies on the space).
Similarly, for items, the created item doesn't get a self
link, which is bad since it would be nice to log that or return that so users can figure out where to find their item.
Also, creating an item in a collection doesn't seem to url decode the collection ID, which leads to some annoying mismatches / request failures.
We should be better about all of these things.