CoreFiles by mySites.guru
WithJsonSchemaInterface.php24 lines, 606 bytes, from wordpress-7.0-beta1.zip
Raw History Compare with 6.9-beta4
md5
c4b664ded3ac5ae5419cde8c4951f0e6
sha1
ba696552237d3ebf2b000f04870256e11e00f124
sha256
2b22fa57e034fcbbe7b4e2e5da539cdb4ff10020b8d721ac9b95200b601eb345
<?php

declare (strict_types=1);
namespace WordPress\AiClient\Common\Contracts;

/**
 * Interface for objects that can provide their JSON schema representation.
 *
 * This interface is implemented by DTOs to provide a consistent way to retrieve
 * their JSON schema for validation and serialization purposes.
 *
 * @since 0.1.0
 */
interface WithJsonSchemaInterface
{
    /**
     * Gets the JSON schema representation of the object.
     *
     * @since 0.1.0
     *
     * @return array<string, mixed> The JSON schema as an associative array.
     */
    public static function getJsonSchema(): array;
}

The same content is in 40 releases, WordPress 7.0-beta1 to 7.2-beta5. See them all, or every version of this file.