Fix minor things in management API spec

This commit is contained in:
Tulir Asokan 2018-10-27 19:58:35 +03:00
parent 6001b66044
commit aefdcd9447

View File

@ -59,9 +59,9 @@ paths:
type: string type: string
format: binary format: binary
example: The plugin maubot archive (.mbp) example: The plugin maubot archive (.mbp)
'/plugin/{type}': '/plugin/{id}':
parameters: parameters:
- name: type - name: id
in: path in: path
description: The ID of the plugin to get description: The ID of the plugin to get
required: true required: true
@ -94,15 +94,26 @@ paths:
404: 404:
description: Plugin not found description: Plugin not found
412: 412:
description: Instances of the uploaded plugin type exists, so the plugin can't be deleted description: One or more plugin instances of this type exist
'/instance/{type}/{id}':
/instances:
get:
operationId: get_instances
summary: Get all plugin instances
tags: [Plugin instances]
responses:
200:
description: The list of instances
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PluginInstance'
401:
$ref: '#/components/responses/Unauthorized'
'/instance/{id}':
parameters: parameters:
- name: type
in: path
description: The ID of the plugin whose instance to get
required: true
schema:
type: string
- name: id - name: id
in: path in: path
description: The ID of the instance to get description: The ID of the instance to get
@ -137,7 +148,7 @@ paths:
description: Plugin or instance not found description: Plugin or instance not found
put: put:
operationId: update_instance operationId: update_instance
summary: Edit the details of a plugin instance summary: Create a plugin instance or edit the details of an existing plugin instance
tags: [Plugin instances] tags: [Plugin instances]
responses: responses:
200: 200:
@ -188,7 +199,7 @@ paths:
description: Client not found description: Client not found
put: put:
operationId: update_client operationId: update_client
summary: Update a Matrix client summary: Create or update a Matrix client
tags: [Client] tags: [Client]
responses: responses:
200: 200:
@ -218,6 +229,8 @@ paths:
$ref: '#/components/responses/Unauthorized' $ref: '#/components/responses/Unauthorized'
404: 404:
description: Client not found description: Client not found
412:
description: One or more plugin instances with this as their primary client exist
components: components:
responses: responses: