Skip to content

Commit

Permalink
Remove overridden references to examples/minimal_pdu.json and add t…
Browse files Browse the repository at this point in the history
…he missing `room_id` field. (#1454)

The syntax is incorrect and would require to use allOf
because a $ref can't have siblings.
However the only field not overwritten of that definition is room_id,
so we include it instead of the $ref

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed Feb 28, 2023
1 parent 77d0f20 commit 427f472
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1454.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix invalid OpenAPI specifications caused by overridden references to `examples/minimal_pdu.json`.
4 changes: 2 additions & 2 deletions data/api/server-server/invites-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ paths:
example:
$ref: "../../event-schemas/examples/invite_room_state.json"
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@joe:elsewhere.com",
"origin": "example.org",
Expand Down Expand Up @@ -126,7 +126,7 @@ paths:
200,
{
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ paths:
example: {
"room_version": "2",
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@joe:elsewhere.com",
"origin": "example.org",
Expand Down Expand Up @@ -122,7 +122,7 @@ paths:
examples:
application/json: {
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/joins-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ paths:
application/json: {
"room_version": "2",
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down Expand Up @@ -310,7 +310,7 @@ paths:
- type
- content
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
2 changes: 1 addition & 1 deletion data/api/server-server/joins-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ paths:
- type
- content
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/knocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ paths:
application/json: {
"room_version": "7",
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down Expand Up @@ -264,7 +264,7 @@ paths:
- type
- content
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/leaving-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ paths:
application/json: {
"room_version": "2",
"event": {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down Expand Up @@ -221,7 +221,7 @@ paths:
- depth
- content
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down
2 changes: 1 addition & 1 deletion data/api/server-server/leaving-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ paths:
- depth
- content
example: {
"$ref": "examples/minimal_pdu.json",
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
Expand Down

0 comments on commit 427f472

Please sign in to comment.