{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk/json-schema/autodesk-section-detail-schema.json",
  "title": "SectionDetail",
  "description": "Detailed layout section information.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-aps-construction-forms-openapi.yml#/components/schemas/SectionDetail",
  "type": "object",
  "properties": {
    "section": {
      "$ref": "#/$defs/LayoutSection"
    },
    "sectionItems": {
      "type": "array",
      "description": "The fields and tables within the section.",
      "items": {
        "$ref": "#/$defs/SectionItem"
      }
    },
    "tableColumns": {
      "type": "object",
      "description": "Map of table UIDs to their column definitions. Only present for sections containing tables.",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/TableColumn"
        }
      }
    },
    "actions": {
      "type": "array",
      "description": "Conditional logic rules that apply to this section.",
      "items": {
        "$ref": "#/$defs/SectionAction"
      }
    }
  },
  "$defs": {
    "ActionCondition": {
      "type": "object",
      "description": "The condition which if met will cause the effect (the 'if').",
      "properties": {
        "type": {
          "type": "string",
          "description": "Possible values: and, or, comparison",
          "enum": [
            "and",
            "or",
            "comparison"
          ]
        },
        "operator": {
          "type": "string",
          "description": "Possible values: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains",
          "enum": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "not_in",
            "contains",
            "not_contains"
          ]
        },
        "left": {
          "type": "object"
        },
        "right": {
          "type": "object"
        },
        "conditions": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "ActionEffect": {
      "type": "object",
      "description": "The effect which applies if the condition is met (the 'then').",
      "properties": {
        "type": {
          "type": "string",
          "description": "Possible values: hide, show, require, not_require, set_value",
          "enum": [
            "hide",
            "show",
            "require",
            "not_require",
            "set_value"
          ]
        },
        "target": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "LayoutSection": {
      "type": "object",
      "description": "Metadata about a layout section.",
      "properties": {
        "uid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the section."
        },
        "layoutUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent layout."
        },
        "sortIndex": {
          "type": "integer",
          "description": "The sort order index of the section."
        },
        "displayIndex": {
          "type": "integer",
          "description": "The display order index of the section."
        },
        "type": {
          "type": "string",
          "description": "The type of the section. Will always be: section.",
          "enum": [
            "section"
          ]
        },
        "assigneeType": {
          "type": "string",
          "description": "The type of assignee for the section. Possible values: user, company, role",
          "enum": [
            "user",
            "company",
            "role"
          ]
        },
        "assigneeId": {
          "type": "string",
          "description": "The ID of the assignee for the section."
        },
        "label": {
          "type": "string",
          "description": "The label of the section."
        },
        "description": {
          "type": "string",
          "description": "The description of the section."
        }
      }
    },
    "Preset": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        }
      }
    },
    "SectionAction": {
      "type": "object",
      "properties": {
        "uid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the action."
        },
        "layoutUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent layout."
        },
        "condition": {
          "$ref": "#/$defs/ActionCondition"
        },
        "effect": {
          "$ref": "#/$defs/ActionEffect"
        }
      }
    },
    "SectionItem": {
      "type": "object",
      "properties": {
        "uid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the section item."
        },
        "layoutUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent layout."
        },
        "sectionUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent section."
        },
        "sortIndex": {
          "type": "integer",
          "description": "The sort order index of the item within the section."
        },
        "displayIndex": {
          "type": "integer",
          "description": "The display order index of the item."
        },
        "type": {
          "type": "string",
          "description": "What type of UI component should be generated for this element. Possible values: field, table",
          "enum": [
            "field",
            "table"
          ]
        },
        "size": {
          "type": "string",
          "description": "On a table column/Free Text field, size:large indicates multi-line text. Possible values: normal, large",
          "enum": [
            "normal",
            "large"
          ]
        },
        "label": {
          "type": "string",
          "description": "The field label/question text."
        },
        "schema": {
          "type": "string",
          "description": "Identifier for the field. For table section items, this is the table schema UUID used as the fieldId path parameter for GET table values."
        },
        "valueName": {
          "type": "string",
          "description": "Determines the question type and value name for answering. Possible values: arrayVal, choiceVal, dateVal, numberVal, textVal, toggleVal, svgVal",
          "enum": [
            "arrayVal",
            "choiceVal",
            "dateVal",
            "numberVal",
            "textVal",
            "toggleVal",
            "svgVal"
          ]
        },
        "description": {
          "type": "string",
          "description": "Text displayed with the question for additional context."
        },
        "isRequired": {
          "type": "boolean",
          "description": "Determines if the question must be filled before submission."
        },
        "modifier": {
          "type": "string",
          "description": "Additional modifier for the field behavior."
        },
        "presets": {
          "type": "array",
          "description": "Autocomplete or drop-down options.",
          "items": {
            "$ref": "#/$defs/Preset"
          }
        }
      }
    },
    "TableColumn": {
      "type": "object",
      "properties": {
        "uid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the table column."
        },
        "layoutUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent layout."
        },
        "layoutSectionItemUid": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the parent layout section item."
        },
        "sortIndex": {
          "type": "integer",
          "description": "The sort order index of the column."
        },
        "type": {
          "type": "string",
          "description": "The type of the column. Will always be: column.",
          "enum": [
            "column"
          ]
        },
        "presets": {
          "type": "array",
          "description": "Autocomplete or drop-down options.",
          "items": {
            "$ref": "#/$defs/Preset"
          }
        },
        "valuesProvider": {
          "type": "string",
          "description": "Provider for dropdown values."
        },
        "calc": {
          "type": "string",
          "description": "Calculation configuration for the column."
        },
        "columnKey": {
          "type": "string",
          "description": "Unique key identifier for the column. This is used in expressions."
        },
        "columnType": {
          "type": "string",
          "description": "The data type of the column. Custom tables support multiple column types: text_val (Text input), number_val (Decimal numbers), integer_val (Whole numbers), array_val (Dropdown/multi-select - use with presets or valuesProvider), uid_val (Reference fields such as companies, roles - use with valuesProvider), svg_val (Signatures - coming soon for custom tables), date_val (Date picker), time_val (Time picker), timespan_val (Duration/time span).\n",
          "enum": [
            "text_val",
            "number_val",
            "integer_val",
            "array_val",
            "uid_val",
            "svg_val",
            "date_val",
            "time_val",
            "timespan_val"
          ]
        },
        "expression": {
          "type": "string",
          "description": "The expression for the column."
        },
        "label": {
          "type": "string",
          "description": "The label for the column."
        }
      }
    }
  }
}