Skip to content

Commit

Permalink
Add a couple of kernel message schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Feb 23, 2024
1 parent cbf4bcf commit 7370ded
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
24 changes: 24 additions & 0 deletions schema/kernel/messages/v1/kernel-info-request.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.jupyter.org/kernel/messages/v1/kernel-info-request.schema.json",
"version": 1,
"title": "Kernel info request message",
"type": "object",
"properties": {
"header": {
"$ref": "/kernel/messages/v1/message-header.schema.json",
"description": "Message header",
"properties": {
"msg_type": {
"const": "kernel_info_request"
}
}
},
"content": {
"type": "object"
}
},
"required": [
"header", "content"
]
}
43 changes: 43 additions & 0 deletions schema/kernel/messages/v1/message-header.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.jupyter.org/kernel/messages/v1/message-header.schema.json",
"version": 1,
"title": "Message header",
"type": "object",
"properties": {
"msg_id": {
"type": "string",
"description": "Message ID, must be unique per message, typically a UUID"
},
"session": {
"type": "string",
"description": "Session ID, unique per session, typically a UUID"
},
"username": {
"type": "string"
},
"date": {
"type": "string",
"description": "ISO 8601 timestamp for when the message was created"
},
"msg_type": {
"enum": [
"kernel_info_request",
"kernel_info_reply",
"some_other_message_type"
]
},
"version": {
"type": "string",
"description": "Message protocol version"
}
},
"required": [
"msg_id",
"session",
"username",
"date",
"msg_type",
"version"
]
}

0 comments on commit 7370ded

Please sign in to comment.