rebuild swagger documentation

This commit is contained in:
Bernhard B 2021-11-06 14:55:09 +01:00
parent a6489ce742
commit e5d170eaf6
3 changed files with 517 additions and 419 deletions

View File

@ -694,6 +694,84 @@ var doc = `{
} }
} }
}, },
"/v1/reactions/{number}": {
"post": {
"description": "React to a message",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Reactions"
],
"summary": "Send a reaction.",
"parameters": [
{
"description": "Reaction",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.Reaction"
}
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"delete": {
"description": "Remove a reaction",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Reactions"
],
"summary": "Remove a reaction.",
"parameters": [
{
"description": "Reaction",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.Reaction"
}
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/v1/receive/{number}": { "/v1/receive/{number}": {
"get": { "get": {
"description": "Receives Signal Messages from the Signal Network. If you are running the docker container in normal/native mode, this is a GET endpoint. In json-rpc mode this is a websocket endpoint.", "description": "Receives Signal Messages from the Signal Network. If you are running the docker container in normal/native mode, this is a GET endpoint. In json-rpc mode this is a websocket endpoint.",
@ -1091,6 +1169,23 @@ var doc = `{
} }
} }
}, },
"api.Reaction": {
"type": "object",
"properties": {
"reaction": {
"type": "string"
},
"recipient": {
"type": "string"
},
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.RegisterNumberRequest": { "api.RegisterNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -1295,6 +1390,10 @@ var doc = `{
{ {
"description": "List and Trust Identities.", "description": "List and Trust Identities.",
"name": "Identities" "name": "Identities"
},
{
"description": "React to messages.",
"name": "Reactions"
} }
] ]
}` }`

View File

@ -681,7 +681,7 @@
}, },
"/v1/reactions/{number}": { "/v1/reactions/{number}": {
"post": { "post": {
"description": "React to a message.", "description": "React to a message",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -694,7 +694,7 @@
"summary": "Send a reaction.", "summary": "Send a reaction.",
"parameters": [ "parameters": [
{ {
"description": "Reactions", "description": "Reaction",
"name": "data", "name": "data",
"in": "body", "in": "body",
"required": true, "required": true,
@ -719,7 +719,7 @@
} }
}, },
"delete": { "delete": {
"description": "Delete a reaction.", "description": "Remove a reaction",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -729,10 +729,10 @@
"tags": [ "tags": [
"Reactions" "Reactions"
], ],
"summary": "Delete a reaction.", "summary": "Remove a reaction.",
"parameters": [ "parameters": [
{ {
"description": "Reactions", "description": "Reaction",
"name": "data", "name": "data",
"in": "body", "in": "body",
"required": true, "required": true,
@ -757,23 +757,6 @@
} }
} }
}, },
"api.Reaction": {
"type": "object",
"properties": {
"recipient": {
"type": "string"
},
"reaction": {
"type": "string"
},
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"/v1/receive/{number}": { "/v1/receive/{number}": {
"get": { "get": {
"description": "Receives Signal Messages from the Signal Network. If you are running the docker container in normal/native mode, this is a GET endpoint. In json-rpc mode this is a websocket endpoint.", "description": "Receives Signal Messages from the Signal Network. If you are running the docker container in normal/native mode, this is a GET endpoint. In json-rpc mode this is a websocket endpoint.",
@ -1171,6 +1154,23 @@
} }
} }
}, },
"api.Reaction": {
"type": "object",
"properties": {
"reaction": {
"type": "string"
},
"recipient": {
"type": "string"
},
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.RegisterNumberRequest": { "api.RegisterNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -1,9 +1,9 @@
"basePath: / basePath: /
definitions: definitions:
api.Configuration: api.Configuration:
properties: properties:
logging: logging:
$ref: "#/definitions/api.LoggingConfiguration" $ref: '#/definitions/api.LoggingConfiguration'
type: object type: object
type: object type: object
api.CreateGroupRequest: api.CreateGroupRequest:
@ -23,7 +23,7 @@ definitions:
name: name:
type: string type: string
permissions: permissions:
$ref: "#/definitions/api.GroupPermissions" $ref: '#/definitions/api.GroupPermissions'
type: object type: object
type: object type: object
api.CreateGroupResponse: api.CreateGroupResponse:
@ -56,10 +56,10 @@ definitions:
type: object type: object
api.Reaction: api.Reaction:
properties: properties:
recipient:
type: string
reaction: reaction:
type: string type: string
recipient:
type: string
target_author: target_author:
type: string type: string
timestamp: timestamp:
@ -195,7 +195,7 @@ paths:
"200": "200":
description: OK description: OK
schema: schema:
$ref: "#/definitions/client.About" $ref: '#/definitions/client.About'
summary: Lists general information about the API summary: Lists general information about the API
tags: tags:
- General - General
@ -214,7 +214,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: List all attachments. summary: List all attachments.
tags: tags:
- Attachments - Attachments
@ -237,7 +237,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Remove attachment. summary: Remove attachment.
tags: tags:
- Attachments - Attachments
@ -259,7 +259,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Serve Attachment. summary: Serve Attachment.
tags: tags:
- Attachments - Attachments
@ -274,11 +274,11 @@ paths:
"200": "200":
description: OK description: OK
schema: schema:
$ref: "#/definitions/api.Configuration" $ref: '#/definitions/api.Configuration'
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: List the REST API configuration. summary: List the REST API configuration.
tags: tags:
- General - General
@ -292,7 +292,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.Configuration" $ref: '#/definitions/api.Configuration'
produces: produces:
- application/json - application/json
responses: responses:
@ -303,7 +303,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Set the REST API configuration. summary: Set the REST API configuration.
tags: tags:
- General - General
@ -325,12 +325,12 @@ paths:
description: OK description: OK
schema: schema:
items: items:
$ref: "#/definitions/client.GroupEntry" $ref: '#/definitions/client.GroupEntry'
type: array type: array
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: List all Signal Groups. summary: List all Signal Groups.
tags: tags:
- Groups - Groups
@ -344,7 +344,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.CreateGroupRequest" $ref: '#/definitions/api.CreateGroupRequest'
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
name: number name: number
@ -356,11 +356,11 @@ paths:
"201": "201":
description: Created description: Created
schema: schema:
$ref: "#/definitions/api.CreateGroupResponse" $ref: '#/definitions/api.CreateGroupResponse'
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Create a new Signal Group. summary: Create a new Signal Group.
tags: tags:
- Groups - Groups
@ -390,7 +390,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Delete a Signal Group. summary: Delete a Signal Group.
tags: tags:
- Groups - Groups
@ -415,11 +415,11 @@ paths:
"200": "200":
description: OK description: OK
schema: schema:
$ref: "#/definitions/client.GroupEntry" $ref: '#/definitions/client.GroupEntry'
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: List a Signal Group. summary: List a Signal Group.
tags: tags:
- Groups - Groups
@ -449,7 +449,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Block a Signal Group. summary: Block a Signal Group.
tags: tags:
- Groups - Groups
@ -479,7 +479,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Join a Signal Group. summary: Join a Signal Group.
tags: tags:
- Groups - Groups
@ -509,7 +509,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Quit a Signal Group. summary: Quit a Signal Group.
tags: tags:
- Groups - Groups
@ -542,7 +542,7 @@ paths:
description: OK description: OK
schema: schema:
items: items:
$ref: "#/definitions/client.IdentityEntry" $ref: '#/definitions/client.IdentityEntry'
type: array type: array
summary: List Identities summary: List Identities
tags: tags:
@ -556,7 +556,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.TrustIdentityRequest" $ref: '#/definitions/api.TrustIdentityRequest'
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
name: number name: number
@ -586,7 +586,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.UpdateProfileRequest" $ref: '#/definitions/api.UpdateProfileRequest'
- description: Registered Phone Number - description: Registered Phone Number
in: path in: path
name: number name: number
@ -602,7 +602,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Update Profile. summary: Update Profile.
tags: tags:
- Profiles - Profiles
@ -625,17 +625,42 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Link device and generate QR code. summary: Link device and generate QR code.
tags: tags:
- Devices - Devices
/v1/reactions/{number}: /v1/reactions/{number}:
delete:
consumes:
- application/json
description: Remove a reaction
parameters:
- description: Reaction
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.Reaction'
produces:
- application/json
responses:
"204":
description: No Content
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
summary: Remove a reaction.
tags:
- Reactions
post: post:
consumes: consumes:
- application/json - application/json
description: React to a message. description: React to a message
parameters: parameters:
- description: Reactions - description: Reaction
in: body in: body
name: data name: data
required: true required: true
@ -655,31 +680,6 @@ paths:
summary: Send a reaction. summary: Send a reaction.
tags: tags:
- Reactions - Reactions
delete:
consumes:
- application/json
description: Delete a reaction.
parameters:
- description: Reactions
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.Reaction'
produces:
- application/json
responses:
"204":
description: No Content
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
summary: Delete a reaction.
tags:
- Reactions
/v1/receive/{number}: /v1/receive/{number}:
get: get:
consumes: consumes:
@ -691,7 +691,7 @@ paths:
name: number name: number
required: true required: true
type: string type: string
- description: "Receive timeout in seconds (default: 1)" - description: 'Receive timeout in seconds (default: 1)'
in: query in: query
name: timeout name: timeout
type: string type: string
@ -707,7 +707,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Receive Signal Messages. summary: Receive Signal Messages.
tags: tags:
- Messages - Messages
@ -726,7 +726,7 @@ paths:
in: body in: body
name: data name: data
schema: schema:
$ref: "#/definitions/api.RegisterNumberRequest" $ref: '#/definitions/api.RegisterNumberRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -734,7 +734,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Register a phone number. summary: Register a phone number.
tags: tags:
- Devices - Devices
@ -753,7 +753,7 @@ paths:
in: body in: body
name: data name: data
schema: schema:
$ref: "#/definitions/api.VerifyNumberSettings" $ref: '#/definitions/api.VerifyNumberSettings'
- description: Verification Code - description: Verification Code
in: path in: path
name: token name: token
@ -769,7 +769,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Verify a registered phone number. summary: Verify a registered phone number.
tags: tags:
- Devices - Devices
@ -785,7 +785,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.SendMessageV1" $ref: '#/definitions/api.SendMessageV1'
produces: produces:
- application/json - application/json
responses: responses:
@ -796,7 +796,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Send a signal message. summary: Send a signal message.
tags: tags:
- Messages - Messages
@ -816,7 +816,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.TypingIndicatorRequest" $ref: '#/definitions/api.TypingIndicatorRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -827,7 +827,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Hide Typing Indicator. summary: Hide Typing Indicator.
tags: tags:
- Messages - Messages
@ -846,7 +846,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.TypingIndicatorRequest" $ref: '#/definitions/api.TypingIndicatorRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -857,7 +857,7 @@ paths:
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Show Typing Indicator. summary: Show Typing Indicator.
tags: tags:
- Messages - Messages
@ -872,18 +872,18 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: "#/definitions/api.SendMessageV2" $ref: '#/definitions/api.SendMessageV2'
produces: produces:
- application/json - application/json
responses: responses:
"201": "201":
description: Created description: Created
schema: schema:
$ref: "#/definitions/api.SendMessageResponse" $ref: '#/definitions/api.SendMessageResponse'
"400": "400":
description: Bad Request description: Bad Request
schema: schema:
$ref: "#/definitions/api.Error" $ref: '#/definitions/api.Error'
summary: Send a signal message. summary: Send a signal message.
tags: tags:
- Messages - Messages
@ -905,4 +905,3 @@ tags:
name: Identities name: Identities
- description: React to messages. - description: React to messages.
name: Reactions name: Reactions
"