added documentation for update profile REST API request

This commit is contained in:
Bernhard B
2021-01-15 21:37:47 +01:00
parent 87e917486e
commit 8130e516e6
6 changed files with 267 additions and 9 deletions

View File

@@ -127,8 +127,8 @@ var doc = `{
}
],
"responses": {
"200": {
"description": "OK",
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
@@ -264,6 +264,50 @@ var doc = `{
}
}
},
"/v1/profiles/{number}": {
"put": {
"description": "Set your name and optional an avatar.",
"produces": [
"application/json"
],
"tags": [
"Profiles"
],
"summary": "Update Profile.",
"parameters": [
{
"description": "Profile Data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.UpdateProfileRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/v1/qrcodelink": {
"get": {
"description": "Link device and generate QR code",
@@ -609,6 +653,17 @@ var doc = `{
}
}
},
"api.UpdateProfileRequest": {
"type": "object",
"properties": {
"base64_avatar": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"api.VerifyNumberSettings": {
"type": "object",
"properties": {
@@ -638,6 +693,10 @@ var doc = `{
{
"description": "List and Delete Attachments.",
"name": "Attachments"
},
{
"description": "Update Profile.",
"name": "Profiles"
}
]
}`

View File

@@ -112,8 +112,8 @@
}
],
"responses": {
"200": {
"description": "OK",
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
@@ -249,6 +249,50 @@
}
}
},
"/v1/profiles/{number}": {
"put": {
"description": "Set your name and optional an avatar.",
"produces": [
"application/json"
],
"tags": [
"Profiles"
],
"summary": "Update Profile.",
"parameters": [
{
"description": "Profile Data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.UpdateProfileRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/v1/qrcodelink": {
"get": {
"description": "Link device and generate QR code",
@@ -594,6 +638,17 @@
}
}
},
"api.UpdateProfileRequest": {
"type": "object",
"properties": {
"base64_avatar": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"api.VerifyNumberSettings": {
"type": "object",
"properties": {
@@ -623,6 +678,10 @@
{
"description": "List and Delete Attachments.",
"name": "Attachments"
},
{
"description": "Update Profile.",
"name": "Profiles"
}
]
}

View File

@@ -66,6 +66,13 @@ definitions:
type: string
type: array
type: object
api.UpdateProfileRequest:
properties:
base64_avatar:
type: string
name:
type: string
type: object
api.VerifyNumberSettings:
properties:
pin:
@@ -123,8 +130,8 @@ paths:
produces:
- application/json
responses:
"200":
description: OK
"204":
description: No Content
schema:
type: string
"400":
@@ -237,6 +244,35 @@ paths:
summary: Delete a Signal Group.
tags:
- Groups
/v1/profiles/{number}:
put:
description: Set your name and optional an avatar.
parameters:
- description: Profile Data
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.UpdateProfileRequest'
- description: Registered Phone Number
in: path
name: number
required: true
type: string
produces:
- application/json
responses:
"204":
description: No Content
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
summary: Update Profile.
tags:
- Profiles
/v1/qrcodelink:
get:
description: Link device and generate QR code
@@ -408,3 +444,5 @@ tags:
name: Messages
- description: List and Delete Attachments.
name: Attachments
- description: Update Profile.
name: Profiles