fix(openapi): Provide better message parameter definitions

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-03-14 15:29:13 +01:00
Родитель 8b1f7915ba
Коммит 7d46ee5030
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 74434EFE0D2E2205
9 изменённых файлов: 544 добавлений и 58 удалений

Просмотреть файл

@ -67,6 +67,32 @@ namespace OCA\Talk;
* statusMessage: ?string,
* }
*
* @psalm-type TalkRichObjectParameter = array{
* type: string,
* id: string,
* name: string,
* server?: string,
* link?: string,
* 'call-type'?: 'one2one'|'group'|'public',
* 'icon-url'?: string,
* 'message-id'?: string,
* boardname?: string,
* stackname?: string,
* size?: string,
* path?: string,
* mimetype?: string,
* 'preview-available'?: 'yes'|'no',
* mtime?: string,
* latitude?: string,
* longitude?: string,
* description?: string,
* thumb?: string,
* website?: string,
* visibility?: '0'|'1',
* assignable?: '0'|'1',
* conversation?: string,
* }
*
* @psalm-type TalkChatMessage = array{
* actorDisplayName: string,
* actorId: string,
@ -77,7 +103,7 @@ namespace OCA\Talk;
* isReplyable: bool,
* markdown: bool,
* message: string,
* messageParameters: array<string, array<string, mixed>>,
* messageParameters: array<string, TalkRichObjectParameter>,
* messageType: string,
* reactions: array<string, integer>|\stdClass,
* referenceId: string,
@ -97,7 +123,7 @@ namespace OCA\Talk;
* actorType: string,
* expirationTimestamp: int,
* message: string,
* messageParameters: array<string, array<string, mixed>>,
* messageParameters: array<string, TalkRichObjectParameter>,
* messageType: string,
* systemMessage: string,
* }

Просмотреть файл

@ -263,10 +263,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {
@ -353,6 +350,102 @@
}
]
},
"RichObjectParameter": {
"type": "object",
"required": [
"type",
"id",
"name"
],
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"server": {
"type": "string"
},
"link": {
"type": "string"
},
"call-type": {
"type": "string",
"enum": [
"one2one",
"group",
"public"
]
},
"icon-url": {
"type": "string"
},
"message-id": {
"type": "string"
},
"boardname": {
"type": "string"
},
"stackname": {
"type": "string"
},
"size": {
"type": "string"
},
"path": {
"type": "string"
},
"mimetype": {
"type": "string"
},
"preview-available": {
"type": "string",
"enum": [
"yes",
"no"
]
},
"mtime": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"description": {
"type": "string"
},
"thumb": {
"type": "string"
},
"website": {
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"0",
"1"
]
},
"assignable": {
"type": "string",
"enum": [
"0",
"1"
]
},
"conversation": {
"type": "string"
}
}
},
"Room": {
"type": "object",
"required": [
@ -655,10 +748,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {

Просмотреть файл

@ -263,10 +263,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {
@ -407,6 +404,102 @@
}
]
},
"RichObjectParameter": {
"type": "object",
"required": [
"type",
"id",
"name"
],
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"server": {
"type": "string"
},
"link": {
"type": "string"
},
"call-type": {
"type": "string",
"enum": [
"one2one",
"group",
"public"
]
},
"icon-url": {
"type": "string"
},
"message-id": {
"type": "string"
},
"boardname": {
"type": "string"
},
"stackname": {
"type": "string"
},
"size": {
"type": "string"
},
"path": {
"type": "string"
},
"mimetype": {
"type": "string"
},
"preview-available": {
"type": "string",
"enum": [
"yes",
"no"
]
},
"mtime": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"description": {
"type": "string"
},
"thumb": {
"type": "string"
},
"website": {
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"0",
"1"
]
},
"assignable": {
"type": "string",
"enum": [
"0",
"1"
]
},
"conversation": {
"type": "string"
}
}
},
"Room": {
"type": "object",
"required": [
@ -709,10 +802,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {

Просмотреть файл

@ -424,10 +424,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {
@ -872,6 +869,102 @@
}
}
},
"RichObjectParameter": {
"type": "object",
"required": [
"type",
"id",
"name"
],
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"server": {
"type": "string"
},
"link": {
"type": "string"
},
"call-type": {
"type": "string",
"enum": [
"one2one",
"group",
"public"
]
},
"icon-url": {
"type": "string"
},
"message-id": {
"type": "string"
},
"boardname": {
"type": "string"
},
"stackname": {
"type": "string"
},
"size": {
"type": "string"
},
"path": {
"type": "string"
},
"mimetype": {
"type": "string"
},
"preview-available": {
"type": "string",
"enum": [
"yes",
"no"
]
},
"mtime": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"description": {
"type": "string"
},
"thumb": {
"type": "string"
},
"website": {
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"0",
"1"
]
},
"assignable": {
"type": "string",
"enum": [
"0",
"1"
]
},
"conversation": {
"type": "string"
}
}
},
"Room": {
"type": "object",
"required": [
@ -1174,10 +1267,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {

Просмотреть файл

@ -365,10 +365,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {
@ -759,6 +756,102 @@
}
}
},
"RichObjectParameter": {
"type": "object",
"required": [
"type",
"id",
"name"
],
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"server": {
"type": "string"
},
"link": {
"type": "string"
},
"call-type": {
"type": "string",
"enum": [
"one2one",
"group",
"public"
]
},
"icon-url": {
"type": "string"
},
"message-id": {
"type": "string"
},
"boardname": {
"type": "string"
},
"stackname": {
"type": "string"
},
"size": {
"type": "string"
},
"path": {
"type": "string"
},
"mimetype": {
"type": "string"
},
"preview-available": {
"type": "string",
"enum": [
"yes",
"no"
]
},
"mtime": {
"type": "string"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"description": {
"type": "string"
},
"thumb": {
"type": "string"
},
"website": {
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"0",
"1"
]
},
"assignable": {
"type": "string",
"enum": [
"0",
"1"
]
},
"conversation": {
"type": "string"
}
}
},
"Room": {
"type": "object",
"required": [
@ -1061,10 +1154,7 @@
"messageParameters": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"$ref": "#/components/schemas/RichObjectParameter"
}
},
"messageType": {

Просмотреть файл

@ -104,9 +104,7 @@ export type components = {
markdown: boolean;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
reactions: {
@ -134,6 +132,35 @@ export type components = {
PublicCapabilities: OneOf<[{
spreed: components["schemas"]["Capabilities"];
}, unknown[]]>;
RichObjectParameter: {
type: string;
id: string;
name: string;
server?: string;
link?: string;
/** @enum {string} */
"call-type"?: "one2one" | "group" | "public";
"icon-url"?: string;
"message-id"?: string;
boardname?: string;
stackname?: string;
size?: string;
path?: string;
mimetype?: string;
/** @enum {string} */
"preview-available"?: "yes" | "no";
mtime?: string;
latitude?: string;
longitude?: string;
description?: string;
thumb?: string;
website?: string;
/** @enum {string} */
visibility?: "0" | "1";
/** @enum {string} */
assignable?: "0" | "1";
conversation?: string;
};
Room: {
actorId: string;
actorType: string;
@ -228,9 +255,7 @@ export type components = {
expirationTimestamp: number;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
systemMessage: string;

Просмотреть файл

@ -111,9 +111,7 @@ export type components = {
markdown: boolean;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
reactions: {
@ -157,6 +155,35 @@ export type components = {
PublicCapabilities: OneOf<[{
spreed: components["schemas"]["Capabilities"];
}, unknown[]]>;
RichObjectParameter: {
type: string;
id: string;
name: string;
server?: string;
link?: string;
/** @enum {string} */
"call-type"?: "one2one" | "group" | "public";
"icon-url"?: string;
"message-id"?: string;
boardname?: string;
stackname?: string;
size?: string;
path?: string;
mimetype?: string;
/** @enum {string} */
"preview-available"?: "yes" | "no";
mtime?: string;
latitude?: string;
longitude?: string;
description?: string;
thumb?: string;
website?: string;
/** @enum {string} */
visibility?: "0" | "1";
/** @enum {string} */
assignable?: "0" | "1";
conversation?: string;
};
Room: {
actorId: string;
actorType: string;
@ -251,9 +278,7 @@ export type components = {
expirationTimestamp: number;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
systemMessage: string;

Просмотреть файл

@ -627,9 +627,7 @@ export type components = {
markdown: boolean;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
reactions: {
@ -761,6 +759,35 @@ export type components = {
/** Format: int64 */
timestamp: number;
};
RichObjectParameter: {
type: string;
id: string;
name: string;
server?: string;
link?: string;
/** @enum {string} */
"call-type"?: "one2one" | "group" | "public";
"icon-url"?: string;
"message-id"?: string;
boardname?: string;
stackname?: string;
size?: string;
path?: string;
mimetype?: string;
/** @enum {string} */
"preview-available"?: "yes" | "no";
mtime?: string;
latitude?: string;
longitude?: string;
description?: string;
thumb?: string;
website?: string;
/** @enum {string} */
visibility?: "0" | "1";
/** @enum {string} */
assignable?: "0" | "1";
conversation?: string;
};
Room: {
actorId: string;
actorType: string;
@ -855,9 +882,7 @@ export type components = {
expirationTimestamp: number;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
systemMessage: string;

Просмотреть файл

@ -474,9 +474,7 @@ export type components = {
markdown: boolean;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
reactions: {
@ -592,6 +590,35 @@ export type components = {
/** Format: int64 */
timestamp: number;
};
RichObjectParameter: {
type: string;
id: string;
name: string;
server?: string;
link?: string;
/** @enum {string} */
"call-type"?: "one2one" | "group" | "public";
"icon-url"?: string;
"message-id"?: string;
boardname?: string;
stackname?: string;
size?: string;
path?: string;
mimetype?: string;
/** @enum {string} */
"preview-available"?: "yes" | "no";
mtime?: string;
latitude?: string;
longitude?: string;
description?: string;
thumb?: string;
website?: string;
/** @enum {string} */
visibility?: "0" | "1";
/** @enum {string} */
assignable?: "0" | "1";
conversation?: string;
};
Room: {
actorId: string;
actorType: string;
@ -686,9 +713,7 @@ export type components = {
expirationTimestamp: number;
message: string;
messageParameters: {
[key: string]: {
[key: string]: Record<string, never>;
};
[key: string]: components["schemas"]["RichObjectParameter"];
};
messageType: string;
systemMessage: string;