Compare commits

...

3 commits

Author SHA1 Message Date
Benjamin Bouvier 6a8a8dd478
Merge 7ba3818678 into c8380d9552 2025-07-21 11:07:20 +01:00
Tulir Asokan c8380d9552
Add format query parameter to GET /state/{eventType}/{stateKey} (#2175)
Some checks failed
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled
2025-07-19 22:52:41 +03:00
Benjamin Bouvier 7ba3818678 Clarify that the latest_event field is serialized in the same form as the event itself 2025-06-26 13:51:42 +02:00
4 changed files with 23 additions and 3 deletions

View file

@ -0,0 +1 @@
The `latest_event` in a bundled thread information uses the same format as the event itself.

View file

@ -0,0 +1 @@
Add `format` query parameter to `GET /state/{eventType}/{stateKey}` to allow fetching metadata of a specific state event.

View file

@ -185,7 +185,7 @@ included under the `m.relations` property in `unsigned` for the thread root. For
```
`latest_event` is the most recent event (topologically to the server) in the thread sent by an
un-[ignored user](#ignoring-users).
un-[ignored user](#ignoring-users). It should be serialized in the same form as the event itself.
Note that, as in the example above, child events of the `latest_event` should
themselves be aggregated and included under `m.relations` for that event. The

View file

@ -105,13 +105,31 @@ paths:
example: ""
schema:
type: string
- in: query
name: format
x-addedInMatrixVersion: "1.16"
description: |-
The format to use for the returned data. `content` (the default) will
return only the content of the state event. `event` will return the entire
event in the usual format suitable for clients, including fields like event
ID, sender and timestamp.
example: event
schema:
type: string
enum:
- content
- event
responses:
"200":
description: The content of the state event.
description: |-
The content of the state event, or the entire client-formatted event
if `?format=event` was used.
content:
application/json:
schema:
type: object
oneOf:
- type: object
- $ref: "../../event-schemas/schema/core-event-schema/state_event.yaml"
examples:
response:
value: {