-
Notifications
You must be signed in to change notification settings - Fork 7
/
SwaggerNormalizerInterface.php
35 lines (29 loc) · 1012 Bytes
/
SwaggerNormalizerInterface.php
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
30
31
32
33
34
35
<?php
declare(strict_types=1);
/*
* This file is part of the SwaggerResolverBundle package.
*
* (c) Viktor Linkin <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Linkin\Bundle\SwaggerResolverBundle\Normalizer;
use EXSyst\Component\Swagger\Schema;
/**
* @author Viktor Linkin <[email protected]>
*/
interface SwaggerNormalizerInterface
{
/**
* Check is this normalizer supports received property.
*/
public function supports(Schema $propertySchema, string $propertyName, bool $isRequired, array $context = []): bool;
/**
* TODO: normalizer should not throw an error - better return value as is.
* https://github.com/adrenalinkin/swagger-resolver-bundle/issues/57.
*
* Returns closure for normalizing property
*/
public function getNormalizer(Schema $propertySchema, string $propertyName, bool $isRequired): \Closure;
}