-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When using this library with the Drupal sdc_display module, it chokes on YAML structures like:
props:
type: object
properties: {}where it's not able to recognise the value of properties as valid. This is for two reasons:
- The value gets deserialised as an empty array, which fails strict validation
- Even if validation with type cast is enabled, it still fails because
(bool) $data->propertiesis false (seeJsonFormValidator, line 27)
Steps to reproduce
See issue for Single Directory Components: Display.
Package Versions
- Drupal Core 10.2.6
- Single Directory Components: Display 1.0.0-beta5
- e0ipso/schema-forms 2.5.1
- justinrainbow/json-schema 5.2.13
Proposed resolution
- Use
Constraint::CHECK_MODE_TYPE_CASTinFormGeneratorDrupal, line 52. - Remove
(bool) $data->propertiesfromJsonFormValidator, line 27.
I'm well aware that this might not be the correct solution and might have implications I can't see right now. Please advise.
Metadata
Metadata
Assignees
Labels
No labels