Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON schema update #37

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/VISSv3.0_Core.html
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ <h2>File Transfer</h2>
"value": {
"name": "privateMap.kml",
"hash": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed",
"uid" "2d878213"
"uid": "2d878213"
}
}
</code></pre>
Expand Down Expand Up @@ -1918,7 +1918,7 @@ <h2>File Transfer</h2>
"data": {
"path": "Vehicle.Cabin.DashCam.Clip",
"dp" {
"value": {"name": "dashCamClip.mp4", "hash": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed", "uid" "2d878213"},
"value": {"name": "dashCamClip.mp4", "hash": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed", "uid": "2d878213"},
"ts": "2024-08-20T11:30:00Z"
}
},
Expand Down
163 changes: 89 additions & 74 deletions spec/resources/vissv3.0-schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://covesa.global/vissv2.0.bundled.schema.json",
"title": "VISSv2",
"description": "VISS version 2.0 bundled schema",
"$id": "https://covesa.global/vissv3.0.bundled.schema.json",
"title": "VISSv3",
"description": "VISS version 3.0 bundled schema",
"type": "object",
"properties": {
"action": {
Expand All @@ -15,39 +15,39 @@
"properties": {
"action": { "const": "get" }
},
"$ref": "/vissv2.0/get-message.schema.json"
"$ref": "/vissv3.0/get-message.schema.json"
},
{
"properties": {
"action": { "const": "set" }
},
"$ref": "/vissv2.0/set-message.schema.json"
"$ref": "/vissv3.0/set-message.schema.json"
},
{
"properties": {
"action": { "const": "subscribe" }
},
"$ref": "/vissv2.0/subscribe-message.schema.json"
"$ref": "/vissv3.0/subscribe-message.schema.json"
},
{
"properties": {
"action": { "const": "unsubscribe" }
},
"$ref": "/vissv2.0/unsubscribe-message.schema.json"
"$ref": "/vissv3.0/unsubscribe-message.schema.json"
},
{
"properties": {
"action": { "const": "subscription" }
},
"$ref": "/vissv2.0/subscription-event.schema.json"
"$ref": "/vissv3.0/subscription-event.schema.json"
}
],
"$defs": {
"https://covesa.global/vissv2.0/get-message.schema.json": {
"$id": "https://covesa.global/vissv2.0/get-message.schema.json",
"https://covesa.global/vissv3.0/get-message.schema.json": {
"$id": "https://covesa.global/vissv3.0/get-message.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-get-message",
"description": "VISSv2 get request and response messages",
"title": "VISSv3-get-message",
"description": "VISSv3 get request and response messages",
"type": "object",
"oneOf": [
{
Expand All @@ -57,7 +57,7 @@
"type": "string"
},
"filter": {
"$ref": "https://covesa.global/vissv2.0/filter.schema.json"
"$ref": "https://covesa.global/vissv3.0/filter.schema.json"
},
"authorization": {
"description": "The access token",
Expand All @@ -77,7 +77,7 @@
{
"properties": {
"data": {
"$ref": "https://covesa.global/vissv2.0/data.schema.json"
"$ref": "https://covesa.global/vissv3.0/data.schema.json"
},
"ts": {
"description": "The time stamp",
Expand Down Expand Up @@ -110,7 +110,7 @@
{
"properties": {
"error": {
"$ref": "https://covesa.global/vissv2.0/error.schema.json"
"$ref": "https://covesa.global/vissv3.0/error.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -125,11 +125,11 @@
}
]
},
"https://covesa.global/vissv2.0/set-message.schema.json": {
"$id": "https://covesa.global/vissv2.0/set-message.schema.json",
"https://covesa.global/vissv3.0/set-message.schema.json": {
"$id": "https://covesa.global/vissv3.0/set-message.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-set-message",
"description": "VISSv2 set request and response messages",
"title": "VISSv3-set-message",
"description": "VISSv3 set request and response messages",
"type": "object",
"oneOf": [
{
Expand All @@ -140,15 +140,7 @@
},
"value": {
"description": "The value",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
}
]
"$ref": "https://covesa.global/vissv3.0/value.schema.json"
},
"authorization": {
"description": "The access token",
Expand Down Expand Up @@ -177,7 +169,7 @@
{
"properties": {
"error": {
"$ref": "https://covesa.global/vissv2.0/error.schema.json"
"$ref": "https://covesa.global/vissv3.0/error.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -192,11 +184,11 @@
}
]
},
"https://covesa.global/vissv2.0/subscribe-message.schema.json": {
"$id": "https://covesa.global/vissv2.0/subscribe-message.schema.json",
"https://covesa.global/vissv3.0/subscribe-message.schema.json": {
"$id": "https://covesa.global/vissv3.0/subscribe-message.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-subscribe-message",
"description": "VISSv2 subscribe request and response messages",
"title": "VISSv3-subscribe-message",
"description": "VISSv3 subscribe request and response messages",
"type": "object",
"oneOf": [
{
Expand All @@ -206,11 +198,13 @@
"type": "string"
},
"filter": {
"anyOf": [
{ "$ref": "/vissv2.0/filter.schema.json" },
"oneOf": [
{ "$ref": "/vissv3.0/filter.schema.json" },
{
"type": "array",
"items": { "$ref": "/vissv2.0/filter.schema.json" }
"items": { "$ref": "/vissv3.0/filter.schema.json" },
"minItems": 1,
"maxItems": 2
}
]
},
Expand Down Expand Up @@ -253,7 +247,7 @@
{
"properties": {
"error": {
"$ref": "https://covesa.global/vissv2.0/error.schema.json"
"$ref": "https://covesa.global/vissv3.0/error.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -268,11 +262,11 @@
}
]
},
"https://covesa.global/vissv2.0/unsubscribe-message.schema.json": {
"$id": "https://covesa.global/vissv2.0/unsubscribe-message.schema.json",
"https://covesa.global/vissv3.0/unsubscribe-message.schema.json": {
"$id": "https://covesa.global/vissv3.0/unsubscribe-message.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-unsubscribe-message",
"description": "VISSv2 unsubscribe request and response messages",
"title": "VISSv3-unsubscribe-message",
"description": "VISSv3 unsubscribe request and response messages",
"type": "object",
"oneOf": [
{
Expand Down Expand Up @@ -304,7 +298,7 @@
{
"properties": {
"error": {
"$ref": "https://covesa.global/vissv2.0/error.schema.json"
"$ref": "https://covesa.global/vissv3.0/error.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -319,11 +313,11 @@
}
]
},
"https://covesa.global/vissv2.0/subscription-event.schema.json": {
"$id": "https://covesa.global/vissv2.0/subscription-event.schema.json",
"https://covesa.global/vissv3.0/subscription-event.schema.json": {
"$id": "https://covesa.global/vissv3.0/subscription-event.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-subscription-event",
"description": "VISSv2 subscription event",
"title": "VISSv3-subscription-event",
"description": "VISSv3 subscription event",
"type": "object",
"oneOf": [
{
Expand All @@ -333,7 +327,7 @@
"type": "string"
},
"data": {
"$ref": "/vissv2.0/data.schema.json"
"$ref": "/vissv3.0/data.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -353,7 +347,7 @@
"type": "string"
},
"error": {
"$ref": "https://covesa.global/vissv2.0/error.schema.json"
"$ref": "https://covesa.global/vissv3.0/error.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -368,11 +362,11 @@
}
]
},
"https://covesa.global/vissv2.0/filter.schema.json": {
"https://covesa.global/vissv3.0/filter.schema.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://covesa.global/vissv2.0/filter.schema.json",
"title": "VISSv2.0-filter",
"description": "VISS version 2.0 filter",
"$id": "https://covesa.global/vissv3.0/filter.schema.json",
"title": "VISSv3.0-filter",
"description": "VISS version 3.0 filter",
"type": "object",
"properties": {
"variant": {
Expand Down Expand Up @@ -529,39 +523,39 @@
}
]
},
"https://covesa.global/vissv2.0/data.schema.json": {
"$id": "https://covesa.global/vissv2.0/data.schema.json",
"https://covesa.global/vissv3.0/data.schema.json": {
"$id": "https://covesa.global/vissv3.0/data.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-data-representation",
"description": "VISSv2 data representation",
"title": "VISSv3-data-representation",
"description": "VISSv3 data representation",
"oneOf": [
{
"type": "object",
"$ref": "/vissv2.0/datapoint-single.schema.json"
"$ref": "/vissv3.0/datapoint-single.schema.json"
},
{
"type": "object",
"$ref": "/vissv2.0/datapoint-multiple.schema.json"
"$ref": "/vissv3.0/datapoint-multiple.schema.json"
},
{
"type": "array",
"items": {
"$ref": "/vissv2.0/datapoint-single.schema.json"
"$ref": "/vissv3.0/datapoint-single.schema.json"
}
},
{
"type": "array",
"items": {
"$ref": "/vissv2.0/datapoint-multiple.schema.json"
"$ref": "/vissv3.0/datapoint-multiple.schema.json"
}
}
],
"$defs": {
"https://covesa.global/vissv2.0/datapoint-single.schema.json": {
"$id": "https://covesa.global/vissv2.0/datapoint-single.schema.json",
"https://covesa.global/vissv3.0/datapoint-single.schema.json": {
"$id": "https://covesa.global/vissv3.0/datapoint-single.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-single-datapoint",
"description": "VISSv2 single datapoint",
"title": "VISSv3-single-datapoint",
"description": "VISSv3 single datapoint",
"properties": {
"path": {
"description": "The path",
Expand All @@ -573,7 +567,7 @@
"properties": {
"value": {
"description": "The value",
"type": "string"
"$ref": "https://covesa.global/vissv3.0/value.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -585,11 +579,11 @@
},
"required": ["path", "dp"]
},
"https://covesa.global/vissv2.0/datapoint-multiple.schema.json": {
"$id": "https://covesa.global/vissv2.0/datapoint-multiple.schema.json",
"https://covesa.global/vissv3.0/datapoint-multiple.schema.json": {
"$id": "https://covesa.global/vissv3.0/datapoint-multiple.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-multiple-datapoints",
"description": "VISSv2 multiple datapoints",
"title": "VISSv3-multiple-datapoints",
"description": "VISSv3 multiple datapoints",
"properties": {
"path": {
"description": "The path",
Expand All @@ -602,7 +596,7 @@
"properties": {
"value": {
"description": "The value",
"type": "string"
"$ref": "https://covesa.global/vissv3.0/value.schema.json"
},
"ts": {
"description": "The time stamp",
Expand All @@ -617,11 +611,11 @@
}
}
},
"https://covesa.global/vissv2.0/error.schema.json": {
"$id": "https://covesa.global/vissv2.0/error.schema.json",
"https://covesa.global/vissv3.0/error.schema.json": {
"$id": "https://covesa.global/vissv3.0/error.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv2-error",
"description": "VISSv2 error data",
"title": "VISSv3-error",
"description": "VISSv3 error data",
"type": "object",
"properties": {
"number": {
Expand All @@ -644,6 +638,27 @@
}
},
"required": ["number", "reason", "message"]
},
"https://covesa.global/vissv3.0/value.schema.json": {
"$id": "https://covesa.global/vissv3.0/value.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "VISSv3-value",
"description": "VISSv3 value data",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" },
"minItems": 1
},
{
"type": "object",
"patternProperties": { ".*": { "type":"string" } },
"minItems": 1
}
]
}
}
}
Loading