You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The search sortby parameter is typed as List[str], I assume expecting a GET value like +datetime,-eo:cloud_cover to be passed.
However, when doing POST search, the server must be a list of sort objects, e.g.,
When running this query, the failure message is because it's putting a string value for sortby (or a list?) but then pydantic validation is expecting a dict:
$ stac-client search https://planetarycomputer.microsoft.com/api/stac/v1 -c sentinel-2-l2a --bbox -72.5 40.5 -72 41 --sortby '+properties.datetime' --method POST
1 validation error for Request
body -> sortby -> 0
value is not a valid dict (type=type_error.dict)
I think the correct thing to do is for the type to be Union[List[str], List[Dict[str,str]] ], and then have a dynamic check for the type in the list depending on if GET or POST is being used.
The text was updated successfully, but these errors were encountered:
The search sortby parameter is typed as List[str], I assume expecting a GET value like
+datetime,-eo:cloud_cover
to be passed.However, when doing POST search, the server must be a list of sort objects, e.g.,
When running this query, the failure message is because it's putting a string value for sortby (or a list?) but then pydantic validation is expecting a dict:
I think the correct thing to do is for the type to be
Union[List[str], List[Dict[str,str]] ]
, and then have a dynamic check for the type in the list depending on if GET or POST is being used.The text was updated successfully, but these errors were encountered: