function JsonSchema::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Serialization/Attribute/JsonSchema.php \Drupal\Core\Serialization\Attribute\JsonSchema::__construct()

Constructor.

Parameters

array $schema: Schema.

File

core/lib/Drupal/Core/Serialization/Attribute/JsonSchema.php, line 21

Class

JsonSchema
Attribute for methods to express the JSON Schema of its return value.

Namespace

Drupal\Core\Serialization\Attribute

Code

public function __construct(public readonly array $schema = []) {
}

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