From 4f07a64d68693a64d071afbeed5acfdc3c351b31 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Sun, 9 Feb 2025 22:40:01 +0100 Subject: [PATCH] improved swagger documentation * documented styling options in v2/send endpoint --- src/api/api.go | 2 +- src/docs/docs.go | 2 +- src/docs/swagger.json | 2 +- src/docs/swagger.yaml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/api.go b/src/api/api.go index cbda348..65dfa95 100644 --- a/src/api/api.go +++ b/src/api/api.go @@ -395,7 +395,7 @@ func (a *Api) Send(c *gin.Context) { // @Summary Send a signal message. // @Tags Messages -// @Description Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: *italic text*, **bold text**, ~strikethrough text~. If you want to escape a formatting character, prefix it with two backslashes ('\\') +// @Description Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: \*italic text\*, \*\*bold text\*\*, ~strikethrough text~, ||spoiler||, \`monospace\`. If you want to escape a formatting character, prefix it with two backslashes. // @Accept json // @Produce json // @Success 201 {object} SendMessageResponse diff --git a/src/docs/docs.go b/src/docs/docs.go index 1f48d2e..2f9fa85 100644 --- a/src/docs/docs.go +++ b/src/docs/docs.go @@ -2014,7 +2014,7 @@ const docTemplate = `{ }, "/v2/send": { "post": { - "description": "Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: *italic text*, **bold text**, ~strikethrough text~. If you want to escape a formatting character, prefix it with two backslashes ('\\\\')", + "description": "Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: \\*italic text\\*, \\*\\*bold text\\*\\*, ~strikethrough text~, ||spoiler||, \\` + "`" + `monospace\\` + "`" + `. If you want to escape a formatting character, prefix it with two backslashes.", "consumes": [ "application/json" ], diff --git a/src/docs/swagger.json b/src/docs/swagger.json index 43e0d25..e55d097 100644 --- a/src/docs/swagger.json +++ b/src/docs/swagger.json @@ -2011,7 +2011,7 @@ }, "/v2/send": { "post": { - "description": "Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: *italic text*, **bold text**, ~strikethrough text~. If you want to escape a formatting character, prefix it with two backslashes ('\\\\')", + "description": "Send a signal message. Set the text_mode to 'styled' in case you want to add formatting to your text message. Styling Options: \\*italic text\\*, \\*\\*bold text\\*\\*, ~strikethrough text~, ||spoiler||, \\`monospace\\`. If you want to escape a formatting character, prefix it with two backslashes.", "consumes": [ "application/json" ], diff --git a/src/docs/swagger.yaml b/src/docs/swagger.yaml index 6f2f703..448f585 100644 --- a/src/docs/swagger.yaml +++ b/src/docs/swagger.yaml @@ -1753,9 +1753,9 @@ paths: consumes: - application/json description: 'Send a signal message. Set the text_mode to ''styled'' in case - you want to add formatting to your text message. Styling Options: *italic - text*, **bold text**, ~strikethrough text~. If you want to escape a formatting - character, prefix it with two backslashes (''\\'')' + you want to add formatting to your text message. Styling Options: \*italic + text\*, \*\*bold text\*\*, ~strikethrough text~, ||spoiler||, \`monospace\`. + If you want to escape a formatting character, prefix it with two backslashes.' parameters: - description: Input Data in: body