Skip to content
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

Update Input model for bulk insert or clarify docstring! #196

Closed
vincentsarago opened this issue Jul 26, 2021 · 3 comments
Closed

Update Input model for bulk insert or clarify docstring! #196

vincentsarago opened this issue Jul 26, 2021 · 3 comments
Assignees

Comments

@vincentsarago
Copy link
Member

The current input model for the bulk extension is a bit unclear to me. Reading

class Items(BaseModel):
"""A list of STAC items."""
items: Dict[str, Any]
def __iter__(self):
"""Return an iterable of STAC items."""
return iter(self.items)

It seems that we have to provide input in form of

{
    "items": {
        "id1": { item1 },
        "id2": { item2 },
        "id3": { item1 }
    }
}

This is kinda weird, and I was expecting to just be able to profile something closer to [item1, item2, item3] 🤷

If the dict form is going to stay, I think we should at least update the doc string (and remove the word list)

cc @geospatial-jeff

@philvarner
Copy link
Collaborator

We could also remove this entirely, and add support (currently missing, and therefore out of compliance with the Transaction Extension) for POST /collection/{cid}/items with an ItemCollection body.

@geospatial-jeff
Copy link
Collaborator

We could also remove this entirely, and add support (currently missing, and therefore out of compliance with the Transaction Extension) for POST /collection/{cid}/items with an ItemCollection body.

I think this is a really good idea.

@geospatial-jeff
Copy link
Collaborator

Fixed w/ #358 #367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants