Skip to content

Commit cee198b

Browse files
committed
fix(jsonschema): embedded json schema
1 parent e3f0e4f commit cee198b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/Hal/JsonSchema/SchemaFactory.php

+10-4
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,17 @@ public function buildSchema(string $className, string $format = 'jsonhal', strin
7878
$schema['type'] = 'object';
7979
$schema['properties'] = [
8080
'_embedded' => [
81-
'properties' => [
82-
'items' => [
83-
'type' => 'array',
84-
'items' => $items,
81+
'anyOf' => [
82+
[
83+
'type' => 'object',
84+
'properties' => [
85+
'item' => [
86+
'type' => 'array',
87+
'items' => $items,
88+
],
89+
],
8590
],
91+
['type' => 'object']
8692
],
8793
],
8894
'totalItems' => [

0 commit comments

Comments
 (0)