raster:bands invalid for 3dep-lidar-hag items
In the items for 3dep-lidar-hag, e.g. https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7 , have invalid raster:bands. They must be an array of Band Objects instead of directly a Band Object. Also, it is part of the properties instead of the asset, which is why it is not cought by validators...
Hmm, this does look off. raster:bands being an object instead of an array of objects is clearly wrong. But according to stac-validator it's OK:
❯ stac-validator https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7
Thanks for using STAC version 1.0.0!
[
{
"version": "1.0.0",
"path": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/3dep-lidar-hag/items/UT_StatewideSouth_2_2020-hag-2m-0-7",
"schema": [
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/classification/v1.0.0/schema.json",
"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json"
],
"valid_stac": true,
"asset_type": "ITEM",
"validation_method": "default"
}
]
That's because raster:bands is not defined (allowed) in item properties (only allowed in assets) and as such there's no validation in place. So, it handles it as just a proprietary extension and allows it as provided. If we want to have strict schemas we should probably check that it doesn't exist in items, but it's not part of the schema yet. You could open an issue for it in the raster extension.
See also https://github.com/stac-extensions/raster/issues/36