Fix swagger errors
This commit is contained in:
@@ -1656,7 +1656,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"API-v2"
|
||||
],
|
||||
@@ -1710,6 +1710,85 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"API-v2"
|
||||
],
|
||||
"summary": "(Partially) update a channel",
|
||||
"operationId": "api-channels-update",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "UserID",
|
||||
"name": "uid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "ChannelID",
|
||||
"name": "cid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Send `true` to create a new subscribe_key",
|
||||
"name": "subscribe_key",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Send `true` to create a new send_key",
|
||||
"name": "send_key",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Change the cahnnel display-name (only chnages to lowercase/uppercase are allowed - internal_name must stay the same)",
|
||||
"name": "display_name",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ChannelWithSubscription"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "supplied values/parameters cannot be parsed / are invalid",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "user is not authorized / has missing permissions",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "channel not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/users/{uid}/channels/{cid}/messages": {
|
||||
@@ -2122,11 +2201,12 @@
|
||||
},
|
||||
"/api/v2/users/{uid}/keys": {
|
||||
"get": {
|
||||
"description": "The request must be done with an ADMIN key, the returned keys are without their token.",
|
||||
"tags": [
|
||||
"API-v2"
|
||||
],
|
||||
"summary": "List sender-names (of allthe messages of this user)",
|
||||
"operationId": "api-usersendernames-list",
|
||||
"summary": "List keys of the user",
|
||||
"operationId": "api-tokenkeys-list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2461,6 +2541,56 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/users/{uid}/sender-names": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"API-v2"
|
||||
],
|
||||
"summary": "List sender-names (of allthe messages of this user)",
|
||||
"operationId": "api-usersendernames-list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "UserID",
|
||||
"name": "uid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.ListUserKeys.response"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "supplied values/parameters cannot be parsed / are invalid",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "user is not authorized / has missing permissions",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "message not found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ginresp.apiError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/users/{uid}/subscriptions": {
|
||||
"get": {
|
||||
"description": "The possible values for 'direction' are:\n- \"outgoing\" Subscriptions with the user as subscriber (= subscriptions he can use to read channels)\n- \"incoming\" Subscriptions to channels of this user (= incoming subscriptions and subscription requests)\n- \"both\" Combines \"outgoing\" and \"incoming\" (default)\n\nThe possible values for 'confirmation' are:\n- \"confirmed\" Confirmed (active) subscriptions\n- \"unconfirmed\" Unconfirmed (pending) subscriptions\n- \"all\" Combines \"confirmed\" and \"unconfirmed\" (default)\n\nThe possible values for 'external' are:\n- \"true\" Subscriptions with subscriber_user_id != channel_owner_user_id (subscriptions from other users)\n- \"false\" Subscriptions with subscriber_user_id == channel_owner_user_id (subscriptions from this user to his own channels)\n- \"all\" Combines \"external\" and \"internal\" (default)\n\nThe `subscriber_user_id` parameter can be used to additionally filter the subscriber_user_id (return subscribtions from a specific user)\n\nThe `channel_owner_user_id` parameter can be used to additionally filter the channel_owner_user_id (return subscribtions to a specific user)",
|
||||
|
||||
@@ -1954,6 +1954,43 @@ paths:
|
||||
tags:
|
||||
- API-v2
|
||||
/api/v2/users/{uid}/channels/{cid}:
|
||||
delete:
|
||||
operationId: api-channels-delete
|
||||
parameters:
|
||||
- description: UserID
|
||||
in: path
|
||||
name: uid
|
||||
required: true
|
||||
type: string
|
||||
- description: ChannelID
|
||||
in: path
|
||||
name: cid
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Channel'
|
||||
"400":
|
||||
description: supplied values/parameters cannot be parsed / are invalid
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"401":
|
||||
description: user is not authorized / has missing permissions
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"404":
|
||||
description: channel not found
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"500":
|
||||
description: internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
summary: delete a channel (including all messages, subscriptions, etc)
|
||||
tags:
|
||||
- API-v2
|
||||
get:
|
||||
operationId: api-channels-get
|
||||
parameters:
|
||||
@@ -1992,7 +2029,7 @@ paths:
|
||||
tags:
|
||||
- API-v2
|
||||
patch:
|
||||
operationId: api-channels-delete
|
||||
operationId: api-channels-update
|
||||
parameters:
|
||||
- description: UserID
|
||||
in: path
|
||||
@@ -2004,11 +2041,27 @@ paths:
|
||||
name: cid
|
||||
required: true
|
||||
type: string
|
||||
- description: Send `true` to create a new subscribe_key
|
||||
in: body
|
||||
name: subscribe_key
|
||||
schema:
|
||||
type: string
|
||||
- description: Send `true` to create a new send_key
|
||||
in: body
|
||||
name: send_key
|
||||
schema:
|
||||
type: string
|
||||
- description: Change the cahnnel display-name (only chnages to lowercase/uppercase
|
||||
are allowed - internal_name must stay the same)
|
||||
in: body
|
||||
name: display_name
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Channel'
|
||||
$ref: '#/definitions/models.ChannelWithSubscription'
|
||||
"400":
|
||||
description: supplied values/parameters cannot be parsed / are invalid
|
||||
schema:
|
||||
@@ -2025,7 +2078,7 @@ paths:
|
||||
description: internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
summary: delete a channel (including all messages, subscriptions, etc)
|
||||
summary: (Partially) update a channel
|
||||
tags:
|
||||
- API-v2
|
||||
/api/v2/users/{uid}/channels/{cid}/messages:
|
||||
@@ -2305,7 +2358,9 @@ paths:
|
||||
- API-v2
|
||||
/api/v2/users/{uid}/keys:
|
||||
get:
|
||||
operationId: api-usersendernames-list
|
||||
description: The request must be done with an ADMIN key, the returned keys are
|
||||
without their token.
|
||||
operationId: api-tokenkeys-list
|
||||
parameters:
|
||||
- description: UserID
|
||||
in: path
|
||||
@@ -2333,7 +2388,7 @@ paths:
|
||||
description: internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
summary: List sender-names (of allthe messages of this user)
|
||||
summary: List keys of the user
|
||||
tags:
|
||||
- API-v2
|
||||
post:
|
||||
@@ -2533,6 +2588,39 @@ paths:
|
||||
summary: Get the key currently used by this request
|
||||
tags:
|
||||
- API-v2
|
||||
/api/v2/users/{uid}/sender-names:
|
||||
get:
|
||||
operationId: api-usersendernames-list
|
||||
parameters:
|
||||
- description: UserID
|
||||
in: path
|
||||
name: uid
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.ListUserKeys.response'
|
||||
"400":
|
||||
description: supplied values/parameters cannot be parsed / are invalid
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"401":
|
||||
description: user is not authorized / has missing permissions
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"404":
|
||||
description: message not found
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
"500":
|
||||
description: internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/ginresp.apiError'
|
||||
summary: List sender-names (of allthe messages of this user)
|
||||
tags:
|
||||
- API-v2
|
||||
/api/v2/users/{uid}/subscriptions:
|
||||
get:
|
||||
description: |-
|
||||
|
||||
Reference in New Issue
Block a user