Skip to content

Commit f663182

Browse files
committed
fix: api spec
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 74ae7f9 commit f663182

3 files changed

Lines changed: 56 additions & 1 deletion

File tree

lib/Controller/ContextController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ public function create(string $name, string $iconName, string $description = '',
131131
* @param ?string $description provide this parameter to set a new description
132132
* @param ?array{id: int, type: int, permissions: int, order: int} $nodes provide this parameter to set a new list of nodes.
133133
*
134-
* @return DataResponse<Http::STATUS_OK, TablesContext, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND|Http::STATUS_FORBIDDEN, array{message: string}, array{}>
134+
* @return DataResponse<Http::STATUS_OK, TablesContext, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND|Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST, array{message: string}, array{}>
135135
*
136136
* 200: returning the full context information
137+
* 400: bad request
137138
* 403: No permissions
138139
* 404: Not found
139140
*

openapi.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9158,6 +9158,44 @@
91589158
}
91599159
}
91609160
},
9161+
"400": {
9162+
"description": "bad request",
9163+
"content": {
9164+
"application/json": {
9165+
"schema": {
9166+
"type": "object",
9167+
"required": [
9168+
"ocs"
9169+
],
9170+
"properties": {
9171+
"ocs": {
9172+
"type": "object",
9173+
"required": [
9174+
"meta",
9175+
"data"
9176+
],
9177+
"properties": {
9178+
"meta": {
9179+
"$ref": "#/components/schemas/OCSMeta"
9180+
},
9181+
"data": {
9182+
"type": "object",
9183+
"required": [
9184+
"message"
9185+
],
9186+
"properties": {
9187+
"message": {
9188+
"type": "string"
9189+
}
9190+
}
9191+
}
9192+
}
9193+
}
9194+
}
9195+
}
9196+
}
9197+
}
9198+
},
91619199
"401": {
91629200
"description": "Current user is not logged in",
91639201
"content": {

src/types/openapi/openapi.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5254,6 +5254,22 @@ export interface operations {
52545254
};
52555255
};
52565256
};
5257+
/** @description bad request */
5258+
readonly 400: {
5259+
headers: {
5260+
readonly [name: string]: unknown;
5261+
};
5262+
content: {
5263+
readonly "application/json": {
5264+
readonly ocs: {
5265+
readonly meta: components["schemas"]["OCSMeta"];
5266+
readonly data: {
5267+
readonly message: string;
5268+
};
5269+
};
5270+
};
5271+
};
5272+
};
52575273
/** @description Current user is not logged in */
52585274
readonly 401: {
52595275
headers: {

0 commit comments

Comments
 (0)