diff --git a/stac-api/src/search.rs b/stac-api/src/search.rs index ac06db37..3a482fd3 100644 --- a/stac-api/src/search.rs +++ b/stac-api/src/search.rs @@ -41,11 +41,11 @@ pub struct GetSearch { #[serde(skip_serializing_if = "Option::is_none")] pub intersects: Option, - /// Array of Item ids to return. + /// Comma-delimited list of Item ids to return. #[serde(skip_serializing_if = "Option::is_none")] - pub ids: Option>, + pub ids: Option, - /// Comma-separated list of one or more Collection IDs that each matching Item must be in. + /// Comma-delimited list of one or more Collection IDs that each matching Item must be in. #[serde(skip_serializing_if = "Option::is_none")] pub collections: Option, } @@ -222,10 +222,11 @@ impl TryFrom for GetSearch { .map(|intersects| serde_json::to_string(&intersects)) .transpose()?; let collections = search.collections.map(|collections| collections.join(",")); + let ids = search.ids.map(|ids| ids.join(",")); Ok(GetSearch { items: get_items, - intersects: intersects, - ids: search.ids, + intersects, + ids, collections, }) } @@ -243,11 +244,14 @@ impl TryFrom for Search { let collections = get_search .collections .map(|collections| collections.split(',').map(|s| s.to_string()).collect()); + let ids = get_search + .ids + .map(|ids| ids.split(',').map(|s| s.to_string()).collect()); Ok(Search { items, - intersects: intersects, - ids: get_search.ids, - collections: collections, + intersects, + ids, + collections, }) } } diff --git a/stac-cli/src/args.rs b/stac-cli/src/args.rs index d9c397d2..e1bbbc7f 100644 --- a/stac-cli/src/args.rs +++ b/stac-cli/src/args.rs @@ -163,7 +163,7 @@ impl Args { bbox: &Option, datetime: &Option, intersects: &Option, - ids: &Option>, + ids: &Option, collections: &Option, fields: &Option, sortby: &Option, diff --git a/stac-cli/src/subcommand.rs b/stac-cli/src/subcommand.rs index 5bb07496..66b317e5 100644 --- a/stac-cli/src/subcommand.rs +++ b/stac-cli/src/subcommand.rs @@ -68,9 +68,9 @@ pub enum Subcommand { #[arg(long)] intersects: Option, - /// Array of Item ids to return. + /// Comma-delimited list of one ore more Item ids to return. #[arg(short, long)] - ids: Option>, + ids: Option, /// Comma-delimited list of one or more Collection IDs that each matching Item must be in. #[arg(short, long)]