Open scottyhq opened 4 days ago
but maybe just skipping this check altogether would be better?
Ah, sorry after digging in the code a little bit I see that is already possible via config!
httpconfig = stac_asset.Config(http_headers={'MAXAR-API-KEY':os.environ['MAXAR_API_KEY']},
http_check_content_type=False)
download_item(config=httpconfig)
@scottyhq thanks for raising — since it's not uncommon for servers to have these media type mismatches, I wonder if switching to warn-by-default would be better UX?
https://github.com/stac-utils/stac-asset/blob/20a5d5ab8669867d3e5a7601072a501cde74e89d/src/stac_asset/validate.py#L3-L5
I was just this library out with a maxar item https://api.maxar.com/discovery/v1/catalogs/imagery/collections/wv01/items/102001008EC5AC00
But hit validation errors on the mime-types trying to download assets, which are almost the same. I don't think the asset type are standardized in STAC validation, but could be wrong! I thought about adding them to ALLOWABLE_PAIRS, but maybe just skipping this check altogether would be better?