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
|
||||
title: PresenceEvent
|
||||
allOf:
|
||||
- "$ref": "definitions/event.yaml"
|
||||
- "$ref": "events/core/event.json"
|
||||
|
|
|
@ -82,7 +82,7 @@ paths:
|
|||
type: object
|
||||
title: RoomEvent
|
||||
allOf:
|
||||
- "$ref": "definitions/room_event.yaml"
|
||||
- "$ref": "events/core/room_event.json"
|
||||
400:
|
||||
description: "Bad pagination ``from`` parameter."
|
||||
"/initialSync":
|
||||
|
@ -253,7 +253,7 @@ paths:
|
|||
type: object
|
||||
title: Event
|
||||
allOf:
|
||||
- "$ref": "definitions/event.yaml"
|
||||
- "$ref": "events/core/event.json"
|
||||
rooms:
|
||||
type: array
|
||||
items:
|
||||
|
@ -294,7 +294,7 @@ paths:
|
|||
type: object
|
||||
title: RoomEvent
|
||||
allOf:
|
||||
- "$ref": "definitions/room_event.yaml"
|
||||
- "$ref": "events/core/room_event.json"
|
||||
required: ["start", "end", "chunk"]
|
||||
state:
|
||||
type: array
|
||||
|
@ -307,7 +307,7 @@ paths:
|
|||
title: StateEvent
|
||||
type: object
|
||||
allOf:
|
||||
- "$ref": "definitions/state_event.yaml"
|
||||
- "$ref": "events/core/state_event.json"
|
||||
visibility:
|
||||
type: string
|
||||
enum: ["private", "public"]
|
||||
|
@ -350,6 +350,6 @@ paths:
|
|||
}
|
||||
schema:
|
||||
allOf:
|
||||
- "$ref": "definitions/event.yaml"
|
||||
- "$ref": "events/core/event.json"
|
||||
404:
|
||||
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",
|
||||
"title": "Event",
|
||||
"description": "The basic set of fields all events must have.",
|
||||
"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": {
|
||||
"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."
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"type": "object",
|
||||
"title": "Room Event",
|
||||
"description": "In addition to the Event fields, Room Events MUST have the following additional field.",
|
||||
|
@ -10,7 +9,15 @@
|
|||
"room_id": {
|
||||
"type": "string",
|
||||
"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"]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"type": "object",
|
||||
"title": "State Event",
|
||||
"description": "In addition to the Room Event fields, State Events have the following additional fields.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue