{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/genhttp-dev/json-schema/genhttp-dev-platform-response-schema.json",
  "title": "PlatformResponse",
  "description": "What this installation is like.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/genhttp-dev-v1-openapi.json#/components/schemas/PlatformResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "terms": {
      "type": "string",
      "description": "The terms of service, which creating a lambda accepts (`acceptedTerms`)"
    },
    "starters": {
      "type": "array",
      "description": "What a new lambda can start from, in the words of somebody who wants to build something",
      "items": {
        "$ref": "#/$defs/StarterResponse"
      }
    },
    "buildBytes": {
      "type": "integer",
      "description": "What a version of a free lambda may come to, its code and its resources together, in bytes",
      "format": "int64"
    },
    "deploymentLifetimeHours": {
      "type": "integer",
      "description": "How long a free lambda may go without a visit or an edit before it is taken offline, in hours",
      "format": "int32"
    },
    "retentionDays": {
      "type": "integer",
      "description": "How long a free lambda may go without a visit or an edit before it is deleted, in days",
      "format": "int32"
    },
    "imports": {
      "type": "array",
      "description": "The namespaces a lambda has imported without saying so",
      "items": {
        "type": "string"
      }
    },
    "completions": {
      "type": "array",
      "description": "The types, attributes and snippets the editor suggests while code is written",
      "items": {
        "$ref": "#/$defs/CompletionItem"
      }
    },
    "build": {
      "description": "Whether the build agent is on offer, and how often",
      "$ref": "#/$defs/BuildAvailability"
    },
    "lambdaUrl": {
      "type": "string",
      "description": "Where a lambda answers, with `{key}` where its public key goes: `https://{key}.genhttp.run/`"
    }
  },
  "$defs": {
    "BuildAvailability": {
      "type": "object",
      "description": "Whether this installation builds things, and how often it lets one caller.",
      "additionalProperties": false,
      "properties": {
        "available": {
          "type": "boolean",
          "description": "Whether builds can be asked for: there is an agent, and the operator has not switched building off"
        },
        "perDay": {
          "type": "integer",
          "description": "How many builds and changes one address may ask for in a day",
          "format": "int32"
        },
        "secondModel": {
          "type": "boolean",
          "description": "Whether a second model is on offer, behind a password"
        }
      }
    },
    "CompletionItem": {
      "type": "object",
      "description": "A name or a snippet the editor may suggest, whatever the code around it.",
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "description": "What is suggested: a type a lambda may use, an attribute, or the name of a snippet"
        },
        "kind": {
          "type": "string",
          "description": "What it is: `class`, `struct`, `interface`, `enum`, `attribute` or `snippet`"
        },
        "detail": {
          "type": "string",
          "description": "Where it comes from - the namespace of a type - or what a snippet does"
        },
        "insert": {
          "type": [
            "string",
            "null"
          ],
          "description": "For a snippet, the code to insert; absent where it is the label itself"
        }
      }
    },
    "StarterResponse": {
      "type": "object",
      "description": "Something a new lambda can be started from.",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "What to pass as `template` when creating the lambda"
        },
        "title": {
          "type": "string",
          "description": "What somebody would want to build, in their words"
        },
        "description": {
          "type": "string",
          "description": "What they would get"
        },
        "demo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where the demo it copies answers, to look at first; absent for the empty lambda"
        }
      }
    }
  }
}