When using the Umami demo profile, calling the JSON:API Schema endpoint for the article content type
(/jsonapi/node/article/resource/schema) triggers a PHP TypeError in the
ComplexDataDefinitionNormalizer class of the jsonapi_schema module.
The error indicates that the normalize() method is returning a stdClass object instead of one of
the expected types (ArrayObject, array, string, int,
float, bool, or null).
This prevents the schema from being correctly generated and makes it impossible to retrieve the JSON:API schema definition for the article resource in Umami.
jsonapi and jsonapi_schema modules./jsonapi/node/article/resource/schema.TypeError: Drupal\jsonapi_schema\Normalizer\ComplexDataDefinitionNormalizer::normalize(): Return value must be of type ArrayObject|array|string|int|float|bool|null, stdClass returned in Drupal\jsonapi_schema\Normalizer\ComplexDataDefinitionNormalizer->normalize() (line 51 of modules/contrib/jsonapi_schema/src/Normalizer/ComplexDataDefinitionNormalizer.php)
Ensure that ComplexDataDefinitionNormalizer::normalize() consistently returns one of the allowed data types.
This may involve:
stdClass results to arrays or ArrayObject instances.stdClass outputs.stdClass object originates from in the normalization process.jsonapi_schema project.None. This issue affects the backend JSON:API schema generation only.
No API changes are expected, but the normalization process should be corrected to comply with the declared return types.
None. This issue is limited to schema serialization and does not modify any stored data or entity definitions.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.