NASA-IMPACT / veda-data-airflow

Airflow implementation of ingest pipeline for VEDA STAC data
Other
7 stars 4 forks source link

Dataset/publish endpoint should not require optional parameters #193

Open anayeaye opened 2 months ago

anayeaye commented 2 months ago

What

Missing optional parameters cause dataset/publish endpoint to fail with errors including:

{'loc': ('body', 'COGDataset', 'spatial_extent'), 'msg': 'field required', 'type': 'value_error.missing'}
{'loc': ('body', 'COGDataset', 'temporal_extent'), 'msg': 'field required', 'type': 'value_error.missing'}, 
{'loc': ('body', 'COGDataset', 'sample_files'), 'msg': 'field required', 'type': 'value_error.missing'}

Optional parameters causing errors

A dataset that will fail

dataset-config.json ```json { "assets": { "thumbnail": { "description": "Photo by [Mick Truyts](https://unsplash.com/photos/x6WQeNYJC1w) (Power plant shooting steam at the sky)", "href": "https://thumbnails.openveda.cloud/no2--dataset-cover.jpg", "roles": [ "thumbnail" ], "title": "Thumbnail", "type": "image/jpeg" } }, "collection": "OMI_trno2-COG-deleteme", "data_type": "cog", "description": "OMI_trno2 - 0.10 x 0.10 Annual as Cloud-Optimized GeoTIFFs (COGs)", "discovery_items": [ { "bucket": "veda-data-store-staging", "datetime_range": "year", "discovery": "s3", "filename_regex": "^(.*).tif$", "prefix": "OMI_trno2-COG/" } ], "is_periodic": true, "license": "MIT", "providers": [ { "name": "NASA VEDA", "roles": [ "host" ], "url": "https://www.earthdata.nasa.gov/dashboard/" } ], "renders": { "dashboard": { "assets": [ "cog_default" ], "colormap_name": "reds", "rescale": [ [ 0, 3000000000000000 ] ], "title": "VEDA Dashboard Render Parameters" } }, "time_density": "year", "title": "DELETE ME OMI_trno2" } ```

AC