Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification: Should retrieving a single event return an array #690

Open
jtescher opened this issue Sep 7, 2020 · 1 comment
Open

Clarification: Should retrieving a single event return an array #690

jtescher opened this issue Sep 7, 2020 · 1 comment
Labels
A-S2S Server-to-Server API (federation) clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@jtescher
Copy link

jtescher commented Sep 7, 2020

Currently the spec for retrieving a single event GET /_matrix/federation/v1/event/{eventId} has a response defined as:

Parameter Type Description
.. .. ..
pdus [PDU] Required. A single PDU. Note that events have a different format depending on the room version - check the room version specification for precise event formats.

The comment and the response type seem to disagree. Should this actually return a PDU instead of a [PDU]?

@turt2live
Copy link
Member

The response is an array containing a single event so it can match the transaction format. The type is correct (square brackets denote arrays), however the comment could probably say "An array with a single event" instead.

@turt2live turt2live added clarification An area where the expected behaviour is understood, but the spec could do with being more explicit A-S2S Server-to-Server API (federation) labels Sep 7, 2020
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-S2S Server-to-Server API (federation) clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants