Skip to content

Commit 2624d50

Browse files
WyriHaximusgithub-actions[bot]
authored andcommitted
[GitHubEnterprise-3.13] Update to 1.1.4-446a3cd1fdbd8dda94d848b89bd8f6e2 from 1.1.4-398d18348d48e9783363f49ed8fadd49
Detected Schema changes: ``` ├─┬Paths │ └─┬/orgs/{org}/memberships/{username} │ └─┬PUT │ └──[🔀] description (12859:20) └─┬Components └─┬integration └─┬owner ├──[➕] anyOf (66758:13) ├──[➕] anyOf (65758:7) ├──[➖] oneOf (66732:7)❌ └──[➖] oneOf (65757:7)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | components | 4 | 2 | | paths | 1 | 0 | Date: 01/17/25 | Commit: New: etc/specs/GitHubEnterprise-3.13/previous.spec.yaml, Original: etc/specs/GitHubEnterprise-3.13/current.spec.yaml - ❌ **BREAKING Changes**: _2_ out of _5_ - **Modifications**: _1_ - **Removals**: _2_ - **Additions**: _2_ - **Breaking Removals**: _2_ ERROR: breaking changes discovered
1 parent c6acc34 commit 2624d50

File tree

104 files changed

+14707
-8603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+14707
-8603
lines changed

clients/GitHubEnterprise-3.13/etc/openapi-client-generator.state

Lines changed: 110 additions & 106 deletions
Large diffs are not rendered by default.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubEnterprise\Internal\Attribute\CastUnionToType\Schema\Integration;
6+
7+
use ApiClients\Client\GitHubEnterprise\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Owner implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'avatar_url|email|events_url|followers_url|following_url|gists_url|gravatar_id|html_url|id|login|name|node_id|organizations_url|received_events_url|repos_url|site_admin|starred_at|starred_url|subscriptions_url|type|url|user_view_type') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SimpleUser::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'avatar_url|created_at|description|html_url|id|name|node_id|slug|updated_at|website_url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\Enterprise::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}

0 commit comments

Comments
 (0)