{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/progress-software/json-schema/progress-software-credential-template-batch-schema.json",
  "title": "CredentialTemplateBatch",
  "description": "Provide a set of device templates to be applied",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/progress-software-credential-api-openapi.yml#/components/schemas/CredentialTemplateBatch",
  "type": "object",
  "properties": {
    "options": {
      "description": "Set of options for applying the template",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allowModifies": {
      "description": "If true and template has an id, template will be used to modify matching credentials. If credential with a validate id is not found, template will be ignored.\nif false, the id field will be ignored.",
      "type": "boolean"
    },
    "templates": {
      "description": "Set of templates to be applied. All templates will attempt to create a new credential.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CredentialTemplate"
      }
    }
  },
  "$defs": {
    "CredentialPropertyBag": {
      "description": "List of properties to be added to the device\nProperty Names should be unique in the list.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Required: Name of property",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "value": {
          "description": "Defaults to empty. Value to be used for property.",
          "type": "string"
        }
      }
    },
    "CredentialTemplate": {
      "description": "Credential template structure",
      "type": "object",
      "properties": {
        "templateId": {
          "description": "Unique identifier for this template",
          "type": "string"
        },
        "type": {
          "description": "Type of credential",
          "type": "string"
        },
        "propertyBags": {
          "description": "Configuration Data Field",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CredentialPropertyBag"
          }
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    }
  }
}