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
|
// @Tags General
|
||||||
// @Description Returns the supported API versions and the internal build nr
|
// @Description Returns the supported API versions and the internal build nr
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} About
|
// @Success 200 {object} client.About
|
||||||
// @Router /v1/about [get]
|
// @Router /v1/about [get]
|
||||||
func (a *Api) About(c *gin.Context) {
|
func (a *Api) About(c *gin.Context) {
|
||||||
c.JSON(200, a.signalClient.About())
|
c.JSON(200, a.signalClient.About())
|
||||||
@@ -342,7 +342,7 @@ func (a *Api) CreateGroup(c *gin.Context) {
|
|||||||
// @Description List all Signal Groups.
|
// @Description List all Signal Groups.
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} []GroupEntry
|
// @Success 200 {object} []client.GroupEntry
|
||||||
// @Failure 400 {object} Error
|
// @Failure 400 {object} Error
|
||||||
// @Param number path string true "Registered Phone Number"
|
// @Param number path string true "Registered Phone Number"
|
||||||
// @Router /v1/groups/{number} [get]
|
// @Router /v1/groups/{number} [get]
|
||||||
@@ -363,7 +363,7 @@ func (a *Api) GetGroups(c *gin.Context) {
|
|||||||
// @Description List a specific Signal Group.
|
// @Description List a specific Signal Group.
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} GroupEntry
|
// @Success 200 {object} client.GroupEntry
|
||||||
// @Failure 400 {object} Error
|
// @Failure 400 {object} Error
|
||||||
// @Param number path string true "Registered Phone Number"
|
// @Param number path string true "Registered Phone Number"
|
||||||
// @Param groupid path string true "Group ID"
|
// @Param groupid path string true "Group ID"
|
||||||
@@ -588,7 +588,7 @@ func (a *Api) Health(c *gin.Context) {
|
|||||||
// @Tags Identities
|
// @Tags Identities
|
||||||
// @Description List all identities for the given number.
|
// @Description List all identities for the given number.
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} []IdentityEntry
|
// @Success 200 {object} []client.IdentityEntry
|
||||||
// @Param number path string true "Registered Phone Number"
|
// @Param number path string true "Registered Phone Number"
|
||||||
// @Router /v1/identities/{number} [get]
|
// @Router /v1/identities/{number} [get]
|
||||||
func (a *Api) ListIdentities(c *gin.Context) {
|
func (a *Api) ListIdentities(c *gin.Context) {
|
||||||
|
|||||||
152
src/docs/docs.go
152
src/docs/docs.go
@@ -39,7 +39,7 @@ var doc = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/api.About"
|
"$ref": "#/definitions/client.About"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ var doc = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/api.GroupEntry"
|
"$ref": "#/definitions/client.GroupEntry"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -328,7 +328,7 @@ var doc = `{
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/api.GroupEntry"
|
"$ref": "#/definitions/client.GroupEntry"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
@@ -563,7 +563,7 @@ var doc = `{
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/api.IdentityEntry"
|
"$ref": "#/definitions/client.IdentityEntry"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -918,20 +918,6 @@ var doc = `{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"api.About": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"build": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"versions": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"api.Configuration": {
|
"api.Configuration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"api.GroupPermissions": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"api.LoggingConfiguration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -1162,6 +1090,78 @@ var doc = `{
|
|||||||
"type": "string"
|
"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": [
|
"tags": [
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/api.About"
|
"$ref": "#/definitions/client.About"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/api.GroupEntry"
|
"$ref": "#/definitions/client.GroupEntry"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/api.GroupEntry"
|
"$ref": "#/definitions/client.GroupEntry"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
@@ -548,7 +548,7 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/api.IdentityEntry"
|
"$ref": "#/definitions/client.IdentityEntry"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -903,20 +903,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"api.About": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"build": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"versions": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"api.Configuration": {
|
"api.Configuration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"api.GroupPermissions": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"api.LoggingConfiguration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -1147,6 +1075,78 @@
|
|||||||
"type": "string"
|
"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": [
|
"tags": [
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
basePath: /
|
basePath: /
|
||||||
definitions:
|
definitions:
|
||||||
api.About:
|
|
||||||
properties:
|
|
||||||
build:
|
|
||||||
type: integer
|
|
||||||
versions:
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
type: object
|
|
||||||
api.Configuration:
|
api.Configuration:
|
||||||
properties:
|
properties:
|
||||||
logging:
|
logging:
|
||||||
@@ -45,31 +36,6 @@ definitions:
|
|||||||
error:
|
error:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
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:
|
api.GroupPermissions:
|
||||||
properties:
|
properties:
|
||||||
add_members:
|
add_members:
|
||||||
@@ -83,19 +49,6 @@ definitions:
|
|||||||
- every-member
|
- every-member
|
||||||
type: string
|
type: string
|
||||||
type: object
|
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:
|
api.LoggingConfiguration:
|
||||||
properties:
|
properties:
|
||||||
Level:
|
Level:
|
||||||
@@ -160,6 +113,53 @@ definitions:
|
|||||||
pin:
|
pin:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
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
|
host: 127.0.0.1:8080
|
||||||
info:
|
info:
|
||||||
contact: {}
|
contact: {}
|
||||||
@@ -177,7 +177,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/api.About'
|
$ref: '#/definitions/client.About'
|
||||||
summary: Lists general information about the API
|
summary: Lists general information about the API
|
||||||
tags:
|
tags:
|
||||||
- General
|
- General
|
||||||
@@ -307,7 +307,7 @@ paths:
|
|||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/api.GroupEntry'
|
$ref: '#/definitions/client.GroupEntry'
|
||||||
type: array
|
type: array
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
@@ -397,7 +397,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/api.GroupEntry'
|
$ref: '#/definitions/client.GroupEntry'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
@@ -524,7 +524,7 @@ paths:
|
|||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/api.IdentityEntry'
|
$ref: '#/definitions/client.IdentityEntry'
|
||||||
type: array
|
type: array
|
||||||
summary: List Identities
|
summary: List Identities
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
Reference in New Issue
Block a user