WordPress\AiClient\Providers\Models\DTO

RequiredOption::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

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

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

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

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

С версии 0.1.0 Введена.

Код RequiredOption::getJsonSchema() 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]];
}