mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 23:54:22 +01:00
fixed swaggo annotations
This commit is contained in:
@@ -96,7 +96,7 @@ func NewApi(signalClient *client.SignalClient) *Api {
|
||||
// @Tags General
|
||||
// @Description Returns the supported API versions and the internal build nr
|
||||
// @Produce json
|
||||
// @Success 200 {object} About
|
||||
// @Success 200 {object} client.About
|
||||
// @Router /v1/about [get]
|
||||
func (a *Api) About(c *gin.Context) {
|
||||
c.JSON(200, a.signalClient.About())
|
||||
@@ -342,7 +342,7 @@ func (a *Api) CreateGroup(c *gin.Context) {
|
||||
// @Description List all Signal Groups.
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} []GroupEntry
|
||||
// @Success 200 {object} []client.GroupEntry
|
||||
// @Failure 400 {object} Error
|
||||
// @Param number path string true "Registered Phone Number"
|
||||
// @Router /v1/groups/{number} [get]
|
||||
@@ -363,7 +363,7 @@ func (a *Api) GetGroups(c *gin.Context) {
|
||||
// @Description List a specific Signal Group.
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} GroupEntry
|
||||
// @Success 200 {object} client.GroupEntry
|
||||
// @Failure 400 {object} Error
|
||||
// @Param number path string true "Registered Phone Number"
|
||||
// @Param groupid path string true "Group ID"
|
||||
@@ -588,7 +588,7 @@ func (a *Api) Health(c *gin.Context) {
|
||||
// @Tags Identities
|
||||
// @Description List all identities for the given number.
|
||||
// @Produce json
|
||||
// @Success 200 {object} []IdentityEntry
|
||||
// @Success 200 {object} []client.IdentityEntry
|
||||
// @Param number path string true "Registered Phone Number"
|
||||
// @Router /v1/identities/{number} [get]
|
||||
func (a *Api) ListIdentities(c *gin.Context) {
|
||||
|
||||
152
src/docs/docs.go
152
src/docs/docs.go
@@ -39,7 +39,7 @@ var doc = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.About"
|
||||
"$ref": "#/definitions/client.About"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ var doc = `{
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.GroupEntry"
|
||||
"$ref": "#/definitions/client.GroupEntry"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -328,7 +328,7 @@ var doc = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.GroupEntry"
|
||||
"$ref": "#/definitions/client.GroupEntry"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -563,7 +563,7 @@ var doc = `{
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.IdentityEntry"
|
||||
"$ref": "#/definitions/client.IdentityEntry"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -918,20 +918,6 @@ var doc = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"api.About": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.Configuration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -986,44 +972,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.GroupEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blocked": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"internal_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"invite_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pending_invites": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"pending_requests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.GroupPermissions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1043,26 +991,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.LoggingConfiguration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1162,6 +1090,78 @@ var doc = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.About": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.GroupEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blocked": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"internal_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"invite_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pending_invites": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"pending_requests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.About"
|
||||
"$ref": "#/definitions/client.About"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.GroupEntry"
|
||||
"$ref": "#/definitions/client.GroupEntry"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -313,7 +313,7 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api.GroupEntry"
|
||||
"$ref": "#/definitions/client.GroupEntry"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -548,7 +548,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/api.IdentityEntry"
|
||||
"$ref": "#/definitions/client.IdentityEntry"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -903,20 +903,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"api.About": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.Configuration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -971,44 +957,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.GroupEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blocked": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"internal_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"invite_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pending_invites": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"pending_requests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.GroupPermissions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1028,26 +976,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.LoggingConfiguration": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1147,6 +1075,78 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.About": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"build": {
|
||||
"type": "integer"
|
||||
},
|
||||
"versions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.GroupEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blocked": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"internal_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"invite_link": {
|
||||
"type": "string"
|
||||
},
|
||||
"members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pending_invites": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"pending_requests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"client.IdentityEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string"
|
||||
},
|
||||
"number": {
|
||||
"type": "string"
|
||||
},
|
||||
"safety_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
basePath: /
|
||||
definitions:
|
||||
api.About:
|
||||
properties:
|
||||
build:
|
||||
type: integer
|
||||
versions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
api.Configuration:
|
||||
properties:
|
||||
logging:
|
||||
@@ -45,31 +36,6 @@ definitions:
|
||||
error:
|
||||
type: string
|
||||
type: object
|
||||
api.GroupEntry:
|
||||
properties:
|
||||
blocked:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
internal_id:
|
||||
type: string
|
||||
invite_link:
|
||||
type: string
|
||||
members:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
pending_invites:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
pending_requests:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
api.GroupPermissions:
|
||||
properties:
|
||||
add_members:
|
||||
@@ -83,19 +49,6 @@ definitions:
|
||||
- every-member
|
||||
type: string
|
||||
type: object
|
||||
api.IdentityEntry:
|
||||
properties:
|
||||
added:
|
||||
type: string
|
||||
fingerprint:
|
||||
type: string
|
||||
number:
|
||||
type: string
|
||||
safety_number:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
api.LoggingConfiguration:
|
||||
properties:
|
||||
Level:
|
||||
@@ -160,6 +113,53 @@ definitions:
|
||||
pin:
|
||||
type: string
|
||||
type: object
|
||||
client.About:
|
||||
properties:
|
||||
build:
|
||||
type: integer
|
||||
versions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
client.GroupEntry:
|
||||
properties:
|
||||
blocked:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
internal_id:
|
||||
type: string
|
||||
invite_link:
|
||||
type: string
|
||||
members:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
pending_invites:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
pending_requests:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
client.IdentityEntry:
|
||||
properties:
|
||||
added:
|
||||
type: string
|
||||
fingerprint:
|
||||
type: string
|
||||
number:
|
||||
type: string
|
||||
safety_number:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
host: 127.0.0.1:8080
|
||||
info:
|
||||
contact: {}
|
||||
@@ -177,7 +177,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/api.About'
|
||||
$ref: '#/definitions/client.About'
|
||||
summary: Lists general information about the API
|
||||
tags:
|
||||
- General
|
||||
@@ -307,7 +307,7 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/api.GroupEntry'
|
||||
$ref: '#/definitions/client.GroupEntry'
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
@@ -397,7 +397,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/api.GroupEntry'
|
||||
$ref: '#/definitions/client.GroupEntry'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -524,7 +524,7 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/api.IdentityEntry'
|
||||
$ref: '#/definitions/client.IdentityEntry'
|
||||
type: array
|
||||
summary: List Identities
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user