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

Use relative paths in schema definitions

parent 6b3287e9
No related branches found
No related tags found
1 merge request!268Merge fork for interoperability of KoMa solver
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/ak.schema.json", "$id": "schemas/ak.schema.json",
"title": "AK", "title": "AK",
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "The unique identifier of an AK" "description": "The unique identifier of an AK"
}, },
"duration": { "duration": {
...@@ -14,22 +14,22 @@ ...@@ -14,22 +14,22 @@
"exclusiveMinimum": 0 "exclusiveMinimum": 0
}, },
"room_constraints": { "room_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Room constraints required by this AK" "description": "Room constraints required by this AK"
}, },
"time_constraints": { "time_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Time constraints required by this AK" "description": "Time constraints required by this AK"
}, },
"properties": { "properties": {
"type": "object", "type": "object",
"properties": { "properties": {
"conflicts": { "conflicts": {
"$ref": "/schema/common/id_array.schema.json", "$ref": "common/id_array.schema.json",
"description": "IDs of all AKs that are in conflict with this AK" "description": "IDs of all AKs that are in conflict with this AK"
}, },
"dependencies": { "dependencies": {
"$ref": "/schema/common/id_array.schema.json", "$ref": "common/id_array.schema.json",
"description": "IDs of all AKs that should be scheduled before this AK" "description": "IDs of all AKs that should be scheduled before this AK"
} }
}, },
...@@ -45,11 +45,11 @@ ...@@ -45,11 +45,11 @@
"reso": {"description": "Whether this AK intends to introduce a resolution", "type": "boolean"}, "reso": {"description": "Whether this AK intends to introduce a resolution", "type": "boolean"},
"duration_in_hours": {"description": "AK duration in hours", "type": "number"}, "duration_in_hours": {"description": "AK duration in hours", "type": "number"},
"django_ak_id": { "django_ak_id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "Unique identifier of the AK object in the django database" "description": "Unique identifier of the AK object in the django database"
}, },
"types": { "types": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Types of this AK" "description": "Types of this AK"
} }
}, },
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/common/constraints.schema.json", "$id": "schemas/common/constraints.schema.json",
"type": "array", "type": "array",
"items": {"type": "string"}, "items": {"type": "string"},
"uniqueItems": true "uniqueItems": true
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/common/id.schema.json", "$id": "schemas/common/id.schema.json",
"type": "integer", "type": "integer",
"minimum": 0 "minimum": 0
} }
\ No newline at end of file
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/common/id_array.schema.json", "$id": "schemas/common/id_array.schema.json",
"type": "array", "type": "array",
"items": {"type": "integer"}, "items": {"type": "integer"},
"uniqueItems": true "uniqueItems": true
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/participant.schema.json", "$id": "schemas/participant.schema.json",
"title": "Participant", "title": "Participant",
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "The unique identifier of a participant" "description": "The unique identifier of a participant"
}, },
"preferences": { "preferences": {
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"ak_id": { "ak_id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "The unique identifier of the AK" "description": "The unique identifier of the AK"
}, },
"required": { "required": {
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
"uniqueItems": true "uniqueItems": true
}, },
"room_constraints": { "room_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Room constraints required by this participant" "description": "Room constraints required by this participant"
}, },
"time_constraints": { "time_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Time constraints required by this participant" "description": "Time constraints required by this participant"
}, },
"info": { "info": {
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/room.schema.json", "$id": "schemas/room.schema.json",
"title": "Room", "title": "Room",
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "The unique identifier of a room" "description": "The unique identifier of a room"
}, },
"capacity": { "capacity": {
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
] ]
}, },
"fulfilled_room_constraints": { "fulfilled_room_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Constraints fulfilled by this room" "description": "Constraints fulfilled by this room"
}, },
"time_constraints": { "time_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Time constraints required by this room" "description": "Time constraints required by this room"
}, },
"info": { "info": {
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/solver-input.schema.json", "$id": "schemas/solver-input.schema.json",
"type": "object", "type": "object",
"properties": { "properties": {
"aks": {"type": "array", "items": {"$ref": "/schema/ak.schema.json"}, "uniqueItems": true}, "aks": {"type": "array", "items": {"$ref": "ak.schema.json"}, "uniqueItems": true},
"rooms": {"type": "array", "items": {"$ref": "/schema/room.schema.json"}, "uniqueItems": true}, "rooms": {"type": "array", "items": {"$ref": "room.schema.json"}, "uniqueItems": true},
"participants": {"type": "array", "items": {"$ref": "/schema/participant.schema.json"}, "uniqueItems": true}, "participants": {"type": "array", "items": {"$ref": "participant.schema.json"}, "uniqueItems": true},
"timeslots": {"$ref": "/schema/timeslot.schema.json"}, "timeslots": {"$ref": "timeslot.schema.json"},
"info": { "info": {
"type": "object", "type": "object",
"properties": { "properties": {
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/solver-output.schema.json", "$id": "schemas/solver-output.schema.json",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"required": ["input", "scheduled_aks"], "required": ["input", "scheduled_aks"],
"properties": { "properties": {
"input": {"$ref": "/schema/solver-input.schema.json"}, "input": {"$ref": "solver-input.schema.json"},
"scheduled_aks": { "scheduled_aks": {
"type": "array", "type": "array",
"items": { "items": {
......
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/timeslot.schema.json", "$id": "schemas/timeslot.schema.json",
"title": "Timeslot", "title": "Timeslot",
"type": "object", "type": "object",
"required": ["info", "blocks"], "required": ["info", "blocks"],
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"description": "A single timeslot", "description": "A single timeslot",
"properties": { "properties": {
"id": { "id": {
"$ref": "/schema/common/id.schema.json", "$ref": "common/id.schema.json",
"description": "The unique identifier of the single timeslot. Accross all blocks, the ids must be sorted chronologically." "description": "The unique identifier of the single timeslot. Accross all blocks, the ids must be sorted chronologically."
}, },
"info": { "info": {
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
"additionalProperties": false "additionalProperties": false
}, },
"fulfilled_time_constraints": { "fulfilled_time_constraints": {
"$ref": "/schema/common/constraints.schema.json", "$ref": "common/constraints.schema.json",
"description": "Time constraints fulfilled by this timeslot" "description": "Time constraints fulfilled by this timeslot"
} }
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment