function SchematicNormalizerFallbackTrait::generateNoSchemaAvailableMessage

3 calls to SchematicNormalizerFallbackTrait::generateNoSchemaAvailableMessage()
JsonSchemaProviderSerializerTrait::getJsonSchema in core/modules/serialization/src/Serializer/JsonSchemaProviderSerializerTrait.php
SchematicNormalizerTrait::getNormalizationSchema in core/modules/serialization/src/Normalizer/SchematicNormalizerTrait.php
Retrieve JSON Schema for the normalization.
TypedDataNormalizer::getNormalizationSchema in core/modules/serialization/src/Normalizer/TypedDataNormalizer.php
Retrieve JSON Schema for the normalization.

File

core/modules/serialization/src/Normalizer/SchematicNormalizerFallbackTrait.php, line 12

Class

SchematicNormalizerFallbackTrait
Trait for generating helpful schema-generation fallback messages.

Namespace

Drupal\serialization\Normalizer

Code

public static function generateNoSchemaAvailableMessage(mixed $object) : string {
    $baseMessage = 'See https://www.drupal.org/node/3424710 for information on implementing schemas in your program code.';
    return is_object($object) ? sprintf('No schema is defined for property of type %s. %s', $object::class, $baseMessage) : sprintf('No schema defined for this property. %s', $baseMessage);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.