Skip to content
Snippets Groups Projects

Draft: JsComponents `enum` props should have human-readable labels: use `meta:enum`

1 file
+ 32
0
Compare changes
  • Side-by-side
  • Inline
@@ -71,6 +71,14 @@ experience_builder.json_schema.prop.string:
# Do not allow NULL.
constraints:
NotNull: ~
meta:enum:
requiredKey: false
type: sequence
sequence:
type: label
# Do not allow NULL.
constraints:
NotNull: ~
format:
requiredKey: false
type: string
@@ -133,6 +141,14 @@ experience_builder.json_schema.prop.integer:
# Do not allow NULL.
constraints:
NotNull: ~
meta:enum:
requiredKey: false
type: sequence
sequence:
type: label
# Do not allow NULL.
constraints:
NotNull: ~
# @see https://json-schema.org/understanding-json-schema/reference/numeric#number
experience_builder.json_schema.prop.number:
@@ -155,6 +171,14 @@ experience_builder.json_schema.prop.number:
# Do not allow NULL.
constraints:
NotNull: ~
meta:enum:
requiredKey: false
type: sequence
sequence:
type: label
# Do not allow NULL.
constraints:
NotNull: ~
# @see https://json-schema.org/understanding-json-schema/reference/boolean
# ⚠️ No `enum` here, because that would make little sense: it would always be `enum: [true, false]`.
@@ -196,6 +220,14 @@ experience_builder.json_schema.prop.object:
NotNull: ~
NotBlank:
allowNull: true
meta:enum:
requiredKey: false
type: sequence
sequence:
type: label
# Do not allow NULL.
constraints:
NotNull: ~
'$ref':
# ⚠️ Note the absence of `requiredKey: false` here: XB does not (yet) support arbitrary `type: object` shapes, so
# `$ref` is actually REQUIRED for such props!
Loading