Skip to content

Commit cb68aec

Browse files
committed
use same event schema IDs as jupyter_collaboration
1 parent 684cbd5 commit cb68aec

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

jupyter_server_documents/events/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
EVENTS_DIR = Path(__file__).parent
55

6-
JSD_ROOM_EVENT_URI = "https://schema.jupyter.org/jupyter_server_documents/room/v1"
7-
JSD_AWARENESS_EVENT_URI = "https://schema.jupyter.org/jupyter_server_documents/awareness/v1"
6+
# Use the same schema ID as `jupyter_collaboration` for compatibility
7+
JSD_ROOM_EVENT_URI = "https://schema.jupyter.org/jupyter_collaboration/session/v1"
8+
JSD_AWARENESS_EVENT_URI = "https://schema.jupyter.org/jupyter_collaboration/awareness/v1"
89

910
JSD_ROOM_EVENT_SCHEMA = EVENTS_DIR / "room.yaml"
1011
JSD_AWARENESS_EVENT_SCHEMA = EVENTS_DIR / "awareness.yaml"

jupyter_server_documents/events/awareness.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"$id": https://schema.jupyter.org/jupyter_server_documents/awareness/v1
1+
"$id": https://schema.jupyter.org/jupyter_collaboration/awareness/v1
22
"$schema": "http://json-schema.org/draft-07/schema"
33
version: "1"
44
title: Collaborative awareness events

jupyter_server_documents/events/room.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"$id": https://schema.jupyter.org/jupyter_server_documents/room/v1
1+
"$id": https://schema.jupyter.org/jupyter_collaboration/session/v1
22
"$schema": "http://json-schema.org/draft-07/schema"
33
version: "1"
44
title: Room events
@@ -23,7 +23,7 @@ properties:
2323
room:
2424
type: string
2525
description: |
26-
Room ID. This is a composite ID that takes the format `{file_type}:{file_format}:{file_id}`.
26+
Room ID. This is a composite ID that takes the format `{file_format}:{file_type}:{file_id}`.
2727
path:
2828
type: string
2929
description: |

jupyter_server_documents/rooms/yroom_events_api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ class YRoomEventsAPI:
1111
`jupyter_events.EventLogger` singleton in `jupyter_server`.
1212
1313
JSD room and awareness events have the same structure as
14-
`jupyter_collaboration` v4 session and awareness events. The only difference
15-
is that JSD emits to a different schema ID/URI. This is defined in the `$id`
16-
property of the corresponding event schema.
14+
`jupyter_collaboration` v4 session and awareness events and emit on the same
15+
schema IDs. Fork events are not emitted.
1716
1817
The event schemas must be registered via
1918
`event_logger.register_event_schema()` in advance. This should be done when

0 commit comments

Comments
 (0)