improved documentation

* added missing 'device_name' parameter to qrcodelink endpoint

see #95
This commit is contained in:
Bernhard B
2021-02-16 18:27:07 +01:00
parent 889f37d951
commit 1291a99087
4 changed files with 34 additions and 8 deletions

View File

@@ -745,6 +745,7 @@ func (a *Api) DeleteGroup(c *gin.Context) {
// @Description Link device and generate QR code // @Description Link device and generate QR code
// @Produce json // @Produce json
// @Success 200 {string} string "Image" // @Success 200 {string} string "Image"
// @Param device_name query string true "Device Name"
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Router /v1/qrcodelink [get] // @Router /v1/qrcodelink [get]
func (a *Api) GetQrCodeLink(c *gin.Context) { func (a *Api) GetQrCodeLink(c *gin.Context) {

View File

@@ -19,6 +19,7 @@ var doc = `{
"description": "{{.Description}}", "description": "{{.Description}}",
"title": "{{.Title}}", "title": "{{.Title}}",
"contact": {}, "contact": {},
"license": {},
"version": "{{.Version}}" "version": "{{.Version}}"
}, },
"host": "{{.Host}}", "host": "{{.Host}}",
@@ -659,6 +660,15 @@ var doc = `{
"Devices" "Devices"
], ],
"summary": "Link device and generate QR code.", "summary": "Link device and generate QR code.",
"parameters": [
{
"type": "string",
"description": "Device Name",
"name": "device_name",
"in": "query",
"required": true
}
],
"responses": { "responses": {
"200": { "200": {
"description": "Image", "description": "Image",
@@ -753,9 +763,7 @@ var doc = `{
} }
], ],
"responses": { "responses": {
"201": { "201": {},
"description": ""
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -919,6 +927,7 @@ var doc = `{
"type": "object", "type": "object",
"properties": { "properties": {
"logging": { "logging": {
"type": "object",
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
} }
} }

View File

@@ -4,6 +4,7 @@
"description": "This is the Signal Cli REST API documentation.", "description": "This is the Signal Cli REST API documentation.",
"title": "Signal Cli REST API", "title": "Signal Cli REST API",
"contact": {}, "contact": {},
"license": {},
"version": "1.0" "version": "1.0"
}, },
"host": "127.0.0.1:8080", "host": "127.0.0.1:8080",
@@ -644,6 +645,15 @@
"Devices" "Devices"
], ],
"summary": "Link device and generate QR code.", "summary": "Link device and generate QR code.",
"parameters": [
{
"type": "string",
"description": "Device Name",
"name": "device_name",
"in": "query",
"required": true
}
],
"responses": { "responses": {
"200": { "200": {
"description": "Image", "description": "Image",
@@ -738,9 +748,7 @@
} }
], ],
"responses": { "responses": {
"201": { "201": {},
"description": ""
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"schema": { "schema": {
@@ -904,6 +912,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"logging": { "logging": {
"type": "object",
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
} }
} }

View File

@@ -14,6 +14,7 @@ definitions:
logging: logging:
$ref: '#/definitions/api.LoggingConfiguration' $ref: '#/definitions/api.LoggingConfiguration'
type: object type: object
type: object
api.CreateGroup: api.CreateGroup:
properties: properties:
id: id:
@@ -125,6 +126,7 @@ host: 127.0.0.1:8080
info: info:
contact: {} contact: {}
description: This is the Signal Cli REST API documentation. description: This is the Signal Cli REST API documentation.
license: {}
title: Signal Cli REST API title: Signal Cli REST API
version: "1.0" version: "1.0"
paths: paths:
@@ -545,6 +547,12 @@ paths:
/v1/qrcodelink: /v1/qrcodelink:
get: get:
description: Link device and generate QR code description: Link device and generate QR code
parameters:
- description: Device Name
in: query
name: device_name
required: true
type: string
produces: produces:
- application/json - application/json
responses: responses:
@@ -609,8 +617,7 @@ paths:
produces: produces:
- application/json - application/json
responses: responses:
"201": "201": {}
description: ""
"400": "400":
description: Bad Request description: Bad Request
schema: schema: