{
  "$defs": {
    "FieldDecl": {
      "additionalProperties": false,
      "properties": {
        "description": {
          "minLength": 1,
          "title": "Description",
          "type": "string"
        },
        "enum": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Enum"
        },
        "maxItems": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Maxitems"
        },
        "maxLength": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Maxlength"
        },
        "maximum": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Maximum"
        },
        "minimum": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Minimum"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "pattern": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Pattern"
        },
        "type": {
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "description"
      ],
      "title": "FieldDecl",
      "type": "object"
    },
    "PiiClass": {
      "enum": [
        "none",
        "pii",
        "sensitive"
      ],
      "title": "PiiClass",
      "type": "string"
    },
    "UnionVariant": {
      "additionalProperties": false,
      "properties": {
        "description": {
          "minLength": 1,
          "title": "Description",
          "type": "string"
        },
        "fields": {
          "items": {
            "$ref": "#/$defs/FieldDecl"
          },
          "title": "Fields",
          "type": "array"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "name",
        "description"
      ],
      "title": "UnionVariant",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "apiVersion": {
      "const": "aqven/v1",
      "title": "Apiversion",
      "type": "string"
    },
    "description": {
      "minLength": 1,
      "title": "Description",
      "type": "string"
    },
    "discriminator": {
      "title": "Discriminator",
      "type": "string"
    },
    "kind": {
      "const": "Type",
      "title": "Kind",
      "type": "string"
    },
    "pii": {
      "$ref": "#/$defs/PiiClass",
      "default": "none"
    },
    "type": {
      "const": "union",
      "title": "Type",
      "type": "string"
    },
    "variants": {
      "items": {
        "$ref": "#/$defs/UnionVariant"
      },
      "minItems": 1,
      "title": "Variants",
      "type": "array"
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "type",
    "description",
    "discriminator",
    "variants"
  ],
  "title": "UnionType",
  "type": "object"
}
