Skip to content
Snippets Groups Projects
Commit 89f50773 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-190: moved timestamp and timewindow definitions into common schema

parent fe8ae886
No related branches found
No related tags found
1 merge request!252Resolve TMSS-190
{
"$id": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1#",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "datetime",
"description": "This schema defines datetime objects like timestamp and timewindow.",
"version": 1,
"type": "object",
"definitions": {
"timestamp": {
"description": "A timestamp defined in UTC",
"type": "string",
"pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?Z?",
"format": "date-time"
},
"timewindow": {
"type": "object",
"description": "A timewindow interval: [from, to)",
"properties": {
"from": {
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timestamp"
},
"to": {
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timestamp"
}
},
"additionalProperties": false,
"required": [
"from",
"to"
]
}
}
}
\ No newline at end of file
......@@ -5,29 +5,6 @@
"description": "This schema defines the scheduling constraints for a scheduling unit",
"version": 1,
"definitions": {
"timestamp": {
"description": "A timestamp defined in UTC",
"type": "string",
"pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?Z",
"format": "date-time"
},
"timewindow": {
"type": "object",
"description": "A timewindow interval: [from, to)",
"properties": {
"from": {
"$ref": "#/definitions/timestamp"
},
"to": {
"$ref": "#/definitions/timestamp"
}
},
"additionalProperties": false,
"required": [
"from",
"to"
]
},
"distance_on_sky": {
"type": "number",
"minimum": 0,
......@@ -57,21 +34,21 @@
"properties": {
"at": {
"description": "Start at this moment",
"$ref": "#/definitions/timestamp"
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timestamp"
},
"after": {
"description": "Start after this moment",
"$ref": "#/definitions/timestamp"
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timestamp"
},
"before": {
"description": "End before this moment",
"$ref": "#/definitions/timestamp"
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timestamp"
},
"between": {
"description": "Run within one of these time windows",
"type": "array",
"items": {
"$ref": "#/definitions/timewindow"
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timewindow"
},
"minItems":0,
"uniqueItems":true,
......@@ -81,7 +58,7 @@
"description": "Do NOT run within any of these time windows",
"type": "array",
"items": {
"$ref": "#/definitions/timewindow"
"$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/datetime/1/#/definitions/timewindow"
},
"minItems":0,
"uniqueItems":true,
......
[
{
"file_name": "common_schema_template-datetime-1.json",
"template": "common_schema_template"
},
{
"file_name": "common_schema_template-pointing-1.json",
"template": "common_schema_template"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment