diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-09-14 12:26:14 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-09-14 15:49:13 +0200 |
commit | 79b8b5c0f20ffee738b57f3b2b5779a8002a9c23 (patch) | |
tree | c5eac6222105aadaed1120a2db846b4a74829556 /core/openapi.json | |
parent | 30a7eabad3f00fe10fa2d66725297a559aa82c3c (diff) | |
download | nextcloud-server-79b8b5c0f20ffee738b57f3b2b5779a8002a9c23.tar.gz nextcloud-server-79b8b5c0f20ffee738b57f3b2b5779a8002a9c23.zip |
core: Fix OpenAPI for reference API
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'core/openapi.json')
-rw-r--r-- | core/openapi.json | 107 |
1 files changed, 48 insertions, 59 deletions
diff --git a/core/openapi.json b/core/openapi.json index 1cc8b40483f..c586ed73ad0 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -73,7 +73,7 @@ "resources": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenGraphObject" + "$ref": "#/components/schemas/Resource" } } } @@ -226,52 +226,29 @@ "OpenGraphObject": { "type": "object", "required": [ - "richObjectType", - "richObject", - "openGraphObject", - "accessible" + "id", + "name", + "description", + "thumb", + "link" ], "properties": { - "richObjectType": { + "id": { "type": "string" }, - "richObject": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "name": { + "type": "string" }, - "openGraphObject": { - "type": "object", - "required": [ - "id", - "name", - "description", - "thumb", - "link" - ], - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "thumb": { - "type": "string", - "nullable": true - }, - "link": { - "type": "string" - } - } + "description": { + "type": "string", + "nullable": true }, - "accessible": { - "type": "boolean" + "thumb": { + "type": "string", + "nullable": true + }, + "link": { + "type": "string" } } }, @@ -333,6 +310,32 @@ } } }, + "Resource": { + "type": "object", + "required": [ + "richObjectType", + "richObject", + "openGraphObject", + "accessible" + ], + "properties": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { + "$ref": "#/components/schemas/OpenGraphObject" + }, + "accessible": { + "type": "boolean" + } + } + }, "Status": { "type": "object", "required": [ @@ -3334,15 +3337,8 @@ "references": { "type": "object", "additionalProperties": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Reference" - }, - { - "type": "object" - } - ] + "$ref": "#/components/schemas/Reference", + "nullable": true } } } @@ -3441,15 +3437,8 @@ "references": { "type": "object", "additionalProperties": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/Reference" - }, - { - "type": "object" - } - ] + "$ref": "#/components/schemas/Reference", + "nullable": true } } } |