|
20 | 20 | use ApiPlatform\Core\JsonSchema\SchemaFactoryInterface;
|
21 | 21 | use PHPUnit\Framework\ExpectationFailedException;
|
22 | 22 | use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
23 |
| -use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; |
24 | 23 | use Symfony\Contracts\HttpClient\ResponseInterface;
|
25 | 24 |
|
26 | 25 | /**
|
@@ -112,14 +111,14 @@ public static function assertMatchesJsonSchema($jsonSchema, ?int $checkMode = nu
|
112 | 111 |
|
113 | 112 | public static function assertMatchesResourceCollectionJsonSchema(string $resourceClass, ?string $operationName = null, string $format = 'jsonld'): void
|
114 | 113 | {
|
115 |
| - $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::COLLECTION, $operationName, null, [AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false]); |
| 114 | + $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::COLLECTION, $operationName, null); |
116 | 115 |
|
117 | 116 | static::assertMatchesJsonSchema($schema->getArrayCopy());
|
118 | 117 | }
|
119 | 118 |
|
120 | 119 | public static function assertMatchesResourceItemJsonSchema(string $resourceClass, ?string $operationName = null, string $format = 'jsonld'): void
|
121 | 120 | {
|
122 |
| - $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::ITEM, $operationName, null, [AbstractNormalizer::ALLOW_EXTRA_ATTRIBUTES => false]); |
| 121 | + $schema = self::getSchemaFactory()->buildSchema($resourceClass, $format, Schema::TYPE_OUTPUT, OperationType::ITEM, $operationName, null); |
123 | 122 |
|
124 | 123 | static::assertMatchesJsonSchema($schema->getArrayCopy());
|
125 | 124 | }
|
|
0 commit comments