function JsonSchemaProviderSerializerInterface::getJsonSchema
Convenience method to get a JSON schema.
Unlike calling ::normalize() with $format of 'json_schema' directly, this method always returns a schema, even if it's empty.
Parameters
mixed $object: Object or interface/class name for which to retrieve a schema.
array $context: Normalization context.
Return value
array Schema.
File
-
core/
modules/ serialization/ src/ Serializer/ JsonSchemaProviderSerializerInterface.php, line 23
Class
Namespace
Drupal\serialization\SerializerCode
public function getJsonSchema(mixed $object, array $context) : array;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.