class JsonSchema
Attribute for methods to express the JSON Schema of its return value.
This attribute may be repeated to define multiple potential types.
Hierarchy
- class \Drupal\Core\Serialization\Attribute\JsonSchema
Expanded class hierarchy of JsonSchema
15 files declare their use of JsonSchema
- Attribute.php in core/
lib/ Drupal/ Core/ Template/ Attribute.php - BooleanData.php in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BooleanData.php - DateTimeIso8601Normalizer.php in core/
modules/ serialization/ src/ Normalizer/ DateTimeIso8601Normalizer.php - DateTimeNormalizer.php in core/
modules/ serialization/ src/ Normalizer/ DateTimeNormalizer.php - DecimalData.php in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DecimalData.php
File
-
core/
lib/ Drupal/ Core/ Serialization/ Attribute/ JsonSchema.php, line 12
Namespace
Drupal\Core\Serialization\AttributeView source
class JsonSchema {
/**
* Constructor.
*
* @param array $schema
* Schema.
*/
public function __construct(array $schema = []) {
}
/**
* Get a JSON Schema type definition array.
*
* @return array
* Type definition.
*/
public function getJsonSchema() : array {
return $this->schema;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
JsonSchema::getJsonSchema | public | function | Get a JSON Schema type definition array. |
JsonSchema::__construct | public | function | Constructor. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.