From b709843990970dde9956af11ae5c6f124cafcf9d Mon Sep 17 00:00:00 2001 From: bjorn <bjorn@swis.nl> Date: Wed, 6 Sep 2023 16:16:41 +0200 Subject: [PATCH] Issue #3232279 by luuph, acbramley, budalokko, osopolar, bbrala, shadcn, dgsiegel, zhezhangrandy, floWweb, ptmkenny, gueguerreiro, Rene Bakx, dmitry.korkhau: Invalid output JSON schema in UrlLinkEnhancer --- .../jsonapi/FieldEnhancer/UrlLinkEnhancer.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php b/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php index 5796663..0cf8ba5 100644 --- a/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php +++ b/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php @@ -141,8 +141,18 @@ class UrlLinkEnhancer extends ResourceFieldEnhancerBase implements ContainerFact 'type' => 'object', 'properties' => [ 'uri' => ['type' => 'string'], - 'title' => ['type' => 'string'], - 'options' => ['type' => 'array'], + 'title' => [ + 'anyOf' => [ + ['type' => 'null'], + ['type' => 'string'], + ], + ], + 'options' => [ + 'anyOf' => [ + ['type' => 'array'], + ['type' => 'object'], + ], + ], 'url' => ['type' => 'string'], ], ]; -- GitLab