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>
pull/1355/head
Kévin Commaille 2 years ago committed by GitHub
parent eeb43043ad
commit 4534124742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Include examples inline instead of using a reference for invite endpoint definitions.

@ -133,9 +133,24 @@ paths:
"origin_server_ts": 1549041175876, "origin_server_ts": 1549041175876,
"sender": "@someone:example.org", "sender": "@someone:example.org",
"unsigned": { "unsigned": {
"invite_room_state": { "invite_room_state": [
"$ref": "../../event-schemas/examples/invite_room_state.json" {
} "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": { "content": {
"membership": "invite" "membership": "invite"

@ -129,9 +129,24 @@ paths:
"origin_server_ts": 1549041175876, "origin_server_ts": 1549041175876,
"sender": "@someone:example.org", "sender": "@someone:example.org",
"unsigned": { "unsigned": {
"invite_room_state": { "invite_room_state": [
"$ref": "../../event-schemas/examples/invite_room_state.json" {
} "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": { "content": {
"membership": "invite" "membership": "invite"

Loading…
Cancel
Save