Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc v2.1.0-beta.1, Speakeasy CLI 1.397.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Sep 16, 2024
1 parent bf6cc27 commit be12f07
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 0b9e0548-6a63-426d-aa19-95795ea55543
management:
docChecksum: bb72b9e5f65512abfc137f36f5e4fd02
docVersion: v2.1.0-beta.1
speakeasyVersion: 1.396.6
generationVersion: 2.415.6
releaseVersion: 2.4.3
configChecksum: 221f5b331bd74c2fff718348be503491
speakeasyVersion: 1.397.2
generationVersion: 2.415.8
releaseVersion: 2.4.4
configChecksum: 5adfaeec7fb402586c121cc62fabd10a
repoURL: https://github.com/formancehq/formance-sdk-php.git
repoSubDirectory: .
installationURL: https://github.com/formancehq/formance-sdk-php
Expand All @@ -24,7 +24,7 @@ features:
nameOverrides: 2.81.2
nullables: 1.0.0
responseFormat: 0.1.0
unions: 0.1.1
unions: 0.1.2
generatedFiles:
- .gitattributes
- CONTRIBUTING.md
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,14 @@ Based on:
### Generated
- [php v2.4.3] .
### Releases
- [Composer v2.4.3] https://packagist.org/packages/formance/formance-sdk#v2.4.3 - .
- [Composer v2.4.3] https://packagist.org/packages/formance/formance-sdk#v2.4.3 - .

## 2024-09-16 16:06:18
### Changes
Based on:
- OpenAPI Doc v2.1.0-beta.1
- Speakeasy CLI 1.397.2 (2.415.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v2.4.4] .
### Releases
- [Composer v2.4.4] https://packagist.org/packages/formance/formance-sdk#v2.4.4 - .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
comments: {}
telemetryEnabled: false
php:
version: 2.4.3
version: 2.4.4
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
imports:
Expand Down
6 changes: 3 additions & 3 deletions src/SDKConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class SDKConfiguration

public string $openapiDocVersion = 'v2.1.0-beta.1';

public string $sdkVersion = '2.4.3';
public string $sdkVersion = '2.4.4';

public string $genVersion = '2.415.6';
public string $genVersion = '2.415.8';

public string $userAgent = 'speakeasy-sdk/php 2.4.3 2.415.6 v2.1.0-beta.1 formance/formance-sdk';
public string $userAgent = 'speakeasy-sdk/php 2.4.4 2.415.8 v2.1.0-beta.1 formance/formance-sdk';

public function getServerUrl(): string
{
Expand Down
28 changes: 21 additions & 7 deletions src/Utils/UnionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,26 @@ public function serializeUnion(
return $this->matchSimpleType($data, $type, $context);
} else {
if (is_array($data)) {
$innerType = gettype($data[0]);
if ($innerType === 'object') {
$innerType = get_class($data[0]);
if (array_is_list($data) && ! empty($data)) {
$innerType = gettype($data[0]);
if ($innerType === 'object') {
$innerType = get_class($data[0]);
}
$resolvedType = [
'name' => 'array',
'params' => ['name' => $innerType, 'params' => []],
];
} else {
$keyType = gettype(array_key_first($data));
$valueType = gettype($data[array_key_first($data)]);
$resolvedType = [
'name' => 'array',
'params' => [
['name' => $keyType, 'params' => []],
['name' => $valueType, 'params' => []],
],
];
}
$resolvedType = [
'name' => 'array',
'params' => ['name' => $innerType, 'params' => []],
];
} else {
$resolvedType = null;
foreach ($type['params'] as $possibleType) {
Expand Down Expand Up @@ -176,6 +188,8 @@ public function deserializeUnion(DeserializationVisitorInterface $visitor, mixed
continue;
} catch (NonFloatCastableTypeException $e) {
continue;
} catch (RuntimeException $e) {
continue;
}
}

Expand Down

0 comments on commit be12f07

Please sign in to comment.