Compare commits

...

5 commits

Author SHA1 Message Date
Tulir Asokan 553cdbdb45
Merge c4bbef30d1 into 0e280ed014 2025-07-14 14:09:23 +03:00
Tulir Asokan c4bbef30d1 schema/ 2025-07-11 19:50:49 +03:00
Tulir Asokan efa676dbf9 " 2025-07-11 19:48:05 +03:00
Tulir Asokan a14740e8da Use oneOf for response schema 2025-07-11 19:34:13 +03:00
Tulir Asokan 1947f2a72b Add format query parameter to GET /state/{eventType}/{stateKey}
Fixes #1047
2025-07-11 14:44:26 +03:00
2 changed files with 20 additions and 2 deletions

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

@ -105,13 +105,30 @@ paths:
example: ""
schema:
type: string
- in: query
name: format
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: {