diff --git a/examples/CMIP6.ScenarioMIP.UA.MCM-UA-1-0.ssp245.r1i1p1f2.Amon.psl.gn.v20190731.json b/examples/CMIP6.ScenarioMIP.UA.MCM-UA-1-0.ssp245.r1i1p1f2.Amon.psl.gn.v20190731.json index bd4dd5e..851486b 100644 --- a/examples/CMIP6.ScenarioMIP.UA.MCM-UA-1-0.ssp245.r1i1p1f2.Amon.psl.gn.v20190731.json +++ b/examples/CMIP6.ScenarioMIP.UA.MCM-UA-1-0.ssp245.r1i1p1f2.Amon.psl.gn.v20190731.json @@ -46,9 +46,7 @@ "cmip6:access": [ "HTTPServer" ], - "cmip6:index_node": null, "cmip6:latest": true, - "cmip6:pid": null, "cmip6:replica": false, "cmip6:retracted": false, "cmip6:instance_id": "CMIP6.ScenarioMIP.UA.MCM-UA-1-0.ssp245.r1i1p1f2.Amon.psl.gn.v20190731", @@ -73,7 +71,7 @@ "cmip6:table_id": "Amon", "cmip6:variable_id": "psl", "cmip6:variant_label": "r1i1p1f2", - "cmip6:levels": null, + "cmip6:levels": 0, "cmip6:updated": "2024-02-20T19:28:19.804842Z", "cmip6:created": "2024-02-20T19:28:19.804842Z" }, diff --git a/json-schema/schema.json b/json-schema/schema.json index 0ce39e6..ddca679 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -53,37 +53,161 @@ "require_any_field": { "$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.", "anyOf": [ - {"required": ["cmip6:access"]}, - {"required": ["cmip6:index_node"]}, - {"required": ["cmip6:latest"]}, - {"required": ["cmip6:pid"]}, - {"required": ["cmip6:replica"]}, - {"required": ["cmip6:retracted"]}, - {"required": ["cmip6:instance_id"]}, - {"required": ["cmip6:citation_url"]}, - {"required": ["cmip6:variable_long_name"]}, - {"required": ["cmip6:variable_units"]}, - {"required": ["cmip6:cf_standard_name"]}, - {"required": ["cmip6:activity_id"]}, - {"required": ["cmip6:data_specs_version"]}, - {"required": ["cmip6:experiment_title"]}, - {"required": ["cmip6:frequency"]}, - {"required": ["cmip6:further_info_url"]}, - {"required": ["cmip6:grid"]}, - {"required": ["cmip6:grid_label"]}, - {"required": ["cmip6:institution_id"]}, - {"required": ["cmip6:mip_era"]}, - {"required": ["cmip6:source_id"]}, - {"required": ["cmip6:source_type"]}, - {"required": ["cmip6:experiment_id"]}, - {"required": ["cmip6:sub_experiment_id"]}, - {"required": ["cmip6:nominal_resolution"]}, - {"required": ["cmip6:table_id"]}, - {"required": ["cmip6:variable_id"]}, - {"required": ["cmip6:variant_label"]}, - {"required": ["cmip6:levels"]}, - {"required": ["cmip6:updated"]}, - {"required": ["cmip6:created"]} + { + "required": [ + "cmip6:access" + ] + }, + { + "required": [ + "cmip6:index_node" + ] + }, + { + "required": [ + "cmip6:latest" + ] + }, + { + "required": [ + "cmip6:pid" + ] + }, + { + "required": [ + "cmip6:replica" + ] + }, + { + "required": [ + "cmip6:retracted" + ] + }, + { + "required": [ + "cmip6:instance_id" + ] + }, + { + "required": [ + "cmip6:citation_url" + ] + }, + { + "required": [ + "cmip6:variable_long_name" + ] + }, + { + "required": [ + "cmip6:variable_units" + ] + }, + { + "required": [ + "cmip6:cf_standard_name" + ] + }, + { + "required": [ + "cmip6:activity_id" + ] + }, + { + "required": [ + "cmip6:data_specs_version" + ] + }, + { + "required": [ + "cmip6:experiment_title" + ] + }, + { + "required": [ + "cmip6:frequency" + ] + }, + { + "required": [ + "cmip6:further_info_url" + ] + }, + { + "required": [ + "cmip6:grid" + ] + }, + { + "required": [ + "cmip6:grid_label" + ] + }, + { + "required": [ + "cmip6:institution_id" + ] + }, + { + "required": [ + "cmip6:mip_era" + ] + }, + { + "required": [ + "cmip6:source_id" + ] + }, + { + "required": [ + "cmip6:source_type" + ] + }, + { + "required": [ + "cmip6:experiment_id" + ] + }, + { + "required": [ + "cmip6:sub_experiment_id" + ] + }, + { + "required": [ + "cmip6:nominal_resolution" + ] + }, + { + "required": [ + "cmip6:table_id" + ] + }, + { + "required": [ + "cmip6:variable_id" + ] + }, + { + "required": [ + "cmip6:variant_label" + ] + }, + { + "required": [ + "cmip6:levels" + ] + }, + { + "required": [ + "cmip6:updated" + ] + }, + { + "required": [ + "cmip6:created" + ] + } ] }, "fields": { @@ -175,7 +299,7 @@ "type": "string" }, "cmip6:levels": { - "type": "string" + "type": "integer" }, "cmip6:updated": { "type": "string" @@ -190,4 +314,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 5da274f..6b03117 100644 --- a/package.json +++ b/package.json @@ -18,4 +18,4 @@ "remark-validate-links": "^13.0.0", "stac-node-validator": "^1.3.0" } -} +} \ No newline at end of file