{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-crosswork/json-schema/cisco-crosswork-robotapi-robot-unique-policy-list-schema.json",
  "title": "List of policies used in the api request/response",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-crosswork-add-policies-api-openapi.yml#/components/schemas/robotapiRobotUniquePolicyList",
  "type": "object",
  "properties": {
    "policies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/robotapiRobotUniquePolicy"
      }
    },
    "user": {
      "type": "string"
    }
  },
  "$defs": {
    "robotapiRobotInventoryType": {
      "description": "Supported Inventory Type",
      "type": "string",
      "enum": [
        "INV_TYPE_UNKNOWN",
        "INV_TYPE_NODE",
        "INV_TYPE_PROVIDER",
        "INV_TYPE_CREDENTIAL",
        "INV_TYPE_TAG"
      ],
      "default": "INV_TYPE_UNKNOWN"
    },
    "robotapiRobotUniquePolicy": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "title": "Unique name"
        },
        "invType": {
          "$ref": "#/$defs/robotapiRobotInventoryType",
          "title": "Inventory Type, In 3.1 version, policies are supported only for Nodes"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Array of field names on which the uniqueness will be maintained"
        },
        "Type": {
          "$ref": "#/$defs/robotapiUniquePolicyType",
          "title": "Combination of all the filed supplied or independent"
        }
      }
    },
    "robotapiUniquePolicyType": {
      "type": "string",
      "enum": [
        "UNKNOWN_TYPE",
        "INDEPENDENT",
        "COMBINED"
      ],
      "default": "UNKNOWN_TYPE"
    }
  }
}