feat(docs): add more collection schema updates

environments/review-docs-schem-h6rah1/deployments/18770
Ciarán Ainsworth 2023-11-17 15:39:15 +01:00
rodzic f412fee577
commit 2af0d2c5ff
Nie znaleziono w bazie danych klucza dla tego podpisu
2 zmienionych plików z 77 dodań i 14 usunięć

Wyświetl plik

@ -61,22 +61,20 @@ paths:
summary: "Add a new collection"
description: "Add a new collection to the server"
operationId: postCollection
requestBody:
description: "The new metadata of the collection"
required: true
content:
application/json:
schema:
$ref: "specs/collections/schema.yml#/NewCollection"
responses:
"200":
description: Successful operation
"201":
description: Created
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Pagination"
- type: object
required:
- results
properties:
results:
type: array
items:
$ref: "specs/collections/schema.yml#/Collection"
$ref: "specs/collections/schema.yml#/SimpleCollection"
/api/v2/collections/{guid}:
get:
tags:
@ -99,6 +97,51 @@ paths:
application/json:
schema:
$ref: "specs/collections/schema.yml#/Collection"
patch:
tags:
- Collections
summary: "Update the metadata of a collection"
description: "Change metadata and details about a specific collection"
operationId: patchCollection
parameters:
- name: guid
in: path
required: true
description: The GUID of the collection
schema:
type: string
format: uuid
requestBody:
description: "The new metadata of the collection"
required: true
content:
application/json:
schema:
$ref: "specs/collections/schema.yml#/UpdateCollection"
responses:
"202":
description: Accepted
content:
application/json:
schema:
$ref: "specs/collections/schema.yml#/SimpleCollection"
delete:
tags:
- Collections
summary: "Delete a specific collection"
description: "Delete a collection. This does not delete the associated uploads."
operationId: deleteCollection
parameters:
- name: guid
in: path
required: true
description: The GUID of the collection
schema:
type: string
format: uuid
responses:
"200":
description: Successful operation
/api/v2/instance/nodeinfo/2.1:
get:
tags:
@ -249,7 +292,7 @@ paths:
schema:
$ref: "#/components/schemas/CreateRelease"
responses:
"202":
"201":
description: Created
content:
application/json:

Wyświetl plik

@ -28,6 +28,26 @@ Collection:
description:
type: string
description: "The user-defined description of the collection"
items:
recordingCount:
type: integer
description: "The total number of items in the collection"
NewCollection:
type: object
required:
- name
properties:
name:
type: string
description: "The new name for the collection"
description:
type: string
description: "The new description for the collection"
UpdateCollection:
type: object
properties:
name:
type: string
description: "The new name for the collection"
description:
type: string
description: "The new description for the collection"