Configuration schema not fully validate-able

Created on 14 December 2024, 3 months ago

Problem/Motivation

In order to support core initiatives like Config Validation and Recipes, as well as headless drupal, and a better drush experience among other reasons I'd like to make the configuration schema for this module fully validate-able.

Steps to reproduce

Install config_inspector .
View the reports at /admin/reports/config-inspector/user_expire.settings/list

Proposed resolution

Possible configuration schema:

user_expire.settings:
  type: config_object
  label: 'User expire settings'
  mapping:
    frequency:
      type: integer
      label: 'Frequency time in seconds'
      constraints:
        Range:
          min: 0
          notInRangeMessage: 'Frequency must be 0 seconds or greater.'
    offset:
      type: integer
      label: 'Warning offset time in seconds'
      constraints:
        Range:
          min: 0
          notInRangeMessage: 'Offset must be 0 seconds or greater.'
    user_expire_roles:
      type: sequence
      label: 'Role expiration settings'
      sequence:
        type: mapping
        mapping:
          role_id:
            type: string
            label: 'Role ID'
            constraints:
              NotBlank: []
          expire_time:
            type: integer
            label: 'Expiration time in seconds'
            constraints:
              Range:
                min: 0
                notInRangeMessage: 'Expiration time must be 0 seconds or greater.'

Remaining tasks

  • Agree on constraints

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024