{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://forms.takoform.com/schemas/v1beta2/form-ref.schema.json",
  "title": "Takoform FormRef v1beta2",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "apiVersion",
    "kind",
    "definitionVersion",
    "schemaDigest"
  ],
  "properties": {
    "apiVersion": {
      "type": "string",
      "maxLength": 320,
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+(?:/v[0-9]+(?:(?:alpha|beta)[0-9]+)?)?$",
      "not": {
        "enum": [
          "forms.takoform.com/v1alpha1",
          "forms.takoform.com/v1alpha2"
        ]
      },
      "description": "Namespaced DNS-like Form group, and OPTIONALLY a group version. The version is optional because a group carries one only while it has a published generation to keep apart: kind, definitionVersion and schemaDigest already name the exact contract, so a version inside the group added nothing to the tuple and only made every member move together (decision 0049). The frozen forms.takoform.com/v1alpha1 and forms.takoform.com/v1alpha2 groups are retained epochs and are not valid groups here."
    },
    "kind": {
      "type": "string",
      "pattern": "^[A-Z][A-Za-z0-9]{0,63}$"
    },
    "definitionVersion": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(\\.(0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?(\\+([0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*))?$"
    },
    "schemaDigest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    }
  }
}
