Problem/Motivation
I have a config entity which has an optional expression. I tried to do this using the following config schema:
my_module.config_entity_type.*:
type: config_entity
mapping:
expression:
type: rules_expression.[id]
label: 'Expression configuration'
nullable: true
This doesn't work, because if the value is NULL, there is no ID and so it can't find a data type, resulting in schema errors and failing tests.
Proposed resolution
Defining a catch-all for rules_expression.* solves this.
Data model changes
Additional catch all schema to allow nulls.
Comments
Comment #2
andrewbelcher commentedHere's a patch that resolves it.
Comment #3
tr commentedHere's a re-roll with an added label for documentation purposes.
Comment #4
tr commentedSigh, testbot is currently having problems... See #3099984: Composer require failure since Drupal 8.8.0
Comment #5
tr commentedI will be committing this as soon as the testbot is back up and running.
Comment #7
tr commentedCommitted. Thanks!