{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-capability-type-dto-schema.json",
  "title": "CapabilityTypeDTO",
  "description": "CapabilityType",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexus-capabilities-api-openapi.yml#/components/schemas/CapabilityTypeDTO",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Capability type identifier"
    },
    "name": {
      "type": "string",
      "description": "Display name of the capability type"
    },
    "about": {
      "type": "string",
      "description": "Description of the capability type"
    },
    "formFields": {
      "type": "array",
      "description": "Form fields configuration for this capability type",
      "items": {
        "$ref": "#/$defs/FormFieldDTO"
      }
    }
  },
  "$defs": {
    "FormFieldDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Field identifier"
        },
        "type": {
          "type": "string",
          "description": "Field type (e.g., string, password, number, checkbox, combobox)"
        },
        "label": {
          "type": "string",
          "description": "Display label for the field"
        },
        "helpText": {
          "type": "string",
          "description": "Help text shown to users"
        },
        "required": {
          "type": "boolean",
          "description": "Whether the field is required"
        },
        "disabled": {
          "type": "boolean",
          "description": "Whether the field is disabled"
        },
        "readOnly": {
          "type": "boolean",
          "description": "Whether the field is read-only"
        },
        "regexValidation": {
          "type": "string",
          "description": "Regular expression for field validation"
        },
        "initialValue": {
          "type": "string",
          "description": "Initial value for the field"
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "description": "Additional attributes for the field"
          },
          "description": "Additional attributes for the field"
        },
        "minimumValue": {
          "type": "string",
          "description": "Minimum value (for number fields)"
        },
        "maximumValue": {
          "type": "string",
          "description": "Maximum value (for number fields)"
        },
        "storeApi": {
          "type": "string",
          "description": "API endpoint for fetching selectable options"
        },
        "storeFilters": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "description": "Filters to apply when fetching options from the store API"
          },
          "description": "Filters to apply when fetching options from the store API"
        },
        "idMapping": {
          "type": "string",
          "description": "Property path for the ID field in store API response"
        },
        "nameMapping": {
          "type": "string",
          "description": "Property path for the name/display field in store API response"
        },
        "allowAutocomplete": {
          "type": "boolean",
          "description": "Whether autocomplete is enabled for this field"
        }
      },
      "description": "FormField"
    }
  }
}