{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-app-repo-tree-schema.json",
  "title": "AppRepoTree",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-app-repos-api-openapi.yml#/components/schemas/AppRepoTree",
  "type": "object",
  "required": [
    "commit",
    "path",
    "entries"
  ],
  "properties": {
    "commit": {
      "type": [
        "string",
        "null"
      ],
      "description": "The commit read; null for an empty repo (whose root lists no entries)."
    },
    "path": {
      "type": "string",
      "description": "The directory read; \"\" for the root."
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AppRepoTreeEntry"
      }
    }
  },
  "$defs": {
    "AppRepoTreeEntry": {
      "type": "object",
      "required": [
        "name",
        "path",
        "type",
        "size",
        "oid"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "file",
            "dir"
          ]
        },
        "size": {
          "type": [
            "integer",
            "null"
          ],
          "description": "File size in bytes; null for a directory."
        },
        "oid": {
          "type": "string",
          "description": "Git blob or tree id."
        }
      }
    }
  }
}