WordPress\AiClient\Providers\DTO

ProviderMetadata::getJsonSchema │ public static │ WP 0.1.0

{@inheritDoc}

Метод класса: ProviderMetadata{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = ProviderMetadata::getJsonSchema(): array;

Список изменений

С версии 0.1.0 Введена.
С версии 1.2.0 Added description to schema.
С версии 1.3.0 Added logoPath to schema.

Код ProviderMetadata::getJsonSchema() WP 7.1.4

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_ID => ['type' => 'string', 'description' => 'The provider\'s unique identifier.'], self::KEY_NAME => ['type' => 'string', 'description' => 'The provider\'s display name.'], self::KEY_DESCRIPTION => ['type' => 'string', 'description' => 'The provider\'s description.'], self::KEY_TYPE => ['type' => 'string', 'enum' => ProviderTypeEnum::getValues(), 'description' => 'The provider type (cloud, server, or client).'], self::KEY_CREDENTIALS_URL => ['type' => 'string', 'description' => 'The URL where users can get credentials.'], self::KEY_AUTHENTICATION_METHOD => ['type' => ['string', 'null'], 'enum' => array_merge(RequestAuthenticationMethod::getValues(), [null]), 'description' => 'The authentication method.'], self::KEY_LOGO_PATH => ['type' => 'string', 'description' => 'The full path to the provider\'s logo image file.']], 'required' => [self::KEY_ID, self::KEY_NAME, self::KEY_TYPE]];
}