{
  "$defs": {
    "Field": {
      "additionalProperties": false,
      "properties": {
        "input": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "autogen": {
                  "description": "Defines the auto-generated value to set.",
                  "oneOf": [
                    {
                      "const": "PROJECT_NAMESPACE"
                    },
                    {
                      "const": "SECURE_TOKEN"
                    }
                  ],
                  "optional": true
                },
                "default": {
                  "description": "Defines the optional default for the input.",
                  "minLength": 1,
                  "optional": true,
                  "type": "string"
                },
                "max_length": {
                  "description": "Defines the maximum length.",
                  "optional": true,
                  "type": "integer"
                },
                "type": {
                  "const": "string",
                  "description": "The type of the field input."
                },
                "validator": {
                  "description": "Defines the validator.",
                  "optional": true,
                  "type": "string"
                }
              },
              "required": [
                "type"
              ]
            },
            {
              "additionalProperties": false,
              "properties": {
                "autogen": {
                  "description": "Defines the auto-generated value to set.",
                  "oneOf": [
                    {
                      "const": "PROJECT_NAMESPACE"
                    },
                    {
                      "const": "SECURE_TOKEN"
                    }
                  ],
                  "optional": true
                },
                "default": {
                  "description": "Defines the optional default for the input.",
                  "minLength": 1,
                  "optional": true,
                  "type": "string"
                },
                "increment": {
                  "description": "Defines the amount this increments by.",
                  "type": "integer"
                },
                "max": {
                  "description": "Defines the maximum value.",
                  "type": "integer"
                },
                "min": {
                  "description": "Defines the minimum value.",
                  "type": "integer"
                },
                "type": {
                  "const": "range",
                  "description": "The type of the field input."
                },
                "unit": {
                  "description": "Defines the unit this amount is using.",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "min",
                "max"
              ]
            }
          ]
        },
        "map_to": {
          "items": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "key": {
                    "description": "Defines the key this maps to.",
                    "type": "string"
                  },
                  "type": {
                    "const": "env",
                    "description": "The type of the property."
                  }
                },
                "required": [
                  "type",
                  "key"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "type": {
                    "const": "volume_size",
                    "description": "The type of the property."
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        "required": {
          "description": "Defines if the form field is required.",
          "type": "boolean"
        },
        "title": {
          "description": "The title of the form field.",
          "type": "string"
        }
      },
      "required": [
        "input",
        "title",
        "required",
        "map_to"
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "fields": {
      "items": {
        "$ref": "#/$defs/Field"
      },
      "type": "array"
    },
    "v": {
      "description": "The version of the schema.",
      "oneOf": [
        {
          "const": 1
        }
      ],
      "type": "integer"
    }
  },
  "required": [
    "v",
    "fields"
  ],
  "title": "Preset Form",
  "type": "object"
}