public function DateTimeFromStringEnhancer::getOutputJsonSchema in JSON:API Extras 8.3
Get the JSON Schema for the new output.
Return value
array An structured array representing the JSON Schema of the new output.
Overrides DateTimeEnhancerBase::getOutputJsonSchema
File
- src/
Plugin/ jsonapi/ FieldEnhancer/ DateTimeFromStringEnhancer.php, line 66
Class
- DateTimeFromStringEnhancer
- Perform additional manipulations to datetime fields.
Namespace
Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancerCode
public function getOutputJsonSchema() {
$baseType = parent::getOutputJsonSchema();
return [
"anyOf" => [
$baseType,
[
"type" => "array",
"items" => $baseType,
],
[
"type" => "object",
"properties" => [
"value" => $baseType,
"end_value" => $baseType,
],
],
],
];
}