{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/continuous-delivery-foundation/json-schema/continuous-delivery-foundation-model28-schema.json",
  "title": "Model28",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/continuous-delivery-foundation-pipeline-api-openapi.yml#/components/schemas/Model28",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Identifier of this template",
      "x-constraint": {
        "sign": "positive"
      }
    },
    "pipelineId": {
      "type": "integer",
      "description": "Identifier of this pipeline",
      "x-constraint": {
        "sign": "positive"
      }
    },
    "namespace": {
      "type": "string",
      "description": "Namespace of the Template",
      "maxLength": 64,
      "pattern": "^[\\w-]+$"
    },
    "name": {
      "type": "string",
      "description": "Name of the template",
      "maxLength": 64,
      "pattern": "^[\\w-]+$"
    },
    "maintainer": {
      "type": "string",
      "description": "Maintainer of the Template",
      "maxLength": 64,
      "x-format": {
        "email": true
      }
    },
    "trustedSinceVersion": {
      "type": "string",
      "description": "The version since the template is marked as trusted",
      "maxLength": 16,
      "pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)$"
    },
    "latestVersion": {
      "type": "string",
      "description": "Latest version of the template",
      "maxLength": 16,
      "pattern": "^(\\d+)\\.(\\d+)\\.(\\d+)$"
    },
    "createTime": {
      "type": "string",
      "description": "When this template was created",
      "maxLength": 32,
      "x-format": {
        "isoDate": true
      }
    },
    "updateTime": {
      "type": "string",
      "description": "When this template was updated",
      "maxLength": 32,
      "x-format": {
        "isoDate": true
      }
    },
    "templateType": {
      "$ref": "#/$defs/templateType"
    }
  },
  "required": [
    "id",
    "pipelineId",
    "namespace",
    "name",
    "maintainer",
    "templateType"
  ],
  "$defs": {
    "templateType": {
      "type": "string",
      "description": "Template Type",
      "default": "JOB",
      "enum": [
        "JOB",
        "PIPELINE"
      ],
      "maxLength": 16
    }
  }
}