WordPress\AiClient\Providers\Models\DTO

RequiredOption::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

Method of the class: RequiredOption{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 0.1.0 Introduced.

RequiredOption::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_VALUE => ['oneOf' => [['type' => 'string'], ['type' => 'number'], ['type' => 'boolean'], ['type' => 'null'], ['type' => 'array'], ['type' => 'object']], 'description' => 'The value that the model must support for this option.']], 'required' => [self::KEY_NAME, self::KEY_VALUE]];
}