fixed swagger documentation

see #602
This commit is contained in:
Bernhard B
2024-10-14 15:58:35 +02:00
parent 94e93cbe35
commit 54252a3d52
3 changed files with 205 additions and 2 deletions

View File

@@ -2278,7 +2278,69 @@ const docTemplate = `{
}
},
"api.SendMessageV2": {
"type": "object"
"type": "object",
"properties": {
"base64_attachments": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"\u003cBASE64 ENCODED DATA\u003e",
"data:\u003cMIME-TYPE\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e",
"data:\u003cMIME-TYPE\u003e;filename=\u003cFILENAME\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e"
]
},
"edit_timestamp": {
"type": "integer"
},
"mentions": {
"type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
},
"message": {
"type": "string"
},
"notify_self": {
"type": "boolean"
},
"number": {
"type": "string"
},
"quote_author": {
"type": "string"
},
"quote_mentions": {
"type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
},
"quote_message": {
"type": "string"
},
"quote_timestamp": {
"type": "integer"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
}
},
"sticker": {
"type": "string"
},
"text_mode": {
"type": "string",
"enum": [
"normal",
"styled"
]
}
}
},
"api.SetUsernameRequest": {
"type": "object",
@@ -2548,6 +2610,20 @@ const docTemplate = `{
"type": "string"
}
}
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
}
},
"tags": [

View File

@@ -2271,7 +2271,69 @@
}
},
"api.SendMessageV2": {
"type": "object"
"type": "object",
"properties": {
"base64_attachments": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"\u003cBASE64 ENCODED DATA\u003e",
"data:\u003cMIME-TYPE\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e",
"data:\u003cMIME-TYPE\u003e;filename=\u003cFILENAME\u003e;base64\u003ccomma\u003e\u003cBASE64 ENCODED DATA\u003e"
]
},
"edit_timestamp": {
"type": "integer"
},
"mentions": {
"type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
},
"message": {
"type": "string"
},
"notify_self": {
"type": "boolean"
},
"number": {
"type": "string"
},
"quote_author": {
"type": "string"
},
"quote_mentions": {
"type": "array",
"items": {
"$ref": "#/definitions/data.MessageMention"
}
},
"quote_message": {
"type": "string"
},
"quote_timestamp": {
"type": "integer"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
}
},
"sticker": {
"type": "string"
},
"text_mode": {
"type": "string",
"enum": [
"normal",
"styled"
]
}
}
},
"api.SetUsernameRequest": {
"type": "object",
@@ -2541,6 +2603,20 @@
"type": "string"
}
}
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
}
},
"tags": [

View File

@@ -163,6 +163,48 @@ definitions:
type: array
type: object
api.SendMessageV2:
properties:
base64_attachments:
example:
- <BASE64 ENCODED DATA>
- data:<MIME-TYPE>;base64<comma><BASE64 ENCODED DATA>
- data:<MIME-TYPE>;filename=<FILENAME>;base64<comma><BASE64 ENCODED DATA>
items:
type: string
type: array
edit_timestamp:
type: integer
mentions:
items:
$ref: '#/definitions/data.MessageMention'
type: array
message:
type: string
notify_self:
type: boolean
number:
type: string
quote_author:
type: string
quote_mentions:
items:
$ref: '#/definitions/data.MessageMention'
type: array
quote_message:
type: string
quote_timestamp:
type: integer
recipients:
items:
type: string
type: array
sticker:
type: string
text_mode:
enum:
- normal
- styled
type: string
type: object
api.SetUsernameRequest:
properties:
@@ -339,6 +381,15 @@ definitions:
username_link:
type: string
type: object
data.MessageMention:
properties:
author:
type: string
length:
type: integer
start:
type: integer
type: object
info:
contact: {}
description: This is the Signal Cli REST API documentation.