# Schemas

A schema defines the constraints of how a person can interact with a touchpoint or a touch handler type.

These constraints are defined with a JSON Schema document and validated when a touch or touch handler is created.

A schema with a null JSON Schema document indicates that no information should be collected.

# Examples

The following is an example JSON Schema document in YAML form.

type: object
title: Problem with the coffee machine?
properties:
  problem:
    type: array
    attrs:
      type: checkbox
    items:
      - enum:
          - Ran out of beans/grounds
          - Grinder is not working
          - Out of filters
          - No more milk/creamer
          - No more sugar
          - Something else
        type: string
    title: What is going on?
  additional_comment:
    type: string
    attrs:
      type: textarea
      placeholder: E.g. machine is dead
    title: Something else or other details?
additionalProperties: false

The following is an example JSON Schema document in a rendered form.

Schema Preview