API Platform version(s) affected: 2.5.8
Description
This commit add the serialization context parameter but it breaks serialization groups schema.
I think this due to
|
$serializerContext ?? $this->getSerializerContext($resourceMetadata, $type, $operationType, $operationName), |
: as
$serializerContext is not null,
$this->getSerializerContext($resourceMetadata, $type, $operationType, $operationName) is not call so serialization groups aren't set in serialization context and assert is false.
How to reproduce
Create an Entity with some properties not serialized and launch test on schema with one of assertMatchesResourceCollectionJsonSchema or assertMatchesResourceItemJsonSchema : the result will be false
API Platform version(s) affected: 2.5.8
Description
This commit add the serialization context parameter but it breaks serialization groups schema.
I think this due to
core/src/JsonSchema/SchemaFactory.php
Line 283 in ab474b6
$serializerContextis not null,$this->getSerializerContext($resourceMetadata, $type, $operationType, $operationName)is not call so serialization groups aren't set in serialization context and assert is false.How to reproduce
Create an Entity with some properties not serialized and launch test on schema with one of
assertMatchesResourceCollectionJsonSchemaorassertMatchesResourceItemJsonSchema: the result will be false