- Issue created by @wim leers
📌
Provide visibility into which (core) field type props can be mapped into Content Type Templates vs not
Active
added FieldTypeSupportTest
, but did it in a way where only the default field storage settings are used. Hence it added this:
@todo test non-default FieldStorageConfig settings?! Impossible to automate to test exhaustively, certainly without fully validatable config schema.
For most field types, this is sufficient. But not for all.
For example, for the datetime
field type, the datetime_type
storage-level setting results in very different data being stored, and very different SDC prop shapes getting matches:
// Built-in formats: dates and times.
// @see https://json-schema.org/understanding-json-schema/reference/string#dates-and-times
// @see \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem
static::DATE_TIME => new StorablePropShape(shape: $shape, fieldTypeProp: new FieldTypePropExpression('datetime', 'value'), fieldStorageSettings: ['datetime_type' => DateTimeItem::DATETIME_TYPE_DATETIME], fieldWidget: 'datetime_default'),
// @see \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem
static::DATE => new StorablePropShape(shape: $shape, fieldTypeProp: new FieldTypePropExpression('datetime', 'value'), fieldStorageSettings: ['datetime_type' => DateTimeItem::DATETIME_TYPE_DATE], fieldWidget: 'datetime_default'),
— \Drupal\experience_builder\JsonSchemaInterpreter\JsonSchemaStringFormat::computeStorablePropShape()
Expand FieldTypeTest
.
None.
Active
0.0
Shape matching