diff options
| author | Radu Nicolae <rnicolae04@gmail.com> | 2024-04-24 15:09:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-24 15:09:22 +0200 |
| commit | aefa53bc65309869922d44509739bf2664cf50a5 (patch) | |
| tree | b65f1ffee7f6769c52d9494d7eab6afacd09353b /site/docs/documentation/Input/ScenarioSchema.md | |
| parent | b18e95e687a6acfbb33fdbd7da80538f1459bfb2 (diff) | |
Documentation update (#224)
Diffstat (limited to 'site/docs/documentation/Input/ScenarioSchema.md')
| -rw-r--r-- | site/docs/documentation/Input/ScenarioSchema.md | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/site/docs/documentation/Input/ScenarioSchema.md b/site/docs/documentation/Input/ScenarioSchema.md new file mode 100644 index 00000000..bd800fd7 --- /dev/null +++ b/site/docs/documentation/Input/ScenarioSchema.md @@ -0,0 +1,81 @@ +Below is the schema for the Scenario JSON file. This schema can be used to validate a scenario file. +A scenario file can be validated using a JSON schema validator, such as https://www.jsonschemavalidator.net/. + +```json +{ + "$schema": "OpenDC/Scenario", + "$defs": { + "topology": { + "type": "object", + "properties": { + "pathToFile": { + "type": "string" + } + }, + "required": [ + "pathToFile" + ] + }, + "workload": { + "type": "object", + "properties": { + "pathToFile": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "pathToFile", + "type" + ] + }, + "allocationPolicy": { + "type": "object", + "properties": { + "policyType": { + "type": "string" + } + }, + "required": [ + "policyType" + ] + } + }, + "properties": { + "name": { + "type": "string" + }, + "topologies": { + "type": "array", + "items": { + "$ref": "#/$defs/topology" + }, + "minItems": 1 + }, + "workloads": { + "type": "array", + "items": { + "$ref": "#/$defs/workload" + }, + "minItems": 1 + }, + "allocationPolicies": { + "type": "array", + "items": { + "$ref": "#/$defs/allocationPolicy" + }, + "minItems": 1 + }, + "runs": { + "type": "integer" + } + }, + "required": [ + "topologies", + "workloads", + "allocationPolicies", + ] +} +``` |
