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

fix(deps): bump nextcloud/openapi-extractor from 1.0.1 to ^1.4.0 (main) #10624

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ tests/.phpunit.result.cache

# PhpStorm
.idea

# OpenAPI specs
/openapi.json
2 changes: 1 addition & 1 deletion lib/Controller/AccountApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/**
* List all email accounts and their aliases of the user which is currently logged-in
*
* @return DataResponse<Http::STATUS_OK, MailAccountListResponse[], array{}>|DataResponse<Http::STATUS_NOT_FOUND, array{}, array{}>
* @return DataResponse<Http::STATUS_OK, list<MailAccountListResponse>, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array{}, array{}>

Check failure on line 42 in lib/Controller/AccountApiController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

MoreSpecificReturnType

lib/Controller/AccountApiController.php:42:13: MoreSpecificReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200|404, list<array{aliases: list<array{email: string, id: int, name: null|string}>, email: string, id: int}>, array<never, never>>' for OCA\Mail\Controller\AccountApiController::list is more specific than the inferred return type 'OCP\AppFramework\Http\DataResponse<200|404, array<array-key, array{aliases: array<array-key, array{email: string, id: int, name: null|string}>, email: string, id: int}>, array<never, never>>' (see https://psalm.dev/070)
*
* 200: Account list
* 404: User was not logged in
Expand All @@ -54,7 +54,7 @@
}

$accounts = $this->accountService->findByUserId($userId);
return new DataResponse(array_map(function (Account $account) use ($userId) {

Check failure on line 57 in lib/Controller/AccountApiController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

LessSpecificReturnStatement

lib/Controller/AccountApiController.php:57:10: LessSpecificReturnStatement: The type 'OCP\AppFramework\Http\DataResponse<200, array<array-key, array{aliases: array<array-key, array{email: string, id: int, name: null|string}>, email: string, id: int}>, array<never, never>>' is more general than the declared return type 'OCP\AppFramework\Http\DataResponse<200|404, list<array{aliases: list<array{email: string, id: int, name: null|string}>, email: string, id: int}>, array<never, never>>' for OCA\Mail\Controller\AccountApiController::list (see https://psalm.dev/129)
$aliases = $this->aliasesService->findAll($account->getId(), $userId);
return [
'id' => $account->getId(),
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/MessageApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function __construct(
* @param string $body The message body
* @param bool $isHtml If the message body contains HTML
* @param list<array{ label?: string, email: string}> $to An array of "To" recipients in the format ['label' => 'Name', 'email' => 'Email Address'] or ['email' => 'Email Address']
* @param array<empty>|list<array{ label?: string, email: string}> $cc An optional array of 'CC' recipients in the format ['label' => 'Name', 'email' => 'Email Address'] or ['email' => 'Email Address']
* @param array<empty>|list<array{ label?: string, email: string}> $bcc An optional array of 'BCC' recipients in the format ['label' => 'Name', 'email' => 'Email Address'] or ['email' => 'Email Address']
* @param list<empty>|list<array{ label?: string, email: string}> $cc An optional array of 'CC' recipients in the format ['label' => 'Name', 'email' => 'Email Address'] or ['email' => 'Email Address']
* @param list<empty>|list<array{ label?: string, email: string}> $bcc An optional array of 'BCC' recipients in the format ['label' => 'Name', 'email' => 'Email Address'] or ['email' => 'Email Address']
* @param ?string $references An optional string of an RFC2392 "message-id" to set the "Reply-To" and "References" header on sending
* @return DataResponse<Http::STATUS_OK|Http::STATUS_ACCEPTED|Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND|Http::STATUS_INTERNAL_SERVER_ERROR, string, array{}>
*
Expand Down
4 changes: 2 additions & 2 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
* @psalm-type MailAccountListResponse = array{
* id: int,
* email: string,
* aliases: array{
* aliases: list<array{
* id: int,
* email: string,
* name: ?string,
* }[]
* }>
* }
*/
class ResponseDefinitions {
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/openapi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"sort-packages": true
},
"require": {
"nextcloud/openapi-extractor": "^1.0.1"
"nextcloud/openapi-extractor": "^1.4.0"
}
}
48 changes: 26 additions & 22 deletions vendor-bin/openapi/composer.lock

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

Loading