mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 23:54:22 +01:00
Ran swag init with no changes
This commit is contained in:
147
src/docs/docs.go
147
src/docs/docs.go
@@ -1,25 +1,15 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag
|
||||
|
||||
// Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{.Description}}",
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"license": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
@@ -106,7 +96,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -148,7 +140,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -196,7 +190,9 @@ var doc = `{
|
||||
"$ref": "#/definitions/client.SetUsernameResponse"
|
||||
}
|
||||
},
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -227,7 +223,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -433,7 +431,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {},
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -473,7 +473,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -545,7 +547,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -578,7 +582,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -620,7 +626,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1577,7 +1585,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {},
|
||||
"201": {
|
||||
"description": "Created"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1764,7 +1774,9 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1804,7 +1816,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -1937,7 +1951,9 @@ var doc = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {},
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
@@ -2036,7 +2052,6 @@ var doc = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"logging": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.LoggingConfiguration"
|
||||
}
|
||||
}
|
||||
@@ -2065,7 +2080,6 @@ var doc = `{
|
||||
"type": "string"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.GroupPermissions"
|
||||
}
|
||||
}
|
||||
@@ -2250,7 +2264,10 @@ var doc = `{
|
||||
"type": "integer"
|
||||
},
|
||||
"mentions": {
|
||||
"type": "string"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/data.MessageMention"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
@@ -2265,7 +2282,10 @@ var doc = `{
|
||||
"type": "string"
|
||||
},
|
||||
"quote_mentions": {
|
||||
"type": "string"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/data.MessageMention"
|
||||
}
|
||||
},
|
||||
"quote_message": {
|
||||
"type": "string"
|
||||
@@ -2559,6 +2579,20 @@ var doc = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"data.MessageMention": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "string"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer"
|
||||
},
|
||||
"start": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
@@ -2613,49 +2647,18 @@ var doc = `{
|
||||
]
|
||||
}`
|
||||
|
||||
type swaggerInfo struct {
|
||||
Version string
|
||||
Host string
|
||||
BasePath string
|
||||
Schemes []string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = swaggerInfo{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "/",
|
||||
Schemes: []string{},
|
||||
Title: "Signal Cli REST API",
|
||||
Description: "This is the Signal Cli REST API documentation.",
|
||||
}
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
sInfo := SwaggerInfo
|
||||
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
||||
|
||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||
"marshal": func(v interface{}) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
},
|
||||
}).Parse(doc)
|
||||
if err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
var tpl bytes.Buffer
|
||||
if err := t.Execute(&tpl, sInfo); err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
return tpl.String()
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "/",
|
||||
Schemes: []string{},
|
||||
Title: "Signal Cli REST API",
|
||||
Description: "This is the Signal Cli REST API documentation.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(swag.Name, &s{})
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user