Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 4212446

Browse files
committed
fix(RequestBuilder): custom case ApiClients at AnnotationGenerator
1 parent 7b1643e commit 4212446

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Core/Builder/Request/ApiClientRequestBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function create(ApiClientDraft $apiClientDraft)
4141
*/
4242
public function delete(ApiClient $apiClient)
4343
{
44-
$request = ApiClientDeleteRequest::ofIdAndVersion($apiClient->getId(), $apiClient->getVersion());
44+
$request = ApiClientDeleteRequest::ofId($apiClient->getId());
4545
return $request;
4646
}
4747

src/Core/Helper/Annotate/AnnotationGenerator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@ function ($link) {
684684
if ($domain == 'Project') {
685685
$factoryCall = 'ofVersion($' . lcfirst($singularDomain) . '->getVersion());';
686686
}
687+
if ($domain == 'ApiClients') {
688+
$factoryCall = 'ofId($' . lcfirst($singularDomain) . '->getId());';
689+
}
687690
break;
688691
case 'import':
689692
$uses[ImportOrder::class] = 'use ' . ImportOrder::class . ';';

0 commit comments

Comments
 (0)