Skip to content

Commit

Permalink
Merge pull request #1 from matrix-org/master
Browse files Browse the repository at this point in the history
Updating my fork
  • Loading branch information
aaronaxvig authored Mar 28, 2020
2 parents edd7570 + 2313f1e commit 5da5d5e
Show file tree
Hide file tree
Showing 15 changed files with 404 additions and 165 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
*.swp
_rendered.rst
/.vscode/
/.idea/
2 changes: 1 addition & 1 deletion api/client-server/redaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ paths:
This cannot be undone.
Users may redact their own events, and any user with a power level
greater than or equal to the `redact` power level of the room may
greater than or equal to the ``redact`` power level of the room may
redact events there.
operationId: redactEvent
security:
Expand Down
134 changes: 0 additions & 134 deletions api/server-server/event_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,137 +72,3 @@ paths:
example:
$ref: "examples/minimal_pdu.json"
required: ['auth_chain']
"/query_auth/{roomId}/{eventId}":
post:
summary: Compare auth chains with the receiving server
description: |-
Compares the auth chain provided with what the receiving server has for the
room ID and event ID combination.
The auth difference can be calculated in two parts, where the "remote auth"
is the auth chain provided by the sending server and the "local auth" is the
auth chain the receiving server has. With those lists, the algorithm works
bottom-up after sorting each chain by depth then by event ID. The differences
are then discovered and returned as the response to this API call.
operationId: compareEventAuth
security:
- signedRequest: []
parameters:
- in: path
name: roomId
type: string
description: The room ID to compare the auth chain in.
required: true
x-example: "!abc123:matrix.org"
- in: path
name: eventId
type: string
description: The event ID to compare the auth chain of.
required: true
x-example: "$helloworld:example.org"
- in: body
name: body
schema:
type: object
properties:
auth_chain:
type: array
description: |-
The auth chain (the "remote auth"). Note that events have a different
format depending on the room version - check the `room version specification`_
for precise event formats.
items:
type: object
title: PDU
description: |-
The `PDUs <#pdus>`_ contained in the auth chain. The event format
varies depending on the room version - check the `room version specification`_
for precise event formats.
properties: []
example:
$ref: "examples/minimal_pdu.json"
missing:
type: array
description: |-
A list of event IDs that the sender thinks the receiver is missing.
items:
type: string
example: []
rejects:
type: object
description: |-
The set of events that the sending server has rejected from the provided
auth chain.
The ``string`` key is the event ID that was rejected.
additionalProperties:
type: object
title: Rejection Reason
properties:
reason:
type: enum
enum: ['auth_error', 'replaced', 'not_ancestor']
description: |-
The reason for the event being rejected.
required: ['reason']
example: {
"$some_event:example.org": {
"reason": "auth_error"
}
}
required: ['auth_chain']
responses:
200:
description: The auth chain differences, as determined by the receiver.
schema:
type: object
properties:
auth_chain:
type: array
description: |-
The auth chain the receiver has, and used to determine the auth
chain differences (the "local auth"). Note that events have a different
format depending on the room version - check the `room version specification`_
for precise event formats.
items:
type: object
title: PDU
description: |-
The `PDUs <#pdus>`_ contained in the auth chain. The event format
varies depending on the room version - check the `room version specification`_
for precise event formats.
properties: []
example:
$ref: "examples/minimal_pdu.json"
missing:
type: array
description: |-
The list of event IDs that the receiver believes it is missing,
after comparing the "remote auth" and "local auth" chains.
items:
type: string
example: ["$a_missing_event:example.org"]
rejects:
type: object
description: |-
The set of events that the receiving server has rejected from the
auth chain, not including events that the sending server is missing
as determined from the difference algorithm.
The ``string`` key is the event ID that was rejected.
additionalProperties:
type: object
title: Rejection Reason
properties:
reason:
type: enum
enum: ['auth_error', 'replaced', 'not_ancestor']
description: |-
The reason for the event being rejected.
required: ['reason']
example: {
"$some_event:example.org": {
"reason": "auth_error"
}
}
required: ['auth_chain', 'missing', 'rejects']
19 changes: 12 additions & 7 deletions changelogs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# Changelogs

[Towncrier](https://github.com/hawkowl/towncrier) is used to manage the changelog and
[Towncrier](https://github.com/hawkowl/towncrier) is used to manage the changelog and
keep it up to date. Because of this, updating a changelog is really easy.

## How to update a changelog when releasing an API

1. Ensure you're in your Python 3 virtual environment
2. `cd` your way to the API you're releasing (eg: `cd changelogs/client_server`)
3. Run `towncrier --version "r0.4.0" --name "client-server" --yes` substituting the
3. Run `towncrier --version "r0.4.0" --name "client-server" --yes` substituting the
variables as approprite. Note that `--name` is required although the value is ignored.
4. Commit the changes and finish the release process.

Expand All @@ -26,27 +26,32 @@ For this example, we're going to pretend that the `server_server` API doesn't ex
directory = "newsfragments"
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
title_format = "{version}"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "new"
name = "New Endpoints"
showcontent = true


[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "clarification"
name = "Spec Clarifications"
Expand Down
15 changes: 10 additions & 5 deletions changelogs/application_service/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@
directory = "newsfragments"
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
title_format = "{version}"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "new"
name = "New Endpoints"
showcontent = true


[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "clarification"
name = "Spec Clarifications"
Expand Down
15 changes: 10 additions & 5 deletions changelogs/client_server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@
directory = "newsfragments"
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
title_format = "{version}"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "new"
name = "New Endpoints"
showcontent = true


[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "clarification"
name = "Spec Clarifications"
Expand Down
5 changes: 5 additions & 0 deletions changelogs/identity_service/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
name = "New Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
Expand Down
15 changes: 10 additions & 5 deletions changelogs/push_gateway/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@
directory = "newsfragments"
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
title_format = "{version}"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "new"
name = "New Endpoints"
showcontent = true


[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "clarification"
name = "Spec Clarifications"
Expand Down
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/2470.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the unused ``query_auth`` API per `MSC2451 <https://github.com/matrix-org/matrix-doc/pull/2451>`_.
15 changes: 10 additions & 5 deletions changelogs/server_server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@
directory = "newsfragments"
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
title_format = "{version}"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "new"
name = "New Endpoints"
showcontent = true


[[tool.towncrier.type]]
directory = "removal"
name = "Removed Endpoints"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Backwards Compatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "clarification"
name = "Spec Clarifications"
Expand Down
Loading

0 comments on commit 5da5d5e

Please sign in to comment.