stac-extensions / eo

Covers electro-optical data that represents a snapshot of the Earth. It could consist of cloud cover and multiple spectral bands, for example visible bands, infrared bands, red edge bands and panchromatic bands.
Apache License 2.0
7 stars 10 forks source link

missing `description` in json-schema #16

Closed vincentsarago closed 1 year ago

vincentsarago commented 1 year ago

https://github.com/stac-extensions/eo/blob/d302b29262f2769c2579ebcac9caa336e75352f5/json-schema/schema.json#L147-L184

there is no description in ☝️ while it's seems to be in the spec: https://github.com/stac-extensions/eo#band-object

KennSmithDS commented 1 year ago

@matthewhanson @m-mohr @emmanuelmathot @sankichi92

Issue Description

I am running into this issue too. The reason for it is the schema specifies no additionalProperties are allowed, thus blocking anything outside of name, common_name, center_wavelength, full_width_half_max, and solar_illumination.

Source of Issue

"fields": {
   "type": "object",
   "properties": {
      "eo:cloud_cover": {
         "title": "Cloud Cover",
         "type": "number",
         "minimum": 0,
         "maximum": 100
      },
     "eo:bands": {
        "$ref": "#/definitions/bands"
      }
   },
   "patternProperties": {
      "^(?!eo:)": {}
     },
   "additionalProperties": false

Proposed Change

Code Fix

20

m-mohr commented 1 year ago

It is correct that description is missing, but what has been written about additionalProperties is not correct as it doesn't apply for the content of eo:bands. You can add whatever you want to the bands without any validation complaints...

m-mohr commented 1 year ago

Created PR #21 to fix this. Reviews would be welcome.