Remove overridden references to `examples/minimal_pdu.json` and add the 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>
pull/1456/head
Kévin Commaille 2 years ago committed by GitHub
parent 77d0f20226
commit 427f472331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Fix invalid OpenAPI specifications caused by overridden references to `examples/minimal_pdu.json`.

@ -85,7 +85,7 @@ paths:
example: example:
$ref: "../../event-schemas/examples/invite_room_state.json" $ref: "../../event-schemas/examples/invite_room_state.json"
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@joe:elsewhere.com", "state_key": "@joe:elsewhere.com",
"origin": "example.org", "origin": "example.org",
@ -126,7 +126,7 @@ paths:
200, 200,
{ {
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -89,7 +89,7 @@ paths:
example: { example: {
"room_version": "2", "room_version": "2",
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@joe:elsewhere.com", "state_key": "@joe:elsewhere.com",
"origin": "example.org", "origin": "example.org",
@ -122,7 +122,7 @@ paths:
examples: examples:
application/json: { application/json: {
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -139,7 +139,7 @@ paths:
application/json: { application/json: {
"room_version": "2", "room_version": "2",
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",
@ -310,7 +310,7 @@ paths:
- type - type
- content - content
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -147,7 +147,7 @@ paths:
- type - type
- content - content
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -129,7 +129,7 @@ paths:
application/json: { application/json: {
"room_version": "7", "room_version": "7",
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",
@ -264,7 +264,7 @@ paths:
- type - type
- content - content
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -118,7 +118,7 @@ paths:
application/json: { application/json: {
"room_version": "2", "room_version": "2",
"event": { "event": {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",
@ -221,7 +221,7 @@ paths:
- depth - depth
- content - content
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

@ -117,7 +117,7 @@ paths:
- depth - depth
- content - content
example: { example: {
"$ref": "examples/minimal_pdu.json", "room_id": "!somewhere:example.org",
"type": "m.room.member", "type": "m.room.member",
"state_key": "@someone:example.org", "state_key": "@someone:example.org",
"origin": "example.org", "origin": "example.org",

Loading…
Cancel
Save