Skip to content

Commit

Permalink
fix: modify return type
Browse files Browse the repository at this point in the history
Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
  • Loading branch information
enjeck committed Jul 4, 2024
1 parent 897d7bc commit 1e755f0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/ContextController.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function create(string $name, string $iconName, string $description = '',
* @param ?string $description provide this parameter to set a new description
* @param ?array{id: int, type: int, permissions: int, order: int} $nodes provide this parameter to set a new list of nodes.
*
* @return DataResponse<Http::STATUS_OK, TablesContext, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND, array{message: string}, array{}>
* @return DataResponse<Http::STATUS_OK, TablesContext, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_NOT_FOUND|Http::STATUS_FORBIDDEN, array{message: string}, array{}>
*
* 200: returning the full context information
* 403: No permissions
Expand Down
38 changes: 38 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8728,6 +8728,44 @@
}
}
}
},
"403": {
"description": "No permissions",
"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"
}
}
}
}
}
}
}
}
}
}
}
},
Expand Down
13 changes: 13 additions & 0 deletions src/types/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3228,6 +3228,19 @@ export type operations = {
};
};
};
/** @description No permissions */
403: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
/** @description Not found */
404: {
content: {
Expand Down

0 comments on commit 1e755f0

Please sign in to comment.