-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTypeFactoryInterface.php
More file actions
29 lines (24 loc) · 896 Bytes
/
TypeFactoryInterface.php
File metadata and controls
29 lines (24 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\JsonSchema;
use Symfony\Component\PropertyInfo\Type;
/**
* Factory for creating the JSON Schema document which specifies the data type corresponding to a PHP type.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
interface TypeFactoryInterface
{
/**
* Gets the JSON Schema document which specifies the data type corresponding to the given PHP type, and recursively adds needed new schema to the current schema if provided.
*/
public function getType(Type $type, string $format = 'json', ?bool $readableLink = null, ?array $serializerContext = null, ?Schema $schema = null): array;
}