{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/confighub/json-schema/confighub-function-signature-schema.json",
  "title": "FunctionSignature",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/confighub-function-api-openapi.yml#/components/schemas/FunctionSignature",
  "type": "object",
  "properties": {
    "AffectedResourceTypes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Resource types the function applies to; * if all",
      "x-go-type-skip-optional-pointer": true
    },
    "AttributeName": {
      "type": "string",
      "description": "Attribute corresponding to registered paths, if a path visitor; optional",
      "x-confighub-where": {
        "dataType": "string"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "Description": {
      "type": "string",
      "description": "Description of the function",
      "x-confighub-where": {
        "dataType": "string"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "FunctionName": {
      "type": "string",
      "description": "Name of the function in kabob-case",
      "x-confighub-where": {
        "dataType": "string"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "FunctionType": {
      "type": "string",
      "description": "Implementation pattern of the function: PathVisitor or Custom",
      "x-confighub-where": {
        "dataType": "string"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "Hermetic": {
      "type": "boolean",
      "description": "Does not call other systems",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "Idempotent": {
      "type": "boolean",
      "description": "Will return the same result if invoked again",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "Mutating": {
      "type": "boolean",
      "description": "May change the configuration data",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "OtherDataExpected": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "If non-empty, specification of what source(s) are expected in OtherData; if empty, OtherData is not used",
      "x-go-type-skip-optional-pointer": true
    },
    "OutputInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/FunctionOutput"
        }
      ],
      "description": "Output description",
      "x-confighub-where": {
        "dataType": "uuid",
        "references": "FunctionOutput"
      }
    },
    "Parameters": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FunctionParameter"
      },
      "description": "Function parameters, in order",
      "x-go-type-skip-optional-pointer": true
    },
    "Replayable": {
      "type": "boolean",
      "description": "Means the same thing run against a different Unit, so a merge may re-execute a stored invocation of it against a downstream variant",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "RequiredParameters": {
      "type": "integer",
      "description": "Number of required parameters",
      "x-confighub-where": {
        "dataType": "int"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "ToolchainType": {
      "type": "string",
      "description": "Toolchain under which the function is registered",
      "x-confighub-where": {
        "dataType": "string"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "Validating": {
      "type": "boolean",
      "description": "Returns ValidationResult",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    },
    "VarArgs": {
      "type": "boolean",
      "description": "Last parameter may be repeated",
      "x-confighub-where": {
        "dataType": "bool"
      },
      "x-go-type-skip-optional-pointer": true
    }
  },
  "$defs": {
    "FunctionOutput": {
      "type": "object",
      "properties": {
        "Description": {
          "type": "string",
          "description": "Description of the result",
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "OutputType": {
          "type": "string",
          "description": "Data type of the JSON embedded in the output",
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "ResultName": {
          "type": "string",
          "description": "Name of the result in kabob-case",
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "Schema": {
          "allOf": [
            {
              "$ref": "#/$defs/Schema"
            }
          ],
          "description": "JSON schema of the output type"
        }
      }
    },
    "FunctionParameter": {
      "type": "object",
      "properties": {
        "DataType": {
          "type": "string",
          "description": "Data type of the parameter",
          "x-go-type-skip-optional-pointer": true
        },
        "Description": {
          "type": "string",
          "description": "Description of the parameter",
          "x-go-type-skip-optional-pointer": true
        },
        "EnumValues": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of valid enum values; applies to enum parameters",
          "x-go-type-skip-optional-pointer": true
        },
        "Example": {
          "type": "string",
          "description": "Example value",
          "x-go-type-skip-optional-pointer": true
        },
        "Max": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Maximum allowed value; applies to int parameters",
          "x-go-type-skip-optional-pointer": true
        },
        "Min": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Minimum allowed value; applies to int parameters",
          "x-go-type-skip-optional-pointer": true
        },
        "ParameterName": {
          "type": "string",
          "description": "Name of the parameter in kabob-case",
          "x-go-type-skip-optional-pointer": true
        },
        "Regexp": {
          "type": "string",
          "description": "Regular expression matching valid values; applies to string parameters",
          "x-go-type-skip-optional-pointer": true
        },
        "Required": {
          "type": "boolean",
          "description": "Whether the parameter is required",
          "x-go-type-skip-optional-pointer": true
        },
        "Schema": {
          "allOf": [
            {
              "$ref": "#/$defs/Schema"
            }
          ],
          "description": "JSON schema (for embedded JSON values)"
        }
      }
    },
    "Schema": {}
  }
}