Skip to content

Commit e0fc35f

Browse files
authored
Merge pull request #11 from netgen/PROSTORIA-534-adjust-matrix-field-schema
Prostoria 534 adjust matrix field schema
2 parents 0144f31 + e8e0d5c commit e0fc35f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^8.2",
14-
"netgen/openapi": "^1.0",
14+
"netgen/openapi": "^1.0.2",
1515
"netgen/layouts-core": "^1.4.11",
1616
"netgen/layouts-ibexa": "^1.4",
1717
"netgen/ibexa-site-api": "^6.2"

lib/OpenApi/SchemaProvider/Ibexa/FieldValue/MatrixFieldValueSchemaProvider.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ public function provideFieldValueSchema(): Schema
1212
{
1313
return new Schema\ArraySchema(
1414
new Schema\ObjectSchema(
15-
[
16-
'type' => new Schema\StringSchema(),
17-
'value' => new Schema\StringSchema(),
18-
],
1915
null,
20-
['type', 'value'],
16+
null,
17+
null,
18+
null,
19+
new Schema\StringSchema(),
2120
),
2221
);
2322
}

lib/OpenApi/SchemaProvider/Ibexa/FieldValue/RemoteMediaFieldValueSchemaProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function provideFieldValueSchema(): Schema
2727
'altText' => new Schema\OneOfSchema([new Schema\StringSchema(), new Schema\NullSchema()]),
2828
'caption' => new Schema\OneOfSchema([new Schema\StringSchema(), new Schema\NullSchema()]),
2929
'tags' => new Schema\ArraySchema(new Schema\StringSchema()),
30-
'metadata' => new Schema\OneOfSchema([new Schema\ObjectSchema(), new Schema\NullSchema()]),
30+
'metadata' => new Schema\OneOfSchema([new Schema\ObjectSchema(null, null, null, null, true), new Schema\NullSchema()]),
3131
'context' => new Schema\OneOfSchema([new Schema\ObjectSchema(), new Schema\NullSchema()]),
3232
'locationId' => new Schema\OneOfSchema([new Schema\IntegerSchema(), new Schema\NullSchema()]),
3333
'locationSource' => new Schema\OneOfSchema([new Schema\StringSchema(), new Schema\NullSchema()]),

0 commit comments

Comments
 (0)