Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update openapi-extractor to v1.3.0 #14010

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions appinfo/routes/routesBotController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

$requirements = [
'apiVersion' => '(v1)',
];

$requirementsWithToken = [
'apiVersion' => '(v1)',
'token' => '[a-z0-9]{4,30}',
];

Expand All @@ -26,15 +30,15 @@
return [
'ocs' => [
/** @see \OCA\Talk\Controller\BotController::sendMessage() */
['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirements],
['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\BotController::react() */
['name' => 'Bot#react', 'url' => '/api/{apiVersion}/bot/{token}/reaction/{messageId}', 'verb' => 'POST', 'requirements' => $requirementsWithMessageId],
/** @see \OCA\Talk\Controller\BotController::deleteReaction() */
['name' => 'Bot#deleteReaction', 'url' => '/api/{apiVersion}/bot/{token}/reaction/{messageId}', 'verb' => 'DELETE', 'requirements' => $requirementsWithMessageId],
/** @see \OCA\Talk\Controller\BotController::adminListBots() */
['name' => 'Bot#adminListBots', 'url' => '/api/{apiVersion}/bot/admin', 'verb' => 'GET', 'requirements' => $requirements],
/** @see \OCA\Talk\Controller\BotController::listBots() */
['name' => 'Bot#listBots', 'url' => '/api/{apiVersion}/bot/{token}', 'verb' => 'GET', 'requirements' => $requirements],
['name' => 'Bot#listBots', 'url' => '/api/{apiVersion}/bot/{token}', 'verb' => 'GET', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\BotController::enableBot() */
['name' => 'Bot#enableBot', 'url' => '/api/{apiVersion}/bot/{token}/{botId}', 'verb' => 'POST', 'requirements' => $requirementsWithBotId],
/** @see \OCA\Talk\Controller\BotController::disableBot() */
Expand Down
14 changes: 9 additions & 5 deletions appinfo/routes/routesRecordingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

$requirements = [
'apiVersion' => '(v1)',
];

$requirementsWithToken = [
'apiVersion' => '(v1)',
'token' => '[a-z0-9]{4,30}',
];

Expand All @@ -20,14 +24,14 @@
/** @see \OCA\Talk\Controller\RecordingController::backend() */
['name' => 'Recording#backend', 'url' => '/api/{apiVersion}/recording/backend', 'verb' => 'POST', 'requirements' => $requirements],
/** @see \OCA\Talk\Controller\RecordingController::start() */
['name' => 'Recording#start', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirements],
['name' => 'Recording#start', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\RecordingController::stop() */
['name' => 'Recording#stop', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirements],
['name' => 'Recording#stop', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\RecordingController::store() */
['name' => 'Recording#store', 'url' => '/api/{apiVersion}/recording/{token}/store', 'verb' => 'POST', 'requirements' => $requirements],
['name' => 'Recording#store', 'url' => '/api/{apiVersion}/recording/{token}/store', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\RecordingController::notificationDismiss() */
['name' => 'Recording#notificationDismiss', 'url' => '/api/{apiVersion}/recording/{token}/notification', 'verb' => 'DELETE', 'requirements' => $requirements],
['name' => 'Recording#notificationDismiss', 'url' => '/api/{apiVersion}/recording/{token}/notification', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken],
/** @see \OCA\Talk\Controller\RecordingController::shareToChat() */
['name' => 'Recording#shareToChat', 'url' => '/api/{apiVersion}/recording/{token}/share-chat', 'verb' => 'POST', 'requirements' => $requirements],
['name' => 'Recording#shareToChat', 'url' => '/api/{apiVersion}/recording/{token}/share-chat', 'verb' => 'POST', 'requirements' => $requirementsWithToken],
],
];
6 changes: 4 additions & 2 deletions lib/Model/BotServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @method void setFeatures(int $features)
* @method int getFeatures()
*
* @psalm-import-type TalkBotWithDetailsAndSecret from ResponseDefinitions
* @psalm-import-type TalkBotWithDetails from ResponseDefinitions
*/
class BotServer extends Entity implements \JsonSerializable {
protected string $name = '';
Expand Down Expand Up @@ -62,9 +62,11 @@
}

/**
* @return TalkBotWithDetailsAndSecret
* @return TalkBotWithDetails&array{
* secret: string,
* }
*/
public function jsonSerialize(): array {

Check failure on line 69 in lib/Model/BotServer.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidDocblock

lib/Model/BotServer.php:69:2: InvalidDocblock: Intersection types must be all objects, Psalm\Type\Atomic\TTypeAlias provided in docblock for OCA\Talk\Model\BotServer::jsonSerialize (see https://psalm.dev/008)
return [
'id' => $this->getId(),
'name' => $this->getName(),
Expand Down
4 changes: 0 additions & 4 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
* url_hash: string,
* }
*
* @psalm-type TalkBotWithDetailsAndSecret = TalkBotWithDetails&array{
* secret: string,
* }
*
* @psalm-type TalkCallPeer = array{
* actorId: string,
* actorType: string,
Expand Down
18 changes: 0 additions & 18 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,6 @@
}
]
},
"BotWithDetailsAndSecret": {
"allOf": [
{
"$ref": "#/components/schemas/BotWithDetails"
},
{
"type": "object",
"required": [
"secret"
],
"properties": {
"secret": {
"type": "string"
}
}
}
]
},
"CallPeer": {
"type": "object",
"required": [
Expand Down
3 changes: 0 additions & 3 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1962,9 +1962,6 @@ export type components = {
url: string;
url_hash: string;
};
BotWithDetailsAndSecret: components["schemas"]["BotWithDetails"] & {
secret: string;
};
CallPeer: {
actorId: string;
actorType: string;
Expand Down
40 changes: 22 additions & 18 deletions vendor-bin/openapi-extractor/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading