Add configuration schema

Created on 29 August 2024, 3 months ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

I'm not sure how important it is, but I think instead of this:

  toc_filter:
    id: toc_filter
    provider: toc_filter
    status: false
    weight: 0
    settings:
      type: default
      auto: ''
      block: '0'
      exclude_above: '0'

The configs should be either without quotes or as true/false eg

  toc_filter:
    id: toc_filter
    provider: toc_filter
    status: false
    weight: 0
    settings:
      type: default
      auto: 0
      block: 0
      exclude_above: 0

Steps to reproduce

Export code and check the output.

Proposed resolution

config/schema/filter.schema.yml:

filter_settings.toc_filter:
  type: filter
  label: 'TOC filter settings'
  mapping:
    type:
      type: string
      label: 'TOC type'
    auto:
      type: boolean
      label: 'Automatically include table of contents'
    block:
      type: boolean
      label: 'Display table of contents in a block'
    exclude_above:
      type: boolean
      label: 'Exclude text above the TOC'
📌 Task
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇪🇪Estonia hkirsman

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

Comments & Activities

Production build 0.71.5 2024