Skip to content

Commit

Permalink
Include examples inline instead of using a reference for invite endpo…
Browse files Browse the repository at this point in the history
…int definitions (#1349)

The OpenAPI 3 spec doesn't allow building examples by composition.
Either the whole example must be a reference, or it has to be included.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh authored Nov 22, 2022
1 parent eeb4304 commit 4534124
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1349.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include examples inline instead of using a reference for invite endpoint definitions.
21 changes: 18 additions & 3 deletions data/api/server-server/invites-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,24 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": {
"$ref": "../../event-schemas/examples/invite_room_state.json"
}
"invite_room_state": [
{
"type": "m.room.name",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"name": "Example Room"
}
},
{
"type": "m.room.join_rules",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"join_rule": "invite"
}
}
]
},
"content": {
"membership": "invite"
Expand Down
21 changes: 18 additions & 3 deletions data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,24 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": {
"$ref": "../../event-schemas/examples/invite_room_state.json"
}
"invite_room_state": [
{
"type": "m.room.name",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"name": "Example Room"
}
},
{
"type": "m.room.join_rules",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"join_rule": "invite"
}
}
]
},
"content": {
"membership": "invite"
Expand Down

0 comments on commit 4534124

Please sign in to comment.