Flatten out v1 and v2_alpha directories

As a side effect, I got rid of all of the horrible symlinks and just put
in all of the proper relative paths. Because the horrible symlinks were
horrible.
pull/977/head
Daniel Wagner-Hall 9 years ago
parent 1a4a9af9a7
commit 6c66bfc755

@ -1,6 +1,6 @@
{ {
"type": "object", "type": "object",
"allOf": [{"$ref": "definitions/event_filter.json"}], "allOf": [{"$ref": "event_filter.json"}],
"properties": { "properties": {
"rooms": { "rooms": {
"type": "array", "type": "array",

@ -7,24 +7,24 @@
"state": { "state": {
"description": "description":
"The state events to include for rooms.", "The state events to include for rooms.",
"allOf": [{"$ref": "definitions/room_event_filter.json"}] "allOf": [{"$ref": "room_event_filter.json"}]
}, },
"timeline": { "timeline": {
"description": "description":
"The message and state update events to include for rooms.", "The message and state update events to include for rooms.",
"allOf": [{"$ref": "definitions/room_event_filter.json"}] "allOf": [{"$ref": "room_event_filter.json"}]
}, },
"ephemeral": { "ephemeral": {
"description": "description":
"The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.", "The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.",
"allOf": [{"$ref": "definitions/room_event_filter.json"}] "allOf": [{"$ref": "room_event_filter.json"}]
} }
} }
}, },
"presence": { "presence": {
"description": "description":
"The presence updates to include.", "The presence updates to include.",
"allOf": [{"$ref": "definitions/event_filter.json"}] "allOf": [{"$ref": "event_filter.json"}]
}, },
"event_format": { "event_format": {
"description": "description":

@ -1,6 +1,6 @@
{ {
"type": "object", "type": "object",
"allOf": [{"$ref":"definitions/event_batch.json"}], "allOf": [{"$ref":"event_batch.json"}],
"properties": { "properties": {
"limited": { "limited": {
"type": "boolean", "type": "boolean",

@ -98,6 +98,6 @@ paths:
type: object type: object
title: Event title: Event
allOf: allOf:
- "$ref": "core-event-schema/room_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/room_event.json"
400: 400:
description: "Bad pagination ``from`` parameter." description: "Bad pagination ``from`` parameter."

@ -84,7 +84,7 @@ paths:
type: object type: object
title: Event title: Event
allOf: allOf:
- "$ref": "core-event-schema/room_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/room_event.json"
400: 400:
description: "Bad pagination ``from`` parameter." description: "Bad pagination ``from`` parameter."
"/initialSync": "/initialSync":
@ -285,7 +285,7 @@ paths:
type: object type: object
title: Event title: Event
allOf: allOf:
- "$ref": "core-event-schema/event.json" - "$ref": "../../event-schemas/schema/core-event-schema/event.json"
rooms: rooms:
type: array type: array
items: items:
@ -304,7 +304,7 @@ paths:
title: "InviteEvent" title: "InviteEvent"
description: "The invite event if ``membership`` is ``invite``" description: "The invite event if ``membership`` is ``invite``"
allOf: allOf:
- "$ref": "v1-event-schema/m.room.member" - "$ref": "../../event-schemas/schema/m.room.member"
messages: messages:
type: object type: object
title: PaginationChunk title: PaginationChunk
@ -332,7 +332,7 @@ paths:
type: object type: object
title: RoomEvent title: RoomEvent
allOf: allOf:
- "$ref": "core-event-schema/room_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/room_event.json"
required: ["start", "end", "chunk"] required: ["start", "end", "chunk"]
state: state:
type: array type: array
@ -345,7 +345,7 @@ paths:
title: StateEvent title: StateEvent
type: object type: object
allOf: allOf:
- "$ref": "core-event-schema/state_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/state_event.json"
visibility: visibility:
type: string type: string
enum: ["private", "public"] enum: ["private", "public"]
@ -361,7 +361,7 @@ paths:
title: Event title: Event
type: object type: object
allOf: allOf:
- "$ref": "core-event-schema/event.json" - "$ref": "../../event-schemas/schema/core-event-schema/event.json"
required: ["room_id", "membership"] required: ["room_id", "membership"]
required: ["end", "rooms", "presence"] required: ["end", "rooms", "presence"]
404: 404:
@ -398,6 +398,6 @@ paths:
} }
schema: schema:
allOf: allOf:
- "$ref": "core-event-schema/event.json" - "$ref": "../../event-schemas/schema/core-event-schema/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.

@ -205,4 +205,4 @@ paths:
type: object type: object
title: PresenceEvent title: PresenceEvent
allOf: allOf:
- "$ref": "core-event-schema/event.json" - "$ref": "../../event-schemas/schema/core-event-schema/event.json"

@ -173,7 +173,7 @@ paths:
title: StateEvent title: StateEvent
type: object type: object
allOf: allOf:
- "$ref": "core-event-schema/state_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/state_event.json"
403: 403:
description: > description: >
You aren't a member of the room and weren't previously a You aren't a member of the room and weren't previously a
@ -355,7 +355,7 @@ paths:
type: object type: object
title: RoomEvent title: RoomEvent
allOf: allOf:
- "$ref": "core-event-schema/room_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/room_event.json"
required: ["start", "end", "chunk"] required: ["start", "end", "chunk"]
state: state:
type: array type: array
@ -368,7 +368,7 @@ paths:
title: StateEvent title: StateEvent
type: object type: object
allOf: allOf:
- "$ref": "core-event-schema/state_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/state_event.json"
visibility: visibility:
type: string type: string
enum: ["private", "public"] enum: ["private", "public"]
@ -383,7 +383,7 @@ paths:
title: Event title: Event
type: object type: object
allOf: allOf:
- "$ref": "core-event-schema/event.json" - "$ref": "../../event-schemas/schema/core-event-schema/event.json"
required: ["room_id"] required: ["room_id"]
403: 403:
description: > description: >
@ -453,7 +453,7 @@ paths:
title: MemberEvent title: MemberEvent
type: object type: object
allOf: allOf:
- "$ref": "v1-event-schema/m.room.member" - "$ref": "../../event-schemas/schema/m.room.member"
403: 403:
description: > description: >
You aren't a member of the room and weren't previously a You aren't a member of the room and weren't previously a

@ -111,7 +111,7 @@ paths:
title: Event title: Event
description: The event that matched. description: The event that matched.
allOf: allOf:
- "$ref": "core-event-schema/room_event.json" - "$ref": "../../event-schemas/schema/core-event-schema/room_event.json"
examples: examples:
application/json: |- application/json: |-
{ {

@ -1 +0,0 @@
v1-event-schema/core-event-schema

@ -1 +0,0 @@
../../../event-schemas/schema/v1

@ -1,10 +0,0 @@
type: object
description: A Matrix-level Error
properties:
errcode:
type: string
description: An error code.
error:
type: string
description: A human-readable error message.
required: ["errcode"]

@ -7,7 +7,7 @@ resolved correctly. For basic CLI testing, we recommend and have verified they
work with the Node.js package [z-schema](https://github.com/zaggino/z-schema): work with the Node.js package [z-schema](https://github.com/zaggino/z-schema):
``` ```
$ npm install -g z-schema $ npm install -g z-schema
$ z-schema schema/v1/m.room.message examples/v1/m.room.message_m.text $ z-schema schema/m.room.message examples/m.room.message_m.text
schema validation passed schema validation passed
json #1 validation passed json #1 validation passed
``` ```

@ -6,17 +6,17 @@ if ! which z-schema; then
exit 1 exit 1
fi fi
find schema/v1/m.* | while read line find schema/m.* | while read line
do do
split_path=(${line///// }) split_path=(${line///// })
event_type=(${split_path[2]}) event_type=(${split_path[2]})
echo "Checking $event_type" echo "Checking $event_type"
echo "--------------------" echo "--------------------"
# match exact name or exact name with a #<something> # match exact name or exact name with a #<something>
find examples/v1 -name $event_type -o -name "$event_type#*" | while read exline find examples -name $event_type -o -name "$event_type#*" | while read exline
do do
echo " against $exline" echo " against $exline"
# run z-schema: because of bash -e if this fails we bail with exit code 1 # run z-schema: because of bash -e if this fails we bail with exit code 1
z-schema schema/v1/$event_type $exline z-schema schema/$event_type $exline
done done
done done

@ -3,7 +3,7 @@
"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.",
"allOf":[{ "allOf":[{
"$ref": "core-event-schema/event.json" "$ref": "event.json"
}], }],
"properties": { "properties": {
"room_id": { "room_id": {

@ -3,7 +3,7 @@
"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-event-schema/room_event.json" "$ref": "room_event.json"
}], }],
"properties": { "properties": {
"state_key": { "state_key": {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save