-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
util
module with function to build JSON schema
Add JSON schema for all models
- Loading branch information
1 parent
3c51ca2
commit 0fbdc8f
Showing
40 changed files
with
4,248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"properties": { | ||
"audio_data": { | ||
"description": "base64-encoded audio", | ||
"title": "Audio Data", | ||
"type": "string" | ||
}, | ||
"lang": { | ||
"description": "BCP-47 language code", | ||
"title": "Lang", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"audio_data", | ||
"lang" | ||
], | ||
"title": "AudioInputData", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"msg_type": { | ||
"default": "neon.alert_expired", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"title": "Data", | ||
"type": "object" | ||
}, | ||
"context": { | ||
"title": "Context", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "CoreAlertExpired", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"msg_type": { | ||
"default": "neon.clear_data", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"title": "Data", | ||
"type": "object" | ||
}, | ||
"context": { | ||
"title": "Context", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "CoreClearData", | ||
"type": "object" | ||
} |
23 changes: 23 additions & 0 deletions
23
neon_data_models/schema/api/node_v1/CoreErrorResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"msg_type": { | ||
"default": "klat.error", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"title": "Data", | ||
"type": "object" | ||
}, | ||
"context": { | ||
"title": "Context", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "CoreErrorResponse", | ||
"type": "object" | ||
} |
23 changes: 23 additions & 0 deletions
23
neon_data_models/schema/api/node_v1/CoreIntentFailure.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"msg_type": { | ||
"default": "complete.intent.failure", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"title": "Data", | ||
"type": "object" | ||
}, | ||
"context": { | ||
"title": "Context", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "CoreIntentFailure", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"msg_type": { | ||
"default": "neon.ww_detected", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"title": "Data", | ||
"type": "object" | ||
}, | ||
"context": { | ||
"title": "Context", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "CoreWWDetected", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"properties": { | ||
"sentence": { | ||
"description": "Text response", | ||
"title": "Sentence", | ||
"type": "string" | ||
}, | ||
"audio": { | ||
"title": "Audio", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"sentence" | ||
], | ||
"title": "KlatResponse", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"properties": { | ||
"responses": { | ||
"title": "Responses", | ||
"type": "object" | ||
} | ||
}, | ||
"title": "KlatResponseData", | ||
"type": "object" | ||
} |
218 changes: 218 additions & 0 deletions
218
neon_data_models/schema/api/node_v1/NodeAudioInput.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
{ | ||
"$defs": { | ||
"AudioInputData": { | ||
"properties": { | ||
"audio_data": { | ||
"description": "base64-encoded audio", | ||
"title": "Audio Data", | ||
"type": "string" | ||
}, | ||
"lang": { | ||
"description": "BCP-47 language code", | ||
"title": "Lang", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"audio_data", | ||
"lang" | ||
], | ||
"title": "AudioInputData", | ||
"type": "object" | ||
}, | ||
"NodeData": { | ||
"properties": { | ||
"device_id": { | ||
"title": "Device Id", | ||
"type": "string" | ||
}, | ||
"device_name": { | ||
"default": "", | ||
"title": "Device Name", | ||
"type": "string" | ||
}, | ||
"device_description": { | ||
"default": "", | ||
"title": "Device Description", | ||
"type": "string" | ||
}, | ||
"platform": { | ||
"default": "", | ||
"title": "Platform", | ||
"type": "string" | ||
}, | ||
"networking": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/NodeNetworking" | ||
} | ||
], | ||
"default": { | ||
"local_ip": "127.0.0.1", | ||
"public_ip": "", | ||
"mac_address": "" | ||
} | ||
}, | ||
"software": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/NodeSoftware" | ||
} | ||
], | ||
"default": { | ||
"operating_system": "", | ||
"os_version": "", | ||
"neon_packages": null | ||
} | ||
}, | ||
"location": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/$defs/NodeLocation" | ||
} | ||
], | ||
"default": { | ||
"lat": null, | ||
"lon": null, | ||
"site_id": null | ||
} | ||
} | ||
}, | ||
"title": "NodeData", | ||
"type": "object" | ||
}, | ||
"NodeInputContext": { | ||
"properties": { | ||
"node_data": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/$defs/NodeData" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"description": "Node Data" | ||
} | ||
}, | ||
"required": [ | ||
"node_data" | ||
], | ||
"title": "NodeInputContext", | ||
"type": "object" | ||
}, | ||
"NodeLocation": { | ||
"properties": { | ||
"lat": { | ||
"anyOf": [ | ||
{ | ||
"type": "number" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"default": null, | ||
"title": "Lat" | ||
}, | ||
"lon": { | ||
"anyOf": [ | ||
{ | ||
"type": "number" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"default": null, | ||
"title": "Lon" | ||
}, | ||
"site_id": { | ||
"anyOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"default": null, | ||
"title": "Site Id" | ||
} | ||
}, | ||
"title": "NodeLocation", | ||
"type": "object" | ||
}, | ||
"NodeNetworking": { | ||
"properties": { | ||
"local_ip": { | ||
"default": "127.0.0.1", | ||
"title": "Local Ip", | ||
"type": "string" | ||
}, | ||
"public_ip": { | ||
"default": "", | ||
"title": "Public Ip", | ||
"type": "string" | ||
}, | ||
"mac_address": { | ||
"default": "", | ||
"title": "Mac Address", | ||
"type": "string" | ||
} | ||
}, | ||
"title": "NodeNetworking", | ||
"type": "object" | ||
}, | ||
"NodeSoftware": { | ||
"properties": { | ||
"operating_system": { | ||
"default": "", | ||
"title": "Operating System", | ||
"type": "string" | ||
}, | ||
"os_version": { | ||
"default": "", | ||
"title": "Os Version", | ||
"type": "string" | ||
}, | ||
"neon_packages": { | ||
"anyOf": [ | ||
{ | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"type": "object" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"default": null, | ||
"title": "Neon Packages" | ||
} | ||
}, | ||
"title": "NodeSoftware", | ||
"type": "object" | ||
} | ||
}, | ||
"properties": { | ||
"msg_type": { | ||
"default": "neon.audio_input", | ||
"title": "Msg Type", | ||
"type": "string" | ||
}, | ||
"data": { | ||
"$ref": "#/$defs/AudioInputData" | ||
}, | ||
"context": { | ||
"$ref": "#/$defs/NodeInputContext" | ||
} | ||
}, | ||
"required": [ | ||
"data", | ||
"context" | ||
], | ||
"title": "NodeAudioInput", | ||
"type": "object" | ||
} |
Oops, something went wrong.