{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gmi-cloud/json-schema/gmi-cloud-template-schema.json",
  "title": "template",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gmi-cloud-templates-api-openapi.yml#/components/schemas/template",
  "properties": {
    "credential": {
      "$ref": "#/$defs/credential"
    },
    "description": {
      "default": "",
      "maxLength": 4096,
      "minLength": 0,
      "type": "string"
    },
    "name": {
      "$ref": "#/$defs/name"
    },
    "path": {
      "format": "uri",
      "maxLength": 253,
      "pattern": "^\\S+$",
      "type": "string"
    },
    "status": {
      "default": "published",
      "enum": [
        "draft",
        "published",
        "unpublished"
      ],
      "type": "string"
    }
  },
  "required": [
    "name",
    "path"
  ],
  "type": "object",
  "$defs": {
    "credential": {
      "default": {
        "secret": "",
        "username": ""
      },
      "properties": {
        "secret": {
          "default": "",
          "format": "password",
          "maxLength": 4096,
          "minLength": 0,
          "type": "string"
        },
        "username": {
          "default": "",
          "maxLength": 4096,
          "minLength": 0,
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "maxLength": 255,
      "pattern": "^([A-Za-z0-9][A-Za-z0-9_\\-. ]*)?[A-Za-z0-9]$",
      "type": "string"
    }
  }
}