From 246b98dd72006e65301a7912abc9187387285ae2 Mon Sep 17 00:00:00 2001
From: paulocs <paulocs@3640109.no-reply.drupal.org>
Date: Mon, 14 Sep 2020 14:41:40 -0300
Subject: [PATCH] Issue #2953766 by DeaOm, paulocs, Jaypan, WidgetsBurritos,
 bighappyface, boshtian, strozx, Chris Charlton: Provide a Configuration
 Schema

---
 config/schema/context.data_types.schema.yml |  75 +++++++++++++
 config/schema/context.schema.yml            | 110 ++++++++++++++++++++
 2 files changed, 185 insertions(+)
 create mode 100644 config/schema/context.data_types.schema.yml
 create mode 100644 config/schema/context.schema.yml

diff --git a/config/schema/context.data_types.schema.yml b/config/schema/context.data_types.schema.yml
new file mode 100644
index 0000000..8d3afd6
--- /dev/null
+++ b/config/schema/context.data_types.schema.yml
@@ -0,0 +1,75 @@
+reaction.plugin:
+  type: mapping
+  label: 'Reaction'
+  mapping:
+    id:
+      type: string
+      label: 'ID'
+    negate:
+      type: boolean
+      label: 'Negate'
+    uuid:
+      type: uuid
+    reaction_mapping:
+      type: sequence
+      label: 'Reaction assignments'
+      sequence:
+        type: string
+    blocks:
+      type: sequence
+      label: 'Blocks'
+      sequence:
+        type: mapping
+        mapping:
+          uuid:
+            type: string
+          id:
+            type: string
+          label:
+            type: string
+          provider:
+            type: string
+          label_display:
+            type: string
+          region:
+            type: string
+          weight:
+            type: string
+          custom_id:
+            type: string
+          theme:
+            type: string
+          css_class:
+            type: string
+          unique:
+            type: integer
+          context_id:
+            type: string
+          context_mapping:
+            type: sequence
+            label: 'Block Context'
+            sequence:
+              type: string
+
+condition.plugin:
+  type: mapping
+  label: 'Condition'
+  mapping:
+    id:
+      type: string
+      label: 'ID'
+    negate:
+      type: boolean
+      label: 'Negate'
+    uuid:
+      type: uuid
+    context_mapping:
+      type: sequence
+      label: 'Conditions'
+      sequence:
+        type: string
+    view_inclusion:
+      type: sequence
+      label: 'View Inclusion'
+      sequence:
+        type: string
diff --git a/config/schema/context.schema.yml b/config/schema/context.schema.yml
new file mode 100644
index 0000000..ce9fb7c
--- /dev/null
+++ b/config/schema/context.schema.yml
@@ -0,0 +1,110 @@
+context.context.*:
+  type: config_entity
+  label: 'Context configuration'
+  mapping:
+    id:
+      type: string
+      label: 'ID'
+    label:
+      type: label
+      label: 'Label'
+    name:
+      type: string
+      label: 'Name'
+    group:
+      type: string
+      label: 'Group'
+    description:
+      type: string
+      label: 'Description'
+    requireAllConditions:
+      type: boolean
+      label: 'Require All Conditions'
+    disabled:
+      type: boolean
+      label: 'Disabled'
+    conditions:
+      type: sequence
+      label: 'Conditions'
+      sequence:
+        type: condition.plugin.[id]
+        label: 'Condition'
+    reactions:
+      type: sequence
+      label: 'Reactions'
+      sequence:
+        type: reaction.plugin.[id]
+        label: 'Reaction'
+    weight:
+      type: integer
+      label: 'Weight'
+
+condition.plugin.request_path_exclusion:
+  type: condition.plugin
+  label: 'Request Path Exclusion Condition'
+  mapping:
+    pages:
+      type: string
+
+condition.plugin.view_inclusion:
+  type: condition.plugin
+  label: 'View Inclusion Condition'
+  mapping:
+    view_inclusion:
+      type: sequence
+      label: 'View Inclusion'
+
+reaction.plugin.menu:
+  type: reaction.plugin
+  mapping:
+    menu_items:
+      type: sequence
+      label: 'Menu items'
+
+reaction.plugin.page_template_suggestions:
+  type: reaction.plugin
+  mapping:
+    suggestions:
+      type: text
+      label: 'Page template suggestions'
+
+reaction.plugin.regions:
+  type: reaction.plugin
+  mapping:
+    regions:
+      type: array
+      label: 'Regions'
+
+reaction.plugin.theme:
+  type: reaction.plugin
+  mapping:
+    theme:
+      type: string
+      label: 'Theme'
+
+reaction.plugin.blocks:
+  type: reaction.plugin
+  mapping:
+    theme:
+      type: string
+      label: 'The theme in which to display the block'
+    include_default_blocks:
+      type: integer
+      label: 'Include blocks from Block layout'
+    saved:
+      type: boolean
+      label: 'Saved'
+
+reaction.plugin.body_class:
+  type: reaction.plugin
+  mapping:
+    body_class:
+      type: string
+      label: 'The class to add to the body'
+
+reaction.plugin.page_title:
+  type: reaction.plugin
+  mapping:
+    page_title:
+      type: string
+      label: 'The title to add to the page'
-- 
GitLab