From d6c6eb2a3bc0c9747d6f57d8f9d65673ba6b0628 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 18 Jan 2025 00:15:54 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.469.1 --- .speakeasy/gen.lock | 16 +--- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 ++-- README.md | 1 - RELEASES.md | 12 ++- .../Operations/GetCodeSamplesRequest.md | 10 --- .../Operations/GetCodeSamplesResponse.md | 11 --- docs/Models/Shared/UsageSnippet.md | 10 --- docs/Models/Shared/UsageSnippets.md | 8 -- docs/sdks/codesamples/README.md | 60 +-------------- src/CodeSamples.php | 74 ------------------- .../Operations/GetCodeSamplesRequest.php | 49 ------------ .../Operations/GetCodeSamplesResponse.php | 55 -------------- src/Models/Shared/UsageSnippet.php | 49 ------------ src/Models/Shared/UsageSnippets.php | 30 -------- src/SDKConfiguration.php | 4 +- 16 files changed, 26 insertions(+), 379 deletions(-) delete mode 100644 docs/Models/Operations/GetCodeSamplesRequest.md delete mode 100644 docs/Models/Operations/GetCodeSamplesResponse.md delete mode 100644 docs/Models/Shared/UsageSnippet.md delete mode 100644 docs/Models/Shared/UsageSnippets.md delete mode 100644 src/Models/Operations/GetCodeSamplesRequest.php delete mode 100644 src/Models/Operations/GetCodeSamplesResponse.php delete mode 100644 src/Models/Shared/UsageSnippet.php delete mode 100644 src/Models/Shared/UsageSnippets.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index abf3e00..dd68c17 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: db1bb4da-054f-485f-8c6e-d42db3f1da90 management: - docChecksum: 37a13cf25882217bb6883efc4407294c + docChecksum: 1766b7749df601fc084985fa6f54c7be docVersion: 0.4.0 - speakeasyVersion: 1.468.9 + speakeasyVersion: 1.469.1 generationVersion: 2.493.21 - releaseVersion: 0.47.3 - configChecksum: bc520ead5512b1ea5ef4febc93e25fec + releaseVersion: 0.47.4 + configChecksum: 9cad8f769c8cbe79b614bf09f1cfba00 repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php.git repoSubDirectory: . installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-php @@ -57,8 +57,6 @@ generatedFiles: - docs/Models/Operations/GetCodeSamplePreviewAsyncRequest.md - docs/Models/Operations/GetCodeSamplePreviewAsyncResponse.md - docs/Models/Operations/GetCodeSamplePreviewAsyncResponseBody.md - - docs/Models/Operations/GetCodeSamplesRequest.md - - docs/Models/Operations/GetCodeSamplesResponse.md - docs/Models/Operations/GetGitHubActionRequest.md - docs/Models/Operations/GetGitHubActionResponse.md - docs/Models/Operations/GetGithubSetupStateRequest.md @@ -209,8 +207,6 @@ generatedFiles: - docs/Models/Shared/Tag.md - docs/Models/Shared/TargetSDK.md - docs/Models/Shared/Type.md - - docs/Models/Shared/UsageSnippet.md - - docs/Models/Shared/UsageSnippets.md - docs/Models/Shared/User.md - docs/Models/Shared/V2Descriptor.md - docs/Models/Shared/WorkflowDocument.md @@ -292,8 +288,6 @@ generatedFiles: - src/Models/Operations/GetCodeSamplePreviewAsyncRequest.php - src/Models/Operations/GetCodeSamplePreviewAsyncResponse.php - src/Models/Operations/GetCodeSamplePreviewAsyncResponseBody.php - - src/Models/Operations/GetCodeSamplesRequest.php - - src/Models/Operations/GetCodeSamplesResponse.php - src/Models/Operations/GetGitHubActionRequest.php - src/Models/Operations/GetGitHubActionResponse.php - src/Models/Operations/GetGithubSetupStateRequest.php @@ -444,8 +438,6 @@ generatedFiles: - src/Models/Shared/Tag.php - src/Models/Shared/TargetSDK.php - src/Models/Shared/Type.php - - src/Models/Shared/UsageSnippet.php - - src/Models/Shared/UsageSnippets.php - src/Models/Shared/User.php - src/Models/Shared/V2Descriptor.php - src/Models/Shared/WorkflowDocument.php diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e0d8dc5..d4bcd21 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -11,7 +11,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false php: - version: 0.47.3 + version: 0.47.4 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b6912d3..9f30ebd 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.468.9 +speakeasyVersion: 1.469.1 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:adff4dce67bbafba451723e766dc2723ad6298ddb813f8814aee4dbcea37e56b - sourceBlobDigest: sha256:8f42a23c071ea4583fdaac6d8f79bd01e9162d8ac53fe951400456d9773591a3 + sourceRevisionDigest: sha256:245c341a08bc09b21b1faa96315a54e1ad8cca93fd683684acd29c790e18bd72 + sourceBlobDigest: sha256:89100d40a58b27e5294c921a7c698253b084d037635894f0a7c15ab40e224589 tags: - latest - - speakeasy-sdk-regen-1737072957 + - speakeasy-sdk-regen-1737159308 - 0.4.0 targets: php-target: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:adff4dce67bbafba451723e766dc2723ad6298ddb813f8814aee4dbcea37e56b - sourceBlobDigest: sha256:8f42a23c071ea4583fdaac6d8f79bd01e9162d8ac53fe951400456d9773591a3 + sourceRevisionDigest: sha256:245c341a08bc09b21b1faa96315a54e1ad8cca93fd683684acd29c790e18bd72 + sourceBlobDigest: sha256:89100d40a58b27e5294c921a7c698253b084d037635894f0a7c15ab40e224589 codeSamplesNamespace: my-source-php-code-samples - codeSamplesRevisionDigest: sha256:5b79fed584e76ea62444f318e6948260df6c07fa316d8a719c6db76931e66340 + codeSamplesRevisionDigest: sha256:91d4fb828486a3cb9f754ffc9732d6e5b4ffafc9c86290e08ae685fe0c55df69 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 752444e..f8ad81b 100755 --- a/README.md +++ b/README.md @@ -135,7 +135,6 @@ if ($response->statusCode === 200) { * [generateCodeSamplePreview](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters. * [generateCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. * [getCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation. -* [get](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets ### [events](docs/sdks/events/README.md) diff --git a/RELEASES.md b/RELEASES.md index b16cf19..bcef1e1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1584,4 +1584,14 @@ Based on: ### Generated - [php v0.47.3] . ### Releases -- [Composer v0.47.3] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.47.3 - . \ No newline at end of file +- [Composer v0.47.3] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.47.3 - . + +## 2025-01-18 00:14:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.469.1 (2.493.21) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.47.4] . +### Releases +- [Composer v0.47.4] https://packagist.org/packages/speakeasy-api/speakeasy-client-sdk-php#v0.47.4 - . \ No newline at end of file diff --git a/docs/Models/Operations/GetCodeSamplesRequest.md b/docs/Models/Operations/GetCodeSamplesRequest.md deleted file mode 100644 index 8008380..0000000 --- a/docs/Models/Operations/GetCodeSamplesRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetCodeSamplesRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `registryUrl` | *string* | :heavy_check_mark: | The registry URL from which to retrieve the snippets. | https://spec.speakeasy.com/my-org/my-workspace/my-source | -| `languages` | array<*string*> | :heavy_minus_sign: | The languages to retrieve snippets for. | | -| `operationIds` | array<*string*> | :heavy_minus_sign: | The operation IDs to retrieve snippets for. | getPetById | \ No newline at end of file diff --git a/docs/Models/Operations/GetCodeSamplesResponse.md b/docs/Models/Operations/GetCodeSamplesResponse.md deleted file mode 100644 index b37e253..0000000 --- a/docs/Models/Operations/GetCodeSamplesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetCodeSamplesResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `usageSnippets` | [?Shared\UsageSnippets](../../Models/Shared/UsageSnippets.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/Models/Shared/UsageSnippet.md b/docs/Models/Shared/UsageSnippet.md deleted file mode 100644 index 41858b9..0000000 --- a/docs/Models/Shared/UsageSnippet.md +++ /dev/null @@ -1,10 +0,0 @@ -# UsageSnippet - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `code` | *string* | :heavy_check_mark: | The code snippet | -| `language` | *string* | :heavy_check_mark: | The language of the snippet | -| `operationId` | *string* | :heavy_check_mark: | The operation ID for the snippet | \ No newline at end of file diff --git a/docs/Models/Shared/UsageSnippets.md b/docs/Models/Shared/UsageSnippets.md deleted file mode 100644 index 7827ff6..0000000 --- a/docs/Models/Shared/UsageSnippets.md +++ /dev/null @@ -1,8 +0,0 @@ -# UsageSnippets - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `snippets` | array<[Shared\UsageSnippet](../../Models/Shared/UsageSnippet.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/codesamples/README.md b/docs/sdks/codesamples/README.md index bfafe4a..f8ae070 100644 --- a/docs/sdks/codesamples/README.md +++ b/docs/sdks/codesamples/README.md @@ -10,7 +10,6 @@ REST APIs for retrieving Code Samples * [generateCodeSamplePreview](#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters. * [generateCodeSamplePreviewAsync](#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling. * [getCodeSamplePreviewAsync](#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation. -* [get](#get) - Retrieve usage snippets ## generateCodeSamplePreview @@ -179,61 +178,4 @@ if ($response->twoHundredApplicationJsonBytes !== null) { | Error Type | Status Code | Content Type | | ---------------- | ---------------- | ---------------- | | Errorors\Error | 4XX | application/json | -| Errorors\Error | 5XX | application/json | - -## get - -Retrieve usage snippets from an OpenAPI document stored in the registry. Supports filtering by language and operation ID. - - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Speakeasy\SpeakeasyClientSDK; -use Speakeasy\SpeakeasyClientSDK\Models\Operations; -use Speakeasy\SpeakeasyClientSDK\Models\Shared; - -$sdk = SpeakeasyClientSDK\SDK::builder() - ->setSecurity( - new Shared\Security( - apiKey: '', - ) - ) - ->build(); - -$request = new Operations\GetCodeSamplesRequest( - registryUrl: 'https://spec.speakeasy.com/my-org/my-workspace/my-source', - operationIds: [ - 'getPetById', - ], -); - -$response = $sdk->codeSamples->get( - request: $request -); - -if ($response->usageSnippets !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `$request` | [Operations\GetCodeSamplesRequest](../../Models/Operations/GetCodeSamplesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[?Operations\GetCodeSamplesResponse](../../Models/Operations/GetCodeSamplesResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------- | --------------------- | --------------------- | -| Errorors\Error | 4XX | application/json | -| Errorors\SDKException | 5XX | \*/\* | \ No newline at end of file +| Errorors\Error | 5XX | application/json | \ No newline at end of file diff --git a/src/CodeSamples.php b/src/CodeSamples.php index d33bc38..11bf0bc 100644 --- a/src/CodeSamples.php +++ b/src/CodeSamples.php @@ -323,78 +323,4 @@ public function getCodeSamplePreviewAsync(Operations\GetCodeSamplePreviewAsyncRe } } - /** - * Retrieve usage snippets - * - * Retrieve usage snippets from an OpenAPI document stored in the registry. Supports filtering by language and operation ID. - * - * - * @param Operations\GetCodeSamplesRequest $request - * @return Operations\GetCodeSamplesResponse - * @throws \Speakeasy\SpeakeasyClientSDK\Models\Errorors\SDKException - */ - public function get(Operations\GetCodeSamplesRequest $request, ?Options $options = null): Operations\GetCodeSamplesResponse - { - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/v1/code_sample'); - $urlOverride = null; - $httpOptions = ['http_errors' => false]; - - $qp = Utils\Utils::getQueryParams(Operations\GetCodeSamplesRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); - $httpOptions['headers']['Accept'] = 'application/json'; - $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - $hookContext = new HookContext('getCodeSamples', null, $this->sdkConfiguration->securitySource); - $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); - $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); - $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); - $httpRequest = Utils\Utils::removeHeaders($httpRequest); - try { - $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); - } catch (\GuzzleHttp\Exception\GuzzleException $error) { - $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - $httpResponse = $res; - } - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - $httpResponse = $res; - } - if ($statusCode >= 200 && $statusCode < 300) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); - - $serializer = Utils\JSON::createSerializer(); - $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Shared\UsageSnippets', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\GetCodeSamplesResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - usageSnippets: $obj); - - return $response; - } else { - throw new \Speakeasy\SpeakeasyClientSDK\Models\Errorors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); - - $serializer = Utils\JSON::createSerializer(); - $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, '\Speakeasy\SpeakeasyClientSDK\Models\Errorors\Error', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Speakeasy\SpeakeasyClientSDK\Models\Errorors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 500 && $statusCode < 600) { - throw new \Speakeasy\SpeakeasyClientSDK\Models\Errorors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Speakeasy\SpeakeasyClientSDK\Models\Errorors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - } \ No newline at end of file diff --git a/src/Models/Operations/GetCodeSamplesRequest.php b/src/Models/Operations/GetCodeSamplesRequest.php deleted file mode 100644 index 4a5844c..0000000 --- a/src/Models/Operations/GetCodeSamplesRequest.php +++ /dev/null @@ -1,49 +0,0 @@ - $languages - */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=languages')] - public ?array $languages = null; - - /** - * The operation IDs to retrieve snippets for. - * - * @var ?array $operationIds - */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=operation_ids')] - public ?array $operationIds = null; - - /** - * @param string $registryUrl - * @param ?array $languages - * @param ?array $operationIds - */ - public function __construct(string $registryUrl, ?array $languages = null, ?array $operationIds = null) - { - $this->registryUrl = $registryUrl; - $this->languages = $languages; - $this->operationIds = $operationIds; - } -} \ No newline at end of file diff --git a/src/Models/Operations/GetCodeSamplesResponse.php b/src/Models/Operations/GetCodeSamplesResponse.php deleted file mode 100644 index f92ad00..0000000 --- a/src/Models/Operations/GetCodeSamplesResponse.php +++ /dev/null @@ -1,55 +0,0 @@ -contentType = $contentType; - $this->statusCode = $statusCode; - $this->rawResponse = $rawResponse; - $this->usageSnippets = $usageSnippets; - } -} \ No newline at end of file diff --git a/src/Models/Shared/UsageSnippet.php b/src/Models/Shared/UsageSnippet.php deleted file mode 100644 index 9e9cc50..0000000 --- a/src/Models/Shared/UsageSnippet.php +++ /dev/null @@ -1,49 +0,0 @@ -code = $code; - $this->language = $language; - $this->operationId = $operationId; - } -} \ No newline at end of file diff --git a/src/Models/Shared/UsageSnippets.php b/src/Models/Shared/UsageSnippets.php deleted file mode 100644 index 4f5dc0f..0000000 --- a/src/Models/Shared/UsageSnippets.php +++ /dev/null @@ -1,30 +0,0 @@ - $snippets - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('snippets')] - #[\Speakeasy\Serializer\Annotation\Type('array<\Speakeasy\SpeakeasyClientSDK\Models\Shared\UsageSnippet>')] - public array $snippets; - - /** - * @param array $snippets - */ - public function __construct(array $snippets) - { - $this->snippets = $snippets; - } -} \ No newline at end of file diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index b699566..3afbae1 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -26,11 +26,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.4.0'; - public string $sdkVersion = '0.47.3'; + public string $sdkVersion = '0.47.4'; public string $genVersion = '2.493.21'; - public string $userAgent = 'speakeasy-sdk/php 0.47.3 2.493.21 0.4.0 speakeasy-api/speakeasy-client-sdk-php'; + public string $userAgent = 'speakeasy-sdk/php 0.47.4 2.493.21 0.4.0 speakeasy-api/speakeasy-client-sdk-php'; /** @var array>> */ public ?array $globals = [ 'parameters' => [],