diff --git a/src/Hydra/JsonSchema/SchemaFactory.php b/src/Hydra/JsonSchema/SchemaFactory.php index 41e68fdd348..d5a5feb079e 100644 --- a/src/Hydra/JsonSchema/SchemaFactory.php +++ b/src/Hydra/JsonSchema/SchemaFactory.php @@ -121,7 +121,10 @@ public function buildSchema(string $className, string $format = 'jsonld', string 'properties' => [ '@type' => ['type' => 'string'], 'variable' => ['type' => 'string'], - 'property' => ['type' => 'string'], + 'property' => [ + 'nullable' => true, + 'anyOf' => [['type' => 'string'], ['type' => 'null']], + ], 'required' => ['type' => 'boolean'], ], ],