Skip to content

Commit

Permalink
docs(openapi): update specs
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Mar 14, 2024
1 parent 2b2b5a7 commit 58594a1
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 0 deletions.
145 changes: 145 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8475,6 +8475,151 @@
}
}
}
},
"delete": {
"operationId": "context-destroy",
"summary": "[api v2] Delete an existing context and return it",
"tags": [
"context"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "contextId",
"in": "path",
"description": "ID of the context",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "returning the full context information",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"$ref": "#/components/schemas/Context"
}
}
}
}
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/tables/api/2/contexts/{contextId}/transfer": {
Expand Down
53 changes: 53 additions & 0 deletions src/types/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ export type paths = {
get: operations["context-show"];
/** [api v2] Update an existing context and return it */
put: operations["context-update"];
/** [api v2] Delete an existing context and return it */
delete: operations["context-destroy"];
};
"/ocs/v2.php/apps/tables/api/2/contexts/{contextId}/transfer": {
/** [api v2] Transfer the ownership of a context and return it */
Expand Down Expand Up @@ -3164,6 +3166,57 @@ export type operations = {
};
};
};
/** [api v2] Delete an existing context and return it */
"context-destroy": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
/** @description ID of the context */
contextId: number;
};
};
responses: {
/** @description returning the full context information */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: components["schemas"]["Context"];
};
};
};
};
/** @description Not found */
404: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
500: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
/** [api v2] Transfer the ownership of a context and return it */
"context-transfer": {
parameters: {
Expand Down

0 comments on commit 58594a1

Please sign in to comment.