Skip to content
Snippets Groups Projects
Commit a3d4ad59 authored by Felix Blanke's avatar Felix Blanke
Browse files

Disallow additional properties

parent 9e376015
No related branches found
No related tags found
1 merge request!25Feature: Use JSON schema
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
"description": "IDs of all AKs that should be scheduled before this AK" "description": "IDs of all AKs that should be scheduled before this AK"
} }
}, },
"required": ["conflicts", "dependencies"] "required": ["conflicts", "dependencies"],
"additionalProperties": false
}, },
"info": { "info": {
"type": "object", "type": "object",
...@@ -43,8 +44,10 @@ ...@@ -43,8 +44,10 @@
"description": {"description": "Short description of the AK", "type": "string"}, "description": {"description": "Short description of the AK", "type": "string"},
"reso": {"description": "Whether this AK intends to introduce a resolution", "type": "boolean"} "reso": {"description": "Whether this AK intends to introduce a resolution", "type": "boolean"}
}, },
"required": ["name", "head", "description", "reso"] "required": ["name", "head", "description", "reso"],
"additionalProperties": false
} }
}, },
"required": ["id", "duration", "room_constraints", "time_constraints", "properties", "info"] "required": ["id", "duration", "room_constraints", "time_constraints", "properties", "info"],
"additionalProperties": false
} }
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
] ]
} }
}, },
"required": ["ak_id", "required", "preference_score"] "required": ["ak_id", "required", "preference_score"],
"additionalProperties": false
}, },
"uniqueItems": true "uniqueItems": true
}, },
...@@ -48,8 +49,10 @@ ...@@ -48,8 +49,10 @@
"info": { "info": {
"type": "object", "type": "object",
"properties": {"name": {"description": "Name of the person", "type": "string"}}, "properties": {"name": {"description": "Name of the person", "type": "string"}},
"required": ["name"] "required": ["name"],
"additionalProperties": false
} }
}, },
"required": ["id", "room_constraints", "time_constraints", "info"] "required": ["id", "room_constraints", "time_constraints", "info"],
"additionalProperties": false
} }
...@@ -26,8 +26,10 @@ ...@@ -26,8 +26,10 @@
"properties": { "properties": {
"name": {"description": "Name of the room", "type": "string"} "name": {"description": "Name of the room", "type": "string"}
}, },
"required": ["name"] "required": ["name"],
"additionalProperties": false
} }
}, },
"required": ["id", "capacity", "fulfilled_room_constraints", "time_constraints", "info"] "required": ["id", "capacity", "fulfilled_room_constraints", "time_constraints", "info"],
"additionalProperties": false
} }
\ No newline at end of file
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
"uniqueItems": true "uniqueItems": true
} }
}, },
"required": ["ak_id", "room_id", "timeslot_ids", "participant_ids"] "required": ["ak_id", "room_id", "timeslot_ids", "participant_ids"],
"additionalProperties": false
}, },
"uniqueItems": true "uniqueItems": true
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"title": "Timeslot", "title": "Timeslot",
"type": "object", "type": "object",
"required": ["info", "blocks"], "required": ["info", "blocks"],
"additionalProperties": false,
"properties": { "properties": {
"info": { "info": {
"type": "object", "type": "object",
...@@ -19,7 +20,8 @@ ...@@ -19,7 +20,8 @@
} }
} }
}, },
"required": ["duration"] "required": ["duration"],
"additionalProperties": false
}, },
"blocks": { "blocks": {
"type": "array", "type": "array",
...@@ -41,14 +43,16 @@ ...@@ -41,14 +43,16 @@
"start": {"description": "Start datetime of the timeslot", "type": "string"}, "start": {"description": "Start datetime of the timeslot", "type": "string"},
"end": {"description": "End datetime of the timeslot", "type": "string"} "end": {"description": "End datetime of the timeslot", "type": "string"}
}, },
"required": ["start", "end"] "required": ["start", "end"],
"additionalProperties": false
}, },
"fulfilled_time_constraints": { "fulfilled_time_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "/schema/common/constraints.schema.json",
"description": "Time constraints fulfilled by this timeslot" "description": "Time constraints fulfilled by this timeslot"
} }
}, },
"required": ["id", "info", "fulfilled_time_constraints"] "required": ["id", "info", "fulfilled_time_constraints"],
"additionalProperties": false
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment