WordPress\AiClient\Providers\Models\DTO

SupportedOption::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

Method of the class: SupportedOption{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 0.1.0 Introduced.

SupportedOption::getJsonSchema() code WP 7.0

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_NAME => ['type' => 'string', 'enum' => OptionEnum::getValues(), 'description' => 'The option name.'], self::KEY_SUPPORTED_VALUES => ['type' => 'array', 'items' => ['oneOf' => [['type' => 'string'], ['type' => 'number'], ['type' => 'boolean'], ['type' => 'null'], ['type' => 'array'], ['type' => 'object']]], 'description' => 'The supported values for this option.']], 'required' => [self::KEY_NAME]];
}