Skip to content

Commit

Permalink
fix(OpenAPI): Set correct capabilities type
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Apr 2, 2024
1 parent 28ab1b4 commit c378086
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
7 changes: 6 additions & 1 deletion lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ public function __construct(
}

/**
* @return array<string, array<string, bool|string>>
* @return array{
* assistant: array{
* version: string,
* enabled?: bool
* }
* }
*/
public function getCapabilities(): array {
$appVersion = $this->appManager->getAppVersion(Application::APP_ID);
Expand Down
24 changes: 15 additions & 9 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,23 @@
},
"PublicCapabilities": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "boolean"
},
{
"required": [
"assistant"
],
"properties": {
"assistant": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "string"
},
"enabled": {
"type": "boolean"
}
]
}
}
}
},
Expand Down

0 comments on commit c378086

Please sign in to comment.