Skip to content

Commit

Permalink
added regionCoords as alt to region via string
Browse files Browse the repository at this point in the history
  • Loading branch information
Geary-Layne committed Mar 11, 2024
1 parent 1be6a79 commit 29903a9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
16 changes: 14 additions & 2 deletions python/idsse_common/idsse/common/schema/region.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"Region": {
"description": "Identifier for a geographic region",
"description": "Identifier for a geographic region either by name",
"type": "string",
"enum": ["CONUS", "ALASKA", "PUERTO_RICO", "HAWAII", "GUAM"]
}
},

"RegionCoords": {
"description": "Specify geographic coordinates (lon/lat) used to identify region",
"type": "array",
"items": {
"type": "array",
"items": {"type": "number"},
"minItems": 2,
"maxItems": 2
},
"minItems": 1
}
}
12 changes: 10 additions & 2 deletions python/idsse_common/idsse/common/schema/translated_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"product": {"$ref": "product.json#/Product"},
"field": {"type": "string"},
"region": {"$ref": "region.json#/Region"},
"regionCoords": {"$ref": "region.json#/RegionCoords"},
"units": {"type": "string"},
"relational": {"type": "string"},
"thresh": {"type": "number"},
Expand Down Expand Up @@ -37,11 +38,14 @@
"duration",
"product",
"field",
"region",
"units",
"relational",
"thresh",
"mapping"
],
"oneOf": [
{"required": ["region"]},
{"required": ["regionCoords"]}
]
},

Expand All @@ -62,6 +66,7 @@
},
"field": {"type": "string"},
"region": {"$ref": "region.json#/Region"},
"regionCoords": {"$ref": "region.json#/RegionCoords"},
"units": {"type": "string"},
"relational": {"type": "string"},
"thresh": {"type": "number"},
Expand Down Expand Up @@ -90,11 +95,14 @@
"duration",
"product",
"field",
"region",
"units",
"relational",
"thresh",
"mapping"
],
"oneOf": [
{"required": ["region"]},
{"required": ["regionCoords"]}
]
}
}
6 changes: 5 additions & 1 deletion python/idsse_common/idsse/common/schema/variable.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
"properties": {
"product": {"$ref": "product.json#/Product"},
"region": {"$ref": "region.json#/Region"},
"regionCoords": {"$ref": "region.json#/RegionCoords"},
"field": {"$ref": "field.json#/Field"},
"issue": {"$ref": "timing.json#/TimeString"},
"valid": {"$ref": "timing.json#/TimeString"}
},
"required": [
"product",
"region",
"field",
"issue",
"valid"
],
"oneOf": [
{"required": ["region"]},
{"required": ["regionCoords"]}
]
}
}

0 comments on commit 29903a9

Please sign in to comment.