stac-extensions/eo

missing `description` in json-schema

vincentsarago opened this issue · 3 comments

eo/json-schema/schema.json

Lines 147 to 184 in d302b29

"name": {
"title": "Name of the band",
"type": "string"
},
"common_name": {
"title": "Common Name of the band",
"type": "string",
"enum": [
"coastal",
"blue",
"green",
"red",
"rededge",
"yellow",
"pan",
"nir",
"nir08",
"nir09",
"cirrus",
"swir16",
"swir22",
"lwir",
"lwir11",
"lwir12"
]
},
"center_wavelength": {
"title": "Center Wavelength",
"type": "number"
},
"full_width_half_max": {
"title": "Full Width Half Max (FWHM)",
"type": "number"
},
"solar_illumination": {
"title": "Solar Illumination",
"type": "number"
}

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

@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

  • Remove this line of code from the schema "additionalProperties": false, or...
  • Add "description": { "title": "Band Description", "type": "string"}

Code Fix

#20

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...

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