Include examples inline instead of using a reference for invite endpoint 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>
This commit is contained in:
Kévin Commaille 2022-11-22 16:56:39 +01:00 committed by GitHub
parent eeb43043ad
commit 4534124742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 6 deletions

View file

@ -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"

View file

@ -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"