{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coderpad/json-schema/coderpad-pad-environment-schema.json",
  "title": "PadEnvironment",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coderpad-pad-environments-api-openapi.yml#/components/schemas/PadEnvironment",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "pad_id": {
      "type": "integer"
    },
    "question_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "example_question_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "language": {
      "type": "string",
      "description": "The language key or project template slug of the environment, `spreadsheet`, or `unknown` when it cannot be determined."
    },
    "file_contents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "contents": {
            "type": "string"
          },
          "history": {
            "type": "string",
            "format": "uri",
            "description": "URL of the raw edit history of the file."
          }
        }
      }
    },
    "created_at": {
      "$ref": "#/$defs/Timestamp"
    },
    "updated_at": {
      "$ref": "#/$defs/Timestamp"
    }
  },
  "$defs": {
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    }
  }
}