Skip to content

Commit

Permalink
fixed swagger documentation
Browse files Browse the repository at this point in the history
see #602
  • Loading branch information
bbernhard committed Oct 14, 2024
1 parent 94e93cb commit 54252a3
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 2 deletions.
78 changes: 77 additions & 1 deletion src/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -2548,6 +2610,20 @@ const docTemplate = `{
"type": "string"
}
}
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
}
},
"tags": [
Expand Down
78 changes: 77 additions & 1 deletion src/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -2541,6 +2603,20 @@
"type": "string"
}
}
},
"data.MessageMention": {
"type": "object",
"properties": {
"author": {
"type": "string"
},
"length": {
"type": "integer"
},
"start": {
"type": "integer"
}
}
}
},
"tags": [
Expand Down
51 changes: 51 additions & 0 deletions src/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 54252a3

Please sign in to comment.