From 6dfc923c1d58ef8c3412ac50e8e4c970ebe9be6d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 12 Jul 2016 13:10:36 +0100 Subject: [PATCH 1/6] Remove references to intialSync etc, and rewrite syncing The 'Events' section of the C-S spec was full of outdated references to the v1 sync api, which is long dead. (https://matrix.org/jira/browse/SPEC-414). Also, try to clarify why /sync distinguishes state and timeline (https://matrix.org/jira/browse/SPEC-423). --- specification/client_server_api.rst | 145 ++++++++++++++-------------- 1 file changed, 74 insertions(+), 71 deletions(-) diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 17a86922..07d6c7a0 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -688,64 +688,8 @@ considered as a list of events. The server 'linearises' the eventually-consistent event graph of events into an 'event stream' at any given point in time:: - [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6]->[E7]->[E8]->[E9] + [E0]->[E1]->[E2]->[E3]->[E4]->[E5] -Clients can add to the stream by PUTing message or state events, and can read -from the stream via the -|/initialSync|_, -|/events|_, -|/rooms//initialSync|_, and -|/rooms//messages|_ -APIs. - -For reading events, the intended flow of operation is to call -/_matrix/client/%CLIENT_MAJOR_VERSION%/initialSync, which returns all of the -state and the last N events in the -event stream for each room, including ``start`` and ``end`` values describing the -pagination of each room's event stream. For instance, -/_matrix/client/%CLIENT_MAJOR_VERSION%/initialSync?limit=5 might return the -events for a room in the -rooms[0].messages.chunk[] array, with tokens describing the start and end of the -range in rooms[0].messages.start as '1-2-3' and rooms[0].messages.end as -'a-b-c'. - -You can visualise the range of events being returned as:: - - [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6]->[E7]->[E8]->[E9] - ^ ^ - | | - start: '1-2-3' end: 'a-b-c' - -Now, to receive future events in real-time on the event stream, you simply GET -/_matrix/client/%CLIENT_MAJOR_VERSION%/events with a ``from`` parameter of -'a-b-c': in other words passing in the -``end`` token returned by initial sync. The request blocks until new events are -available or until your specified timeout elapses, and then returns a -new paginatable chunk of events alongside new start and end parameters:: - - [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6]->[E7]->[E8]->[E9]->[E10] - ^ ^ - | | - | end: 'x-y-z' - start: 'a-b-c' - -To resume polling the events stream, you pass in the new ``end`` token as the -``from`` parameter of /_matrix/client/%CLIENT_MAJOR_VERSION%/events and poll again. - -Similarly, to paginate events backwards in order to lazy-load in previous -history from the room, you simply -GET /_matrix/client/%CLIENT_MAJOR_VERSION%/rooms//messages -specifying the ``from`` token to paginate backwards from and a limit of the number -of messages to retrieve. For instance, calling this API with a ``from`` parameter -of '1-2-3' and a limit of 5 would return:: - - [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6]->[E7]->[E8]->[E9]->[E10] - ^ ^ - | | - start: 'u-v-w' end: '1-2-3' - -To continue paginating backwards, one calls the /messages API again, supplying -the new ``start`` value as the ``from`` parameter. Types of room events @@ -775,14 +719,56 @@ namespaced for each application and reduces the risk of clashes. Syncing ~~~~~~~ -Clients receive new events by "long-polling" the homeserver via the events API. -This involves specifying a timeout in the request which will hold -open the HTTP connection for a short period of time waiting for new events, -returning early if an event occurs. Only the events API supports long-polling. -All events which are visible to the client will appear in the -events API. When the request returns, an ``end`` token is included in the -response. This token can be used in the next request to continue where the -last request left off. Multiple events can be returned per long-poll. +To read events, the intended flow of operation is for clients to first call the +|/sync|_ API without a ``since`` parameter. This returns the most recent +message events for each room, as well as the state of the room at the start of +the returned timeline. The response also includes a ``next_batch`` field, which +should be used as the value of the ``since`` parameter in the next call to +``/sync``. Finally, the response includes, for each room, a ``prev_batch`` +field, which can be passed as a ``start`` parameter to the +|/rooms//messages|_ API to retrieve earlier messages. + +You can visualise the range of events being returned as:: + + [E0]->[E1]->[E2]->[E3]->[E4]->[E5] + ^ ^ + | | + prev_batch: '1-2-3' next_batch: 'a-b-c' + + +Clients then receive new events by "long-polling" the homeserver via the +``/sync`` API, passing the value of the ``next_batch`` field from the response +to the previous call as the ``since`` parameter. This involves specifying a +timeout in the request which will hold open the HTTP connection for a short +period of time waiting for new events, returning early if an event occurs. Only +the ``/sync`` API (and the deprecated ``/events`` API) support long-polling in +this way. + +The response for such an incremental sync can be visualised as:: + + [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6] + ^ ^ + | | + | next_batch: 'x-y-z' + prev_batch: 'a-b-c' + + +Normally, all new events which are visible to the client will appear in the +response to the ``/sync`` API. However, if a large number of events arrive +between calls to ``/sync``, a "limited" timeline is returned, containing only +the most recent message events. A state "delta" is also returned, summarising +any state changes in the omitted part of the timeline. The client may therefore +end up with "gaps" in its knowledge of the message timeline. The client can +fill these gaps using the |/rooms//messages|_ API. This situation +looks like this:: + + | gap | + | <-> | + [E0]->[E1]->[E2]->[E3]->[E4]->[E5]->[E6]->[E7]->[E8]->[E9]->[E10] + ^ ^ + | | + prev_batch: 'd-e-f' next_batch: 'u-v-w' + .. Warning:: Events are ordered in this API according to the arrival time of the event on @@ -791,17 +777,32 @@ last request left off. Multiple events can be returned per long-poll. being received (once per distinct API called). Clients SHOULD de-duplicate events based on the event ID when this happens. +.. NOTE:: + + The ``/sync`` API returns a ``state`` list which is separate from the + ``timeline``. This ``state`` list allows clients to keep their model of the + room state in sync with that on the server. In the case of an intial + (``since``-less) sync, the ``state`` list represents the complete state of + the room at the **start** of the returned timeline (so in the case of a + recently-created room whose state fits entirely in the ``timeline``, the + ``state`` list will be empty). + + In the case of an incremental sync, the ``state`` list gives a delta + between the state of the room at the ``since`` parameter and that at the + start of the returned ``timeline``. (It will therefore be empty + unless the timeline was ``limited``.) + + In both cases, it should be noted that the events returned in the ``state`` + list did **not** necessarily take place just before the returned + ``timeline``, so clients should not display them to the user in the timeline. + .. TODO-spec Do we ever support streaming requests? Why not websockets? -When the client first logs in, they will need to initially synchronise with -their homeserver. This is achieved via the initial sync API described below. -This API also returns an ``end`` token which can be used with the event stream. +{{sync_cs_http_api}} {{old_sync_cs_http_api}} -{{sync_cs_http_api}} - Getting events for a room ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1046,7 +1047,9 @@ Leaving rooms A user can leave a room to stop receiving events for that room. A user must have been invited to or have joined the room before they are eligible to leave the room. Leaving a room to which the user has been invited rejects the invite. -Once a user leaves a room, it will no longer appear on the |/initialSync|_ API. +Once a user leaves a room, it will no longer appear in the response to the +|/sync|_ API unless it is explicitly requested via a filter with the +``include_leave`` field set to ``true``. Whether or not they actually joined the room, if the room is an "invite-only" room they will need to be re-invited before they can re-join From 017935d8e9b0e55f84cecc45972a3917543d38f1 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 12 Jul 2016 14:15:52 +0100 Subject: [PATCH 2/6] Fix typo --- specification/client_server_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 07d6c7a0..74741792 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -781,7 +781,7 @@ looks like this:: The ``/sync`` API returns a ``state`` list which is separate from the ``timeline``. This ``state`` list allows clients to keep their model of the - room state in sync with that on the server. In the case of an intial + room state in sync with that on the server. In the case of an initial (``since``-less) sync, the ``state`` list represents the complete state of the room at the **start** of the returned timeline (so in the case of a recently-created room whose state fits entirely in the ``timeline``, the From 4118ce6680fb9f041029e7fa8462ad44376e70db Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 12 Jul 2016 14:48:03 +0100 Subject: [PATCH 3/6] Add rationale to /sync --- specification/client_server_api.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 74741792..9ed169dc 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -796,6 +796,20 @@ looks like this:: list did **not** necessarily take place just before the returned ``timeline``, so clients should not display them to the user in the timeline. +.. admonition:: Rationale + + An early design of this specification made the ``state`` list represent the + room state at the end of the returned timeline, instead of the start. This + was unsatisfactory because it led to duplication of events between the + ``state`` list and the ``timeline``, but more importantly, it made it + difficult for clients to show the timeline correctly. + + In particular, consider a returned timeline [M0, S1, M2], where M0 and M2 are + both messages sent by the same user, and S1 is a state event where that user + changes their displayname. If the ``state`` list represents the room state at + the end of the timeline, the client must take a copy of the state dictionary, + and *rewind* S1, in order to correctly calculate the display name for M0. + .. TODO-spec Do we ever support streaming requests? Why not websockets? From 9d267795e0a41a26fd7519c8de3d4c435f4bc8c1 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 12 Jul 2016 14:58:33 +0100 Subject: [PATCH 4/6] Move /room/x/initialSync to after the undeprecated APIs It's a bit incongruous to have to read through the deprecated /initialSync to get to the good stuff. Separate out intialSync so that we can move it later in the spec. --- api/client-server/room_initial_sync.yaml | 228 +++++++++++++++++++++++ api/client-server/rooms.yaml | 212 --------------------- specification/client_server_api.rst | 3 +- 3 files changed, 230 insertions(+), 213 deletions(-) create mode 100644 api/client-server/room_initial_sync.yaml diff --git a/api/client-server/room_initial_sync.yaml b/api/client-server/room_initial_sync.yaml new file mode 100644 index 00000000..f7a7e114 --- /dev/null +++ b/api/client-server/room_initial_sync.yaml @@ -0,0 +1,228 @@ +swagger: '2.0' +info: + title: "Matrix Client-Server Rooms API" + version: "1.0.0" +host: localhost:8008 +schemes: + - https + - http +basePath: /_matrix/client/%CLIENT_MAJOR_VERSION% +consumes: + - application/json +produces: + - application/json +securityDefinitions: + $ref: definitions/security.yaml +paths: + "/rooms/{roomId}/initialSync": + get: + summary: Snapshot the current state of a room and its most recent messages. + description: |- + Get a copy of the current state and the most recent messages in a room. + security: + - accessToken: [] + parameters: + - in: path + type: string + name: roomId + description: The room to get the data. + required: true + x-example: "!636q39766251:example.com" + responses: + 200: + description: The current state of the room + examples: + application/json: |- + { + "membership": "join", + "messages": { + "chunk": [ + { + "age": 343513403, + "content": { + "body": "foo", + "msgtype": "m.text" + }, + "event_id": "$14328044851tzTJS:example.com", + "origin_server_ts": 1432804485886, + "room_id": "!636q39766251:example.com", + "type": "m.room.message", + "sender": "@alice:example.com" + }, + { + "age": 343511809, + "content": { + "body": "bar", + "msgtype": "m.text" + }, + "event_id": "$14328044872spjFg:example.com", + "origin_server_ts": 1432804487480, + "room_id": "!636q39766251:example.com", + "type": "m.room.message", + "sender": "@bob:example.com" + } + ], + "end": "s3456_9_0", + "start": "t44-3453_9_0" + }, + "room_id": "!636q39766251:example.com", + "state": [ + { + "age": 7148266897, + "content": { + "join_rule": "public" + }, + "event_id": "$14259997323TLwtb:example.com", + "origin_server_ts": 1425999732392, + "room_id": "!636q39766251:example.com", + "state_key": "", + "type": "m.room.join_rules", + "sender": "@alice:example.com" + }, + { + "age": 6547561012, + "content": { + "avatar_url": "mxc://example.com/fzysBrHpPEeTGANCVLXWXNMI#auto", + "membership": "join" + }, + "event_id": "$1426600438280zExKY:example.com", + "membership": "join", + "origin_server_ts": 1426600438277, + "room_id": "!636q39766251:example.com", + "state_key": "@alice:example.com", + "type": "m.room.member", + "sender": "@alice:example.com" + }, + { + "age": 7148267200, + "content": { + "creator": "@alice:example.com" + }, + "event_id": "$14259997320KhbwJ:example.com", + "origin_server_ts": 1425999732089, + "room_id": "!636q39766251:example.com", + "state_key": "", + "type": "m.room.create", + "sender": "@alice:example.com" + }, + { + "age": 1622568720, + "content": { + "avatar_url": "mxc://example.com/GCmhgzMPRjqgpODLsNQzVuHZ#auto", + "displayname": "Bob", + "membership": "join" + }, + "event_id": "$1431525430134MxlLX:example.com", + "origin_server_ts": 1431525430569, + "replaces_state": "$142652023736BSXcM:example.com", + "room_id": "!636q39766251:example.com", + "state_key": "@bob:example.com", + "type": "m.room.member", + "sender": "@bob:example.com" + }, + { + "age": 7148267004, + "content": { + "ban": 50, + "events": { + "m.room.name": 100, + "m.room.power_levels": 100 + }, + "events_default": 0, + "kick": 50, + "redact": 50, + "state_default": 50, + "users": { + "@alice:example.com": 100 + }, + "users_default": 0 + }, + "event_id": "$14259997322mqfaq:example.com", + "origin_server_ts": 1425999732285, + "room_id": "!636q39766251:example.com", + "state_key": "", + "type": "m.room.power_levels", + "sender": "@alice:example.com" + } + ], + "visibility": "private", + "account_data": [{ + "type": "m.tag", + "content": {"tags": {"work": {"order": "1"}}} + }] + } + schema: + title: RoomInfo + type: object + properties: + room_id: + type: string + description: "The ID of this room." + membership: + type: string + description: "The user's membership state in this room." + enum: ["invite", "join", "leave", "ban"] + messages: + type: object + title: PaginationChunk + description: "The pagination chunk for this room." + properties: + start: + type: string + description: |- + A token which correlates to the first value in ``chunk``. + Used for pagination. + end: + type: string + description: |- + A token which correlates to the last value in ``chunk``. + Used for pagination. + chunk: + type: array + description: |- + If the user is a member of the room this will be a + list of the most recent messages for this room. If + the user has left the room this will be the + messages that preceeded them leaving. This array + will consist of at most ``limit`` elements. + items: + type: object + title: RoomEvent + allOf: + - "$ref": "definitions/event-schemas/schema/core-event-schema/room_event.yaml" + required: ["start", "end", "chunk"] + state: + type: array + description: |- + If the user is a member of the room this will be the + current state of the room as a list of events. If the + user has left the room this will be the state of the + room when they left it. + items: + title: StateEvent + type: object + allOf: + - "$ref": "definitions/event-schemas/schema/core-event-schema/state_event.yaml" + visibility: + type: string + enum: ["private", "public"] + description: |- + Whether this room is visible to the ``/publicRooms`` API + or not." + account_data: + type: array + description: |- + The private data that this user has attached to this room. + items: + title: Event + type: object + allOf: + - "$ref": "definitions/event-schemas/schema/core-event-schema/event.yaml" + required: ["room_id"] + 403: + description: > + You aren't a member of the room and weren't previously a + member of the room. + tags: + - Room participation + deprecated: true diff --git a/api/client-server/rooms.yaml b/api/client-server/rooms.yaml index 6b9f28f2..0a3397a5 100644 --- a/api/client-server/rooms.yaml +++ b/api/client-server/rooms.yaml @@ -217,218 +217,6 @@ paths: member of the room. tags: - Room participation - "/rooms/{roomId}/initialSync": - get: - summary: Snapshot the current state of a room and its most recent messages. - description: |- - Get a copy of the current state and the most recent messages in a room. - security: - - accessToken: [] - parameters: - - in: path - type: string - name: roomId - description: The room to get the data. - required: true - x-example: "!636q39766251:example.com" - responses: - 200: - description: The current state of the room - examples: - application/json: |- - { - "membership": "join", - "messages": { - "chunk": [ - { - "age": 343513403, - "content": { - "body": "foo", - "msgtype": "m.text" - }, - "event_id": "$14328044851tzTJS:example.com", - "origin_server_ts": 1432804485886, - "room_id": "!636q39766251:example.com", - "type": "m.room.message", - "sender": "@alice:example.com" - }, - { - "age": 343511809, - "content": { - "body": "bar", - "msgtype": "m.text" - }, - "event_id": "$14328044872spjFg:example.com", - "origin_server_ts": 1432804487480, - "room_id": "!636q39766251:example.com", - "type": "m.room.message", - "sender": "@bob:example.com" - } - ], - "end": "s3456_9_0", - "start": "t44-3453_9_0" - }, - "room_id": "!636q39766251:example.com", - "state": [ - { - "age": 7148266897, - "content": { - "join_rule": "public" - }, - "event_id": "$14259997323TLwtb:example.com", - "origin_server_ts": 1425999732392, - "room_id": "!636q39766251:example.com", - "state_key": "", - "type": "m.room.join_rules", - "sender": "@alice:example.com" - }, - { - "age": 6547561012, - "content": { - "avatar_url": "mxc://example.com/fzysBrHpPEeTGANCVLXWXNMI#auto", - "membership": "join" - }, - "event_id": "$1426600438280zExKY:example.com", - "membership": "join", - "origin_server_ts": 1426600438277, - "room_id": "!636q39766251:example.com", - "state_key": "@alice:example.com", - "type": "m.room.member", - "sender": "@alice:example.com" - }, - { - "age": 7148267200, - "content": { - "creator": "@alice:example.com" - }, - "event_id": "$14259997320KhbwJ:example.com", - "origin_server_ts": 1425999732089, - "room_id": "!636q39766251:example.com", - "state_key": "", - "type": "m.room.create", - "sender": "@alice:example.com" - }, - { - "age": 1622568720, - "content": { - "avatar_url": "mxc://example.com/GCmhgzMPRjqgpODLsNQzVuHZ#auto", - "displayname": "Bob", - "membership": "join" - }, - "event_id": "$1431525430134MxlLX:example.com", - "origin_server_ts": 1431525430569, - "replaces_state": "$142652023736BSXcM:example.com", - "room_id": "!636q39766251:example.com", - "state_key": "@bob:example.com", - "type": "m.room.member", - "sender": "@bob:example.com" - }, - { - "age": 7148267004, - "content": { - "ban": 50, - "events": { - "m.room.name": 100, - "m.room.power_levels": 100 - }, - "events_default": 0, - "kick": 50, - "redact": 50, - "state_default": 50, - "users": { - "@alice:example.com": 100 - }, - "users_default": 0 - }, - "event_id": "$14259997322mqfaq:example.com", - "origin_server_ts": 1425999732285, - "room_id": "!636q39766251:example.com", - "state_key": "", - "type": "m.room.power_levels", - "sender": "@alice:example.com" - } - ], - "visibility": "private", - "account_data": [{ - "type": "m.tag", - "content": {"tags": {"work": {"order": "1"}}} - }] - } - schema: - title: RoomInfo - type: object - properties: - room_id: - type: string - description: "The ID of this room." - membership: - type: string - description: "The user's membership state in this room." - enum: ["invite", "join", "leave", "ban"] - messages: - type: object - title: PaginationChunk - description: "The pagination chunk for this room." - properties: - start: - type: string - description: |- - A token which correlates to the first value in ``chunk``. - Used for pagination. - end: - type: string - description: |- - A token which correlates to the last value in ``chunk``. - Used for pagination. - chunk: - type: array - description: |- - If the user is a member of the room this will be a - list of the most recent messages for this room. If - the user has left the room this will be the - messages that preceeded them leaving. This array - will consist of at most ``limit`` elements. - items: - type: object - title: RoomEvent - allOf: - - "$ref": "definitions/event-schemas/schema/core-event-schema/room_event.yaml" - required: ["start", "end", "chunk"] - state: - type: array - description: |- - If the user is a member of the room this will be the - current state of the room as a list of events. If the - user has left the room this will be the state of the - room when they left it. - items: - title: StateEvent - type: object - allOf: - - "$ref": "definitions/event-schemas/schema/core-event-schema/state_event.yaml" - visibility: - type: string - enum: ["private", "public"] - description: |- - Whether this room is visible to the ``/publicRooms`` API - or not." - account_data: - type: array - description: |- - The private data that this user has attached to this room. - items: - title: Event - type: object - allOf: - - "$ref": "definitions/event-schemas/schema/core-event-schema/event.yaml" - required: ["room_id"] - 403: - description: > - You aren't a member of the room and weren't previously a - member of the room. - tags: - - Room participation - deprecated: true "/rooms/{roomId}/members": get: summary: Get the m.room.member events for the room. diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 17a86922..006d6fb8 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -810,9 +810,10 @@ There are several APIs provided to ``GET`` events for a room: {{rooms_cs_http_api}} - {{message_pagination_cs_http_api}} +{{room_initial_sync_cs_http_api}} + Sending events to a room ~~~~~~~~~~~~~~~~~~~~~~~~ From 49cd65dd584267126634877cc99d865bf42f90f3 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 12 Jul 2016 17:22:33 +0100 Subject: [PATCH 5/6] Add a license to the spec We're licensing hte spec under ASLv2. Add the LICENSE file, and add the short-form to as much of the source as is practical right now (adding it to json source is a massive pita). --- LICENSE | 177 ++++++++++++++++++ .../application_service.yaml | 13 ++ api/check_examples.py | 14 ++ api/client-server/account-data.yaml | 13 ++ api/client-server/admin.yaml | 13 ++ api/client-server/administrative_contact.yaml | 13 ++ api/client-server/banning.yaml | 13 ++ api/client-server/content-repo.yaml | 13 ++ api/client-server/create_room.yaml | 13 ++ api/client-server/definitions/auth_data.yaml | 13 ++ .../definitions/auth_response.yaml | 13 ++ api/client-server/definitions/error.yaml | 13 ++ api/client-server/definitions/event.yaml | 13 ++ .../definitions/event_batch.yaml | 13 ++ .../definitions/event_filter.yaml | 13 ++ .../definitions/push_condition.yaml | 13 ++ api/client-server/definitions/push_rule.yaml | 13 ++ .../definitions/push_ruleset.yaml | 13 ++ .../definitions/room_event_filter.yaml | 13 ++ api/client-server/definitions/security.yaml | 13 ++ .../definitions/sync_filter.yaml | 13 ++ .../definitions/timeline_batch.yaml | 13 ++ api/client-server/directory.yaml | 13 ++ api/client-server/event_context.yaml | 13 ++ api/client-server/filter.yaml | 13 ++ api/client-server/inviting.yaml | 13 ++ api/client-server/joining.yaml | 13 ++ api/client-server/kicking.yaml | 13 ++ api/client-server/leaving.yaml | 13 ++ api/client-server/list_public_rooms.yaml | 13 ++ api/client-server/login.yaml | 13 ++ api/client-server/logout.yaml | 13 ++ api/client-server/message_pagination.yaml | 13 ++ api/client-server/old_sync.yaml | 13 ++ api/client-server/peeking_events.yaml | 13 ++ api/client-server/presence.yaml | 13 ++ api/client-server/profile.yaml | 13 ++ api/client-server/pusher.yaml | 13 ++ api/client-server/pushrules.yaml | 13 ++ api/client-server/receipts.yaml | 13 ++ api/client-server/redaction.yaml | 13 ++ api/client-server/registration.yaml | 13 ++ api/client-server/room_send.yaml | 13 ++ api/client-server/room_state.yaml | 13 ++ api/client-server/rooms.yaml | 13 ++ api/client-server/search.yaml | 13 ++ api/client-server/sync.yaml | 13 ++ api/client-server/tags.yaml | 13 ++ api/client-server/third_party_membership.yaml | 13 ++ api/client-server/typing.yaml | 13 ++ api/client-server/versions.yaml | 13 ++ api/client-server/voip.yaml | 13 ++ api/identity/lookup.yaml | 13 ++ api/identity/pubkey.yaml | 13 ++ api/push-gateway/push_notifier.yaml | 13 ++ event-schemas/check_examples.py | 14 ++ scripts/dump-swagger.py | 15 ++ scripts/gendoc.py | 14 ++ scripts/swagger-http-server.py | 15 +- specification/appendices.rst | 14 ++ specification/application_service_api.rst | 14 ++ specification/client_server_api.rst | 14 ++ specification/event_signing.rst | 14 ++ specification/events.rst | 14 ++ specification/feature_profiles.rst | 14 ++ specification/identity_servers.rst | 14 ++ specification/identity_service_api.rst | 14 ++ specification/index.rst | 14 ++ specification/intro.rst | 28 ++- specification/modules.rst | 14 ++ specification/modules/_template.rst | 14 ++ specification/modules/account_data.rst | 14 ++ specification/modules/admin.rst | 14 ++ specification/modules/anonymous_access.rst | 14 ++ specification/modules/content_repo.rst | 14 ++ .../modules/end_to_end_encryption.rst | 14 ++ specification/modules/event_context.rst | 14 ++ specification/modules/guest_access.rst | 14 ++ specification/modules/history_visibility.rst | 14 ++ specification/modules/instant_messaging.rst | 14 ++ specification/modules/presence.rst | 14 ++ specification/modules/push.rst | 14 ++ specification/modules/receipts.rst | 14 ++ specification/modules/room_previews.rst | 14 ++ specification/modules/search.rst | 14 ++ specification/modules/tags.rst | 14 ++ specification/modules/third_party_invites.rst | 14 ++ .../modules/typing_notifications.rst | 14 ++ specification/modules/voip_events.rst | 14 ++ specification/push_gateway.rst | 14 ++ specification/server_server_api.rst | 14 ++ templating/batesian/__init__.py | 13 ++ templating/batesian/sections.py | 13 ++ templating/batesian/units.py | 13 ++ templating/build.py | 15 ++ templating/matrix_templates/__init__.py | 13 ++ templating/matrix_templates/sections.py | 13 ++ templating/matrix_templates/units.py | 13 ++ 98 files changed, 1488 insertions(+), 5 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f433b1a5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/api/application-service/application_service.yaml b/api/application-service/application_service.yaml index 3fd864d2..d7ad5b19 100644 --- a/api/application-service/application_service.yaml +++ b/api/application-service/application_service.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Application Service API" diff --git a/api/check_examples.py b/api/check_examples.py index b206a737..009055be 100755 --- a/api/check_examples.py +++ b/api/check_examples.py @@ -1,4 +1,18 @@ #! /usr/bin/env python +# +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import sys import json diff --git a/api/client-server/account-data.yaml b/api/client-server/account-data.yaml index 95b6d18f..934c59cf 100644 --- a/api/client-server/account-data.yaml +++ b/api/client-server/account-data.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Client Config API" diff --git a/api/client-server/admin.yaml b/api/client-server/admin.yaml index 44f02301..a27596a8 100644 --- a/api/client-server/admin.yaml +++ b/api/client-server/admin.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Administration API" diff --git a/api/client-server/administrative_contact.yaml b/api/client-server/administrative_contact.yaml index 003b9f82..73f2e05c 100644 --- a/api/client-server/administrative_contact.yaml +++ b/api/client-server/administrative_contact.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Account Administrative Contact API" diff --git a/api/client-server/banning.yaml b/api/client-server/banning.yaml index 59eab4bc..cdeaaa5d 100644 --- a/api/client-server/banning.yaml +++ b/api/client-server/banning.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Banning API" diff --git a/api/client-server/content-repo.yaml b/api/client-server/content-repo.yaml index 7a44b866..53585ce4 100644 --- a/api/client-server/content-repo.yaml +++ b/api/client-server/content-repo.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Content Repository API" diff --git a/api/client-server/create_room.yaml b/api/client-server/create_room.yaml index ece16961..cf4e2a48 100644 --- a/api/client-server/create_room.yaml +++ b/api/client-server/create_room.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Creation API" diff --git a/api/client-server/definitions/auth_data.yaml b/api/client-server/definitions/auth_data.yaml index d9c93d21..c37c6a48 100644 --- a/api/client-server/definitions/auth_data.yaml +++ b/api/client-server/definitions/auth_data.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. title: Authentication Data description: |- Used by clients to submit authentication information to the interactive-authentication API diff --git a/api/client-server/definitions/auth_response.yaml b/api/client-server/definitions/auth_response.yaml index 3fd800ea..5caf7a88 100644 --- a/api/client-server/definitions/auth_response.yaml +++ b/api/client-server/definitions/auth_response.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. title: Authentication response description: |- Used by servers to indicate that additional authentication information is required, diff --git a/api/client-server/definitions/error.yaml b/api/client-server/definitions/error.yaml index 20312ae4..fa5cada7 100644 --- a/api/client-server/definitions/error.yaml +++ b/api/client-server/definitions/error.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. type: object description: A Matrix-level Error properties: diff --git a/api/client-server/definitions/event.yaml b/api/client-server/definitions/event.yaml index d40be8a9..aeda2739 100644 --- a/api/client-server/definitions/event.yaml +++ b/api/client-server/definitions/event.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: content: description: The content of this event. The fields in this object will vary depending diff --git a/api/client-server/definitions/event_batch.yaml b/api/client-server/definitions/event_batch.yaml index bc6faf5b..21377a41 100644 --- a/api/client-server/definitions/event_batch.yaml +++ b/api/client-server/definitions/event_batch.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: events: description: List of events diff --git a/api/client-server/definitions/event_filter.yaml b/api/client-server/definitions/event_filter.yaml index df872af4..1cae3ea9 100644 --- a/api/client-server/definitions/event_filter.yaml +++ b/api/client-server/definitions/event_filter.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. title: Filter properties: limit: diff --git a/api/client-server/definitions/push_condition.yaml b/api/client-server/definitions/push_condition.yaml index 99c4151c..7647d197 100644 --- a/api/client-server/definitions/push_condition.yaml +++ b/api/client-server/definitions/push_condition.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: kind: enum: diff --git a/api/client-server/definitions/push_rule.yaml b/api/client-server/definitions/push_rule.yaml index 0b2d78f4..465880c3 100644 --- a/api/client-server/definitions/push_rule.yaml +++ b/api/client-server/definitions/push_rule.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: actions: items: diff --git a/api/client-server/definitions/push_ruleset.yaml b/api/client-server/definitions/push_ruleset.yaml index 52ae5d1e..2d8cd67c 100644 --- a/api/client-server/definitions/push_ruleset.yaml +++ b/api/client-server/definitions/push_ruleset.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: content: items: diff --git a/api/client-server/definitions/room_event_filter.yaml b/api/client-server/definitions/room_event_filter.yaml index afd407de..a3bb6852 100644 --- a/api/client-server/definitions/room_event_filter.yaml +++ b/api/client-server/definitions/room_event_filter.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. allOf: - $ref: event_filter.yaml title: RoomEventFilter diff --git a/api/client-server/definitions/security.yaml b/api/client-server/definitions/security.yaml index c4130689..0668eb95 100644 --- a/api/client-server/definitions/security.yaml +++ b/api/client-server/definitions/security.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. accessToken: type: apiKey description: The access_token returned by a call to ``/login`` or ``/tokenrefresh`` diff --git a/api/client-server/definitions/sync_filter.yaml b/api/client-server/definitions/sync_filter.yaml index dc1e8861..69b245a3 100644 --- a/api/client-server/definitions/sync_filter.yaml +++ b/api/client-server/definitions/sync_filter.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. properties: event_fields: description: List of event fields to include. If this list is absent then all diff --git a/api/client-server/definitions/timeline_batch.yaml b/api/client-server/definitions/timeline_batch.yaml index 1bc03c40..44baa39f 100644 --- a/api/client-server/definitions/timeline_batch.yaml +++ b/api/client-server/definitions/timeline_batch.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. allOf: - $ref: event_batch.yaml properties: diff --git a/api/client-server/directory.yaml b/api/client-server/directory.yaml index 0382acec..7a2a2378 100644 --- a/api/client-server/directory.yaml +++ b/api/client-server/directory.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Directory API" diff --git a/api/client-server/event_context.yaml b/api/client-server/event_context.yaml index e2d148cb..8c5567b2 100644 --- a/api/client-server/event_context.yaml +++ b/api/client-server/event_context.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Event Context API" diff --git a/api/client-server/filter.yaml b/api/client-server/filter.yaml index ad3d7a9b..1f932e2c 100644 --- a/api/client-server/filter.yaml +++ b/api/client-server/filter.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server filter API" diff --git a/api/client-server/inviting.yaml b/api/client-server/inviting.yaml index c162aca2..e73d44fc 100644 --- a/api/client-server/inviting.yaml +++ b/api/client-server/inviting.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Joining API" diff --git a/api/client-server/joining.yaml b/api/client-server/joining.yaml index 912c4bfa..92454239 100644 --- a/api/client-server/joining.yaml +++ b/api/client-server/joining.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Inviting API" diff --git a/api/client-server/kicking.yaml b/api/client-server/kicking.yaml index fc33e646..137e72cf 100644 --- a/api/client-server/kicking.yaml +++ b/api/client-server/kicking.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Kicking API" diff --git a/api/client-server/leaving.yaml b/api/client-server/leaving.yaml index 6287950c..655308d2 100644 --- a/api/client-server/leaving.yaml +++ b/api/client-server/leaving.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Leaving API" diff --git a/api/client-server/list_public_rooms.yaml b/api/client-server/list_public_rooms.yaml index 99f74174..253cfe07 100644 --- a/api/client-server/list_public_rooms.yaml +++ b/api/client-server/list_public_rooms.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Creation API" diff --git a/api/client-server/login.yaml b/api/client-server/login.yaml index 6de8caa4..a9724efc 100644 --- a/api/client-server/login.yaml +++ b/api/client-server/login.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Registration and Login API" diff --git a/api/client-server/logout.yaml b/api/client-server/logout.yaml index 9e3ed33b..eed4ee44 100644 --- a/api/client-server/logout.yaml +++ b/api/client-server/logout.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Registration and Login API" diff --git a/api/client-server/message_pagination.yaml b/api/client-server/message_pagination.yaml index 8829b9db..2d235b3d 100644 --- a/api/client-server/message_pagination.yaml +++ b/api/client-server/message_pagination.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Rooms API" diff --git a/api/client-server/old_sync.yaml b/api/client-server/old_sync.yaml index b689b775..f03db953 100644 --- a/api/client-server/old_sync.yaml +++ b/api/client-server/old_sync.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Sync API" diff --git a/api/client-server/peeking_events.yaml b/api/client-server/peeking_events.yaml index fb1d7042..e33a4ce3 100644 --- a/api/client-server/peeking_events.yaml +++ b/api/client-server/peeking_events.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Sync Guest API" diff --git a/api/client-server/presence.yaml b/api/client-server/presence.yaml index 6d6428ae..7a963067 100644 --- a/api/client-server/presence.yaml +++ b/api/client-server/presence.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Presence API" diff --git a/api/client-server/profile.yaml b/api/client-server/profile.yaml index 285be849..89ebdc2a 100644 --- a/api/client-server/profile.yaml +++ b/api/client-server/profile.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Profile API" diff --git a/api/client-server/pusher.yaml b/api/client-server/pusher.yaml index 0bf84eee..5807b007 100644 --- a/api/client-server/pusher.yaml +++ b/api/client-server/pusher.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Push API" diff --git a/api/client-server/pushrules.yaml b/api/client-server/pushrules.yaml index e29e5a7e..e38fe6db 100644 --- a/api/client-server/pushrules.yaml +++ b/api/client-server/pushrules.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Push Rules API" diff --git a/api/client-server/receipts.yaml b/api/client-server/receipts.yaml index 153fdf23..9bd7f56c 100644 --- a/api/client-server/receipts.yaml +++ b/api/client-server/receipts.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Receipts API" diff --git a/api/client-server/redaction.yaml b/api/client-server/redaction.yaml index 601c8069..df60f817 100644 --- a/api/client-server/redaction.yaml +++ b/api/client-server/redaction.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server message redaction API" diff --git a/api/client-server/registration.yaml b/api/client-server/registration.yaml index 0e2bc21b..a161c79b 100644 --- a/api/client-server/registration.yaml +++ b/api/client-server/registration.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Registration API" diff --git a/api/client-server/room_send.yaml b/api/client-server/room_send.yaml index 49e657ba..64dbf4e7 100644 --- a/api/client-server/room_send.yaml +++ b/api/client-server/room_send.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server message event send API" diff --git a/api/client-server/room_state.yaml b/api/client-server/room_state.yaml index e0022e2a..dedf6ede 100644 --- a/api/client-server/room_state.yaml +++ b/api/client-server/room_state.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server state event send API" diff --git a/api/client-server/rooms.yaml b/api/client-server/rooms.yaml index 6b9f28f2..0d3689ac 100644 --- a/api/client-server/rooms.yaml +++ b/api/client-server/rooms.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Rooms API" diff --git a/api/client-server/search.yaml b/api/client-server/search.yaml index 32a34409..a1c7b9fe 100644 --- a/api/client-server/search.yaml +++ b/api/client-server/search.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Search API" diff --git a/api/client-server/sync.yaml b/api/client-server/sync.yaml index 28480b6b..f745a11e 100644 --- a/api/client-server/sync.yaml +++ b/api/client-server/sync.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server sync API" diff --git a/api/client-server/tags.yaml b/api/client-server/tags.yaml index e7ff5545..7add8479 100644 --- a/api/client-server/tags.yaml +++ b/api/client-server/tags.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server tag API" diff --git a/api/client-server/third_party_membership.yaml b/api/client-server/third_party_membership.yaml index c249dc31..a2e40372 100644 --- a/api/client-server/third_party_membership.yaml +++ b/api/client-server/third_party_membership.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Room Membership API for third party identifiers" diff --git a/api/client-server/typing.yaml b/api/client-server/typing.yaml index 07cf8298..fea94108 100644 --- a/api/client-server/typing.yaml +++ b/api/client-server/typing.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Typing API" diff --git a/api/client-server/versions.yaml b/api/client-server/versions.yaml index 9e66b0f5..1352279a 100644 --- a/api/client-server/versions.yaml +++ b/api/client-server/versions.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Versions API" diff --git a/api/client-server/voip.yaml b/api/client-server/voip.yaml index 1acff156..30000540 100644 --- a/api/client-server/voip.yaml +++ b/api/client-server/voip.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Client-Server Voice over IP API" diff --git a/api/identity/lookup.yaml b/api/identity/lookup.yaml index efbff3f7..c02ec3b5 100644 --- a/api/identity/lookup.yaml +++ b/api/identity/lookup.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Identity Service Lookup API" diff --git a/api/identity/pubkey.yaml b/api/identity/pubkey.yaml index 48a091d1..c8101281 100644 --- a/api/identity/pubkey.yaml +++ b/api/identity/pubkey.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Identity Service Public Key API" diff --git a/api/push-gateway/push_notifier.yaml b/api/push-gateway/push_notifier.yaml index e20dc8e9..0effef08 100644 --- a/api/push-gateway/push_notifier.yaml +++ b/api/push-gateway/push_notifier.yaml @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. swagger: '2.0' info: title: "Matrix Push Notification API" diff --git a/event-schemas/check_examples.py b/event-schemas/check_examples.py index 0e879541..f2456d97 100755 --- a/event-schemas/check_examples.py +++ b/event-schemas/check_examples.py @@ -1,4 +1,18 @@ #!/usr/bin/env python +# +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import sys import json diff --git a/scripts/dump-swagger.py b/scripts/dump-swagger.py index 9ac1d08e..ab534ce0 100755 --- a/scripts/dump-swagger.py +++ b/scripts/dump-swagger.py @@ -5,6 +5,21 @@ # viewer. # See https://github.com/swagger-api/swagger-ui for details of swagger-ui. +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + import errno import json import logging diff --git a/scripts/gendoc.py b/scripts/gendoc.py index 4aba377d..816fd016 100755 --- a/scripts/gendoc.py +++ b/scripts/gendoc.py @@ -1,5 +1,19 @@ #! /usr/bin/env python +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from argparse import ArgumentParser from docutils.core import publish_file import copy diff --git a/scripts/swagger-http-server.py b/scripts/swagger-http-server.py index 837ba9c6..828d7b5d 100755 --- a/scripts/swagger-http-server.py +++ b/scripts/swagger-http-server.py @@ -1,8 +1,21 @@ #!/usr/bin/env python -# + # Runs an HTTP server on localhost:8000 which will serve the generated swagger # JSON so that it can be viewed in an online swagger UI. + +# Copyright 2016 OpenMarket Ltd # +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import argparse import os diff --git a/specification/appendices.rst b/specification/appendices.rst index 28682776..c57c9fb0 100644 --- a/specification/appendices.rst +++ b/specification/appendices.rst @@ -1,3 +1,17 @@ +.. Copyright 2015 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Appendices ========== diff --git a/specification/application_service_api.rst b/specification/application_service_api.rst index 16e9b00a..e2c9a006 100644 --- a/specification/application_service_api.rst +++ b/specification/application_service_api.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Application Service API ======================= diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 17a86922..e874f35c 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Client-Server API ================= diff --git a/specification/event_signing.rst b/specification/event_signing.rst index 2a985764..8b8a703d 100644 --- a/specification/event_signing.rst +++ b/specification/event_signing.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Signing Events -------------- diff --git a/specification/events.rst b/specification/events.rst index 92d52d22..91b837c6 100644 --- a/specification/events.rst +++ b/specification/events.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Event Structure =============== diff --git a/specification/feature_profiles.rst b/specification/feature_profiles.rst index bb1ee2ad..7fc9696d 100644 --- a/specification/feature_profiles.rst +++ b/specification/feature_profiles.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Feature Profiles ================ diff --git a/specification/identity_servers.rst b/specification/identity_servers.rst index 6ec013bd..db82865e 100644 --- a/specification/identity_servers.rst +++ b/specification/identity_servers.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Identity Servers ================ .. NOTE:: diff --git a/specification/identity_service_api.rst b/specification/identity_service_api.rst index d6f5d324..f6e22a1a 100644 --- a/specification/identity_service_api.rst +++ b/specification/identity_service_api.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Identity Service API ==================== diff --git a/specification/index.rst b/specification/index.rst index 49b5ff00..ae6611c0 100644 --- a/specification/index.rst +++ b/specification/index.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Matrix Specification ==================== diff --git a/specification/intro.rst b/specification/intro.rst index 3ce3ff3b..650f1fc5 100644 --- a/specification/intro.rst +++ b/specification/intro.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + .. contents:: Table of Contents .. sectnum:: @@ -10,11 +24,11 @@ Introduction ------------ .. WARNING:: The Matrix specification is still evolving: the APIs are not yet frozen - and this document is in places a work in progress or stale. We have made every + and this document is in places a work in progress or stale. We have made every effort to clearly flag areas which are still being finalised. We're publishing it at this point because it's complete enough to be more than useful and provide a canonical reference to how Matrix is evolving. Our end - goal is to mirror WHATWG's `Living Standard + goal is to mirror WHATWG's `Living Standard `_. Matrix is a set of open APIs for open-federated Instant Messaging (IM), Voice @@ -227,7 +241,7 @@ They are case-sensitive. The following conceptual diagram shows an PKI signature from matrix.org Transaction-layer metadata PKI Authorization header - + ................................... | Shared Data | | State: | @@ -244,7 +258,7 @@ They are case-sensitive. The following conceptual diagram shows an Federation maintains *shared data structures* per-room between multiple home servers. The data is split into ``message events`` and ``state events``. -Message events: +Message events: These describe transient 'once-off' activity in a room such as an instant messages, VoIP call setups, file transfers, etc. They generally describe communication activity. @@ -346,3 +360,9 @@ dedicated API. The API is symmetrical to managing Profile data. Would it really be overengineered to use the same API for both profile & private user data, but with different ACLs? + +License +------- + +The Matrix specification is licensed under the `Apache License, Version 2.0 +`_. diff --git a/specification/modules.rst b/specification/modules.rst index 0aad77e1..36f79cfd 100644 --- a/specification/modules.rst +++ b/specification/modules.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Modules ======= diff --git a/specification/modules/_template.rst b/specification/modules/_template.rst index dd86febe..aa4f93db 100644 --- a/specification/modules/_template.rst +++ b/specification/modules/_template.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Module Heading ============== diff --git a/specification/modules/account_data.rst b/specification/modules/account_data.rst index 15885997..1c031ee1 100644 --- a/specification/modules/account_data.rst +++ b/specification/modules/account_data.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Client Config ============= diff --git a/specification/modules/admin.rst b/specification/modules/admin.rst index 6dc8061a..c4465675 100644 --- a/specification/modules/admin.rst +++ b/specification/modules/admin.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Server Administration ===================== diff --git a/specification/modules/anonymous_access.rst b/specification/modules/anonymous_access.rst index 5a421187..a6ffbfb6 100644 --- a/specification/modules/anonymous_access.rst +++ b/specification/modules/anonymous_access.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Guest access ================ diff --git a/specification/modules/content_repo.rst b/specification/modules/content_repo.rst index b83fdcfc..0f1a9944 100644 --- a/specification/modules/content_repo.rst +++ b/specification/modules/content_repo.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Content repository ================== diff --git a/specification/modules/end_to_end_encryption.rst b/specification/modules/end_to_end_encryption.rst index 9abb06e0..48416da4 100644 --- a/specification/modules/end_to_end_encryption.rst +++ b/specification/modules/end_to_end_encryption.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + End-to-End Encryption ===================== diff --git a/specification/modules/event_context.rst b/specification/modules/event_context.rst index 0d93ae34..2d5f22b1 100644 --- a/specification/modules/event_context.rst +++ b/specification/modules/event_context.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Event Context ============= diff --git a/specification/modules/guest_access.rst b/specification/modules/guest_access.rst index 31cfd35d..2200771b 100644 --- a/specification/modules/guest_access.rst +++ b/specification/modules/guest_access.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Guest Access ============ diff --git a/specification/modules/history_visibility.rst b/specification/modules/history_visibility.rst index df592bfa..476ea889 100644 --- a/specification/modules/history_visibility.rst +++ b/specification/modules/history_visibility.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Room History Visibility ======================= diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index b71d0317..11595b70 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Instant Messaging ================= diff --git a/specification/modules/presence.rst b/specification/modules/presence.rst index 23a03733..822b298d 100644 --- a/specification/modules/presence.rst +++ b/specification/modules/presence.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Presence ======== diff --git a/specification/modules/push.rst b/specification/modules/push.rst index 0e5fffd1..a88f5953 100644 --- a/specification/modules/push.rst +++ b/specification/modules/push.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Push Notifications ================== diff --git a/specification/modules/receipts.rst b/specification/modules/receipts.rst index c8c58ff2..a6d8cbf7 100644 --- a/specification/modules/receipts.rst +++ b/specification/modules/receipts.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Receipts ======== diff --git a/specification/modules/room_previews.rst b/specification/modules/room_previews.rst index e47fa9c8..f40c8972 100644 --- a/specification/modules/room_previews.rst +++ b/specification/modules/room_previews.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Room Previews ============= diff --git a/specification/modules/search.rst b/specification/modules/search.rst index b2ae6a63..08926552 100644 --- a/specification/modules/search.rst +++ b/specification/modules/search.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Server Side Search ================== diff --git a/specification/modules/tags.rst b/specification/modules/tags.rst index 1faf894a..f0a7fa52 100644 --- a/specification/modules/tags.rst +++ b/specification/modules/tags.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Room Tagging ============ diff --git a/specification/modules/third_party_invites.rst b/specification/modules/third_party_invites.rst index bcc5e93b..9ea0eb0b 100644 --- a/specification/modules/third_party_invites.rst +++ b/specification/modules/third_party_invites.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Third party invites =================== diff --git a/specification/modules/typing_notifications.rst b/specification/modules/typing_notifications.rst index 3bef79d2..964b804a 100644 --- a/specification/modules/typing_notifications.rst +++ b/specification/modules/typing_notifications.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Typing Notifications ==================== diff --git a/specification/modules/voip_events.rst b/specification/modules/voip_events.rst index 6c7dbb5e..fab56517 100644 --- a/specification/modules/voip_events.rst +++ b/specification/modules/voip_events.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Voice over IP ============= diff --git a/specification/push_gateway.rst b/specification/push_gateway.rst index 7e33f35f..29a41bf7 100644 --- a/specification/push_gateway.rst +++ b/specification/push_gateway.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Push Gateway API ================ diff --git a/specification/server_server_api.rst b/specification/server_server_api.rst index eaf7eca7..5c8a456a 100644 --- a/specification/server_server_api.rst +++ b/specification/server_server_api.rst @@ -1,3 +1,17 @@ +.. Copyright 2016 OpenMarket Ltd +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + Federation API ============== diff --git a/templating/batesian/__init__.py b/templating/batesian/__init__.py index 1c394e7e..da41b31b 100644 --- a/templating/batesian/__init__.py +++ b/templating/batesian/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from sets import Set diff --git a/templating/batesian/sections.py b/templating/batesian/sections.py index c18c9a5f..c541d771 100644 --- a/templating/batesian/sections.py +++ b/templating/batesian/sections.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Parent class for writing sections.""" import inspect import os diff --git a/templating/batesian/units.py b/templating/batesian/units.py index 0b665b17..072508e6 100644 --- a/templating/batesian/units.py +++ b/templating/batesian/units.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Parent class for writing units.""" from . import AccessKeyStore import inspect diff --git a/templating/build.py b/templating/build.py index 4737a6b1..307a26e7 100755 --- a/templating/build.py +++ b/templating/build.py @@ -1,4 +1,19 @@ #!/usr/bin/env python +# +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Batesian: A simple templating system using Jinja. diff --git a/templating/matrix_templates/__init__.py b/templating/matrix_templates/__init__.py index 1e161700..6b46192c 100644 --- a/templating/matrix_templates/__init__.py +++ b/templating/matrix_templates/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from sections import MatrixSections from units import MatrixUnits import os diff --git a/templating/matrix_templates/sections.py b/templating/matrix_templates/sections.py index e7c52508..64e32aa4 100644 --- a/templating/matrix_templates/sections.py +++ b/templating/matrix_templates/sections.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Contains all the sections for the spec.""" from batesian import AccessKeyStore from batesian.sections import Sections diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index 07f5aefb..ee5b40a6 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -1,3 +1,16 @@ +# Copyright 2016 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """ Contains all the units for the spec. From dc7fc0309e381ca55444bdd9baacd1dcda90f62f Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Tue, 12 Jul 2016 20:38:53 -0700 Subject: [PATCH 6/6] Add missing "to" parameter to /messages Signed-off-by: Benjamin Saunders --- api/client-server/message_pagination.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/api/client-server/message_pagination.yaml b/api/client-server/message_pagination.yaml index 8829b9db..f50f0f45 100644 --- a/api/client-server/message_pagination.yaml +++ b/api/client-server/message_pagination.yaml @@ -34,9 +34,20 @@ paths: name: from description: |- The token to start returning events from. This token can be obtained - from the initial sync API. + from a ``prev_batch`` token returned for each room by the sync API, + or from a ``start`` or ``end`` token returned by a previous request + to this endpoint. required: true x-example: "s345_678_333" + - in: query + type: string + name: to + description: |- + The token to stop returning events at. This token can be obtained from + a ``prev_batch`` token returned for each room by the sync endpoint, + or from a ``start`` or ``end`` token returned by a previous request to + this endpoint. + required: false - in: query type: string enum: ["b", "f"] @@ -61,7 +72,7 @@ paths: start: type: string description: |- - The token to start paginating from. If ``dir=b`` this will be + The token the pagination starts from. If ``dir=b`` this will be the token supplied in ``from``. end: type: string