replace definitions/*event.yaml with symlinks to /event-schemas/
This commit is contained in:
parent
2cf8da6b20
commit
c49338006a
11 changed files with 34 additions and 62 deletions
1
api/client-server/v1/core
Symbolic link
1
api/client-server/v1/core
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
events/core
|
|
@ -1,7 +0,0 @@
|
||||||
type: object
|
|
||||||
description: A Matrix Event
|
|
||||||
properties:
|
|
||||||
event_id:
|
|
||||||
type: string
|
|
||||||
description: An event ID.
|
|
||||||
required: ["event_id"]
|
|
|
@ -1,9 +0,0 @@
|
||||||
type: object
|
|
||||||
description: A Matrix Room Event
|
|
||||||
properties:
|
|
||||||
event_id:
|
|
||||||
type: string
|
|
||||||
description: An event ID.
|
|
||||||
room_id:
|
|
||||||
type: string
|
|
||||||
required: ["event_id", "room_id"]
|
|
|
@ -1,11 +0,0 @@
|
||||||
type: object
|
|
||||||
description: A Matrix State Event
|
|
||||||
properties:
|
|
||||||
event_id:
|
|
||||||
type: string
|
|
||||||
description: An event ID.
|
|
||||||
room_id:
|
|
||||||
type: string
|
|
||||||
state_key:
|
|
||||||
type: string
|
|
||||||
required: ["event_id", "room_id", "state_key"]
|
|
1
api/client-server/v1/events
Symbolic link
1
api/client-server/v1/events
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../event-schemas/schema/v1
|
|
@ -205,4 +205,4 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
title: PresenceEvent
|
title: PresenceEvent
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/event.yaml"
|
- "$ref": "events/core/event.json"
|
||||||
|
|
|
@ -82,7 +82,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
title: RoomEvent
|
title: RoomEvent
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/room_event.yaml"
|
- "$ref": "events/core/room_event.json"
|
||||||
400:
|
400:
|
||||||
description: "Bad pagination ``from`` parameter."
|
description: "Bad pagination ``from`` parameter."
|
||||||
"/initialSync":
|
"/initialSync":
|
||||||
|
@ -253,7 +253,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
title: Event
|
title: Event
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/event.yaml"
|
- "$ref": "events/core/event.json"
|
||||||
rooms:
|
rooms:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -294,7 +294,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
title: RoomEvent
|
title: RoomEvent
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/room_event.yaml"
|
- "$ref": "events/core/room_event.json"
|
||||||
required: ["start", "end", "chunk"]
|
required: ["start", "end", "chunk"]
|
||||||
state:
|
state:
|
||||||
type: array
|
type: array
|
||||||
|
@ -307,7 +307,7 @@ paths:
|
||||||
title: StateEvent
|
title: StateEvent
|
||||||
type: object
|
type: object
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/state_event.yaml"
|
- "$ref": "events/core/state_event.json"
|
||||||
visibility:
|
visibility:
|
||||||
type: string
|
type: string
|
||||||
enum: ["private", "public"]
|
enum: ["private", "public"]
|
||||||
|
@ -350,6 +350,6 @@ paths:
|
||||||
}
|
}
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- "$ref": "definitions/event.yaml"
|
- "$ref": "events/core/event.json"
|
||||||
404:
|
404:
|
||||||
description: The event was not found or you do not have permission to read this event.
|
description: The event was not found or you do not have permission to read this event.
|
||||||
|
|
BIN
event-schemas/schema/v1/core/.room_event.json.swp
Normal file
BIN
event-schemas/schema/v1/core/.room_event.json.swp
Normal file
Binary file not shown.
|
@ -1,17 +1,8 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Event",
|
"title": "Event",
|
||||||
"description": "The basic set of fields all events must have.",
|
"description": "The basic set of fields all events must have.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"event_id": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "The globally unique event identifier."
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Contains the fully-qualified ID of the user who *sent* this event."
|
|
||||||
},
|
|
||||||
"content": {
|
"content": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
|
"description": "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Room Event",
|
"title": "Room Event",
|
||||||
"description": "In addition to the Event fields, Room Events MUST have the following additional field.",
|
"description": "In addition to the Event fields, Room Events MUST have the following additional field.",
|
||||||
|
@ -10,7 +9,15 @@
|
||||||
"room_id": {
|
"room_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The ID of the room associated with this event."
|
"description": "The ID of the room associated with this event."
|
||||||
}
|
},
|
||||||
|
"event_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The globally unique event identifier."
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Contains the fully-qualified ID of the user who *sent* this event."
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"required": ["room_id"]
|
"required": ["room_id"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"type": "object",
|
||||||
"type": "object",
|
"title": "State Event",
|
||||||
"title": "State Event",
|
"description": "In addition to the Room Event fields, State Events have the following additional fields.",
|
||||||
"description": "In addition to the Room Event fields, State Events have the following additional fields.",
|
"allOf":[{
|
||||||
"allOf":[{
|
"$ref": "core/room_event.json"
|
||||||
"$ref": "core/room_event.json"
|
}],
|
||||||
}],
|
"properties": {
|
||||||
"properties": {
|
"state_key": {
|
||||||
"state_key": {
|
"type": "string",
|
||||||
"type": "string",
|
"description": "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event."
|
||||||
"description": "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event."
|
},
|
||||||
},
|
"prev_content": {
|
||||||
"prev_content": {
|
"type": "object",
|
||||||
"type": "object",
|
"description": "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
|
||||||
"description": "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
|
}
|
||||||
}
|
},
|
||||||
},
|
"required": ["state_key"]
|
||||||
"required": ["state_key"]
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue