Skip to content

Latest commit

 

History

History
116 lines (81 loc) · 5.02 KB

File metadata and controls

116 lines (81 loc) · 5.02 KB

SchemaStore

(schemaStore)

Overview

Available Operations

createSchemaStoreItem

Create a schema in the schema store

Example Usage

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: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\CreateSchemaStoreItemRequestBody(
    format: Operations\Format::Yaml,
    packageName: '<value>',
    sdkClassname: '<value>',
    spec: '<value>',
);

$response = $sdk->schemaStore->createSchemaStoreItem(
    request: $request
);

if ($response->schemaStoreItem !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\CreateSchemaStoreItemRequestBody ✔️ The request object to use for the request.

Response

?Operations\CreateSchemaStoreItemResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKExceptioon 5XX */*

getSchemaStoreItem

Get a OAS schema from the schema store

Example Usage

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: '<YOUR_API_KEY_HERE>',
        )
    )
    ->build();

$request = new Operations\GetSchemaStoreItemRequestBody();

$response = $sdk->schemaStore->getSchemaStoreItem(
    request: $request
);

if ($response->schemaStoreItem !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GetSchemaStoreItemRequestBody ✔️ The request object to use for the request.

Response

?Operations\GetSchemaStoreItemResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKExceptioon 5XX */*