We have got some basic config schema, but we need to complete it such that it covers all possible config keys. When done, we strict config schema checking should be enabled in all tests also.

Comments

fago’s picture

Assigned: Unassigned » fago
condition.plugin.user_role:
  type: condition.plugin
  mapping:
    roles:
      type: sequence
      sequence:
        type: string
condition.plugin:
  type: mapping
  label: 'Condition'
  mapping:
    id:
      type: string
      label: 'ID'
    negate:
      type: boolean
      label: 'Negate'
    uuid:
      type: string
      label: 'UUID'
    context_mapping:
      type: sequence
      label: 'Context assignments'
      sequence:
        type: string

That's the kind of schema core has for conditions.

fago’s picture

started with strictness: https://www.drupal.org/node/2675728

fago’s picture

Status: Active » Needs review

implemented it for plugins and added some examples. We need to complete it for all conditions and actions though, but that we can do in contributor tasks.

Let's see whether this is enough to make the tests happy.

https://github.com/fago/rules/pull/418

  • fago committed 757bc4a on 8.x-3.x
    Issue #2453469 by fago: Make rules condition config schema validate.
    
  • fago committed b2a67be on 8.x-3.x
    Issue #2453469 by fago: Make rules settings config schema validate.
    
  • fago committed f6ebbd6 on 8.x-3.x
    Issue #2453469 by fago: Enable strict config schema checking in tests.
    
fago’s picture

Status: Needs review » Fixed

and merged :)

  • fago committed 4da3d00 on 8.x-3.x
    Issue #2453469 by fago: Allow condition and action plugins to provide...
  • fago committed bf7134d on 8.x-3.x
    Issue #2453469 by fago: Added configuration schema for the test log...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.