Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Sep 29, 2024
1 parent 8296f3f commit 42e4415
Show file tree
Hide file tree
Showing 24 changed files with 1,175 additions and 1,212 deletions.
14 changes: 8 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: db1bb4da-054f-485f-8c6e-d42db3f1da90
management:
docChecksum: e29727191626d67f4c4c017fc13758fa
docChecksum: d2e02fd58297f0f2d76a05242f33ed33
docVersion: 0.4.0 .
speakeasyVersion: 1.403.3
generationVersion: 2.424.0
releaseVersion: 0.42.0
configChecksum: ca646b0a6941f3c2763ad88c171b3edd
speakeasyVersion: 1.404.5
generationVersion: 2.426.2
releaseVersion: 0.42.1
configChecksum: 15c2033ee57093e6c08e56a840712a3a
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php
published: true
features:
php:
core: 3.4.7
core: 3.4.8
deprecations: 2.81.1
examples: 2.81.3
globalSecurity: 2.81.7
Expand Down Expand Up @@ -1466,6 +1466,7 @@ examples:
responses:
4XX:
application/json: {"message": "<value>", "status_code": 670562}
2XX: {}
githubConfigureCodeSamples:
speakeasy-default-github-configure-code-samples:
requestBody:
Expand Down Expand Up @@ -1498,6 +1499,7 @@ examples:
responses:
4XX:
application/json: {"message": "<value>", "status_code": 252330}
2XX: {}
githubTriggerAction:
speakeasy-default-github-trigger-action:
requestBody:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
php:
version: 0.42.0
version: 0.42.1
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
imports:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.403.3
speakeasyVersion: 1.404.5
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:48f9a0b94f30dfaea17712ec077ca3071e29ac93f2db8663938d17eaa011a800
sourceBlobDigest: sha256:818f8ae440499921534f8a99ba574fb42c935ca8e70152292414b8866a845036
sourceRevisionDigest: sha256:416f962ec6e0e2064b4df1ac006fe74e068b8eb82743a687ee64ab6772ffb086
sourceBlobDigest: sha256:3a8dfb49ff3071b9dd0ce7f14bad505ea3071922eeaa6ca26709873cbd61738d
tags:
- latest
- main
targets:
php-target:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:48f9a0b94f30dfaea17712ec077ca3071e29ac93f2db8663938d17eaa011a800
sourceBlobDigest: sha256:818f8ae440499921534f8a99ba574fb42c935ca8e70152292414b8866a845036
sourceRevisionDigest: sha256:416f962ec6e0e2064b4df1ac006fe74e068b8eb82743a687ee64ab6772ffb086
sourceBlobDigest: sha256:3a8dfb49ff3071b9dd0ce7f14bad505ea3071922eeaa6ca26709873cbd61738d
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
80 changes: 70 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@ $security = new Shared\Security(
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\GetApisRequest();
$response = $sdk.apis->getApis(
request: $request
);

if ($response->apis !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
$request = new Operations\GetApisRequest();

$response = $sdk->apis->getApis(
request: $request
);

if ($response->apis !== null) {
// handle response
}
```
<!-- End SDK Example Usage [usage] -->
Expand Down Expand Up @@ -184,6 +182,67 @@ try {



<!-- Start Error Handling [errors] -->
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a `Errorors\SDKException` exception, which has the following properties:

| Property | Type | Description |
|----------------|-----------------------------------------|-----------------------|
| `$message` | *string* | The error message |
| `$statusCode` | *int* | The HTTP status code |
| `$rawResponse` | *?\Psr\Http\Message\ResponseInterface* | The raw HTTP response |
| `$body` | *string* | The response content |

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `deleteApi` method throws the following exceptions:

| Error Object | Status Code | Content Type |
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
| Errorors\Error | 4XX | application/json |
| Speakeasy\SpeakeasyClientSDK\Models\Errorors.SDKException | 4xx-5xx | */* |

### Example

```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

try {
$request = new Operations\DeleteApiRequest(
apiID: '<id>',
versionID: '<id>',
);

$response = $sdk->apis->deleteApi(
request: $request
);

if ($response->statusCode === 200) {
// handle response
}
} catch (Errorors\ErrorThrowable $e) {
// handle $e->$container data
throw $e;
} catch (Errorors\SDKException $e) {
// handle default exception
throw $e;
}
```
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

Expand Down Expand Up @@ -218,6 +277,7 @@ For more information about the API: [The Speakeasy Platform Documentation](/docs
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
<!-- End Table of Contents [toc] -->

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1284,4 +1284,14 @@ Based on:
### Generated
- [php v0.42.0] .
### Releases
- [Composer v0.42.0] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.42.0 - .
- [Composer v0.42.0] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.42.0 - .

## 2024-09-29 00:17:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.404.5 (2.426.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v0.42.1] .
### Releases
- [Composer v0.42.1] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.42.1 - .
18 changes: 8 additions & 10 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ $security = new Shared\Security(
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
try {
$request = new Operations\GetApisRequest();
$response = $sdk.apis->getApis(
request: $request
);

if ($response->apis !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
$request = new Operations\GetApisRequest();

$response = $sdk->apis->getApis(
request: $request
);

if ($response->apis !== null) {
// handle response
}
```
<!-- End SDK Example Usage [usage] -->
4 changes: 4 additions & 0 deletions docs/Models/Shared/TargetSDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
| `gitUserEmail` | *?string* | :heavy_minus_sign: | User email from git configuration. |
| `gitUserName` | *?string* | :heavy_minus_sign: | User's name from git configuration. (not GitHub username) |
| `hostname` | *?string* | :heavy_minus_sign: | Remote hostname. |
| `publishPackageName` | *?string* | :heavy_minus_sign: | Name of the published package. |
| `publishPackageRegistryName` | *?string* | :heavy_minus_sign: | Name of the registry where the package was published. |
| `publishPackageUrl` | *?string* | :heavy_minus_sign: | URL of the published package. |
| `publishPackageVersion` | *?string* | :heavy_minus_sign: | Version of the published package. |
| `repoLabel` | *?string* | :heavy_minus_sign: | Label of the git repository. |
| `sourceBlobDigest` | *?string* | :heavy_minus_sign: | The blob digest of the source. |
| `sourceNamespaceName` | *?string* | :heavy_minus_sign: | The namespace name of the source. |
Expand Down
Loading

0 comments on commit 42e4415

Please sign in to comment.