JsonSchema.php
Namespace
Drupal\Core\Serialization\AttributeFile
-
core/
lib/ Drupal/ Core/ Serialization/ Attribute/ JsonSchema.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Core\Serialization\Attribute;
/**
* Attribute for methods to express the JSON Schema of its return value.
*
* This attribute may be repeated to define multiple potential types.
*/
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;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
JsonSchema | Attribute for methods to express the JSON Schema of its return value. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.