WordPress\AiClient\Providers\DTO
ProviderMetadata::getJsonSchema
{@inheritDoc}
Method of the class: ProviderMetadata{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = ProviderMetadata::getJsonSchema(): array;
Changelog
| Since 0.1.0 | Introduced. |
| Since 1.2.0 | Added description to schema. |
| Since 1.3.0 | Added logoPath to schema. |
ProviderMetadata::getJsonSchema() ProviderMetadata::getJsonSchema code WP 7.0
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]];
}