{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/boston/refs/heads/main/json-schema/boston-wordpress-schemas.json",
  "title": "Boston University WordPress REST API schemas",
  "description": "Schemas for the Boston University-operated WordPress REST API at https://www.bu.edu/wp-json. The error envelope and the page summary were captured verbatim from live anonymous responses on 2026-08-30. Boston University publishes no response schemas for these routes, so nothing beyond what was observed is described here.",
  "x-provenance": {
    "generated": "2026-08-30",
    "method": "derived",
    "source": "live responses from https://www.bu.edu/wp-json/ (wp/v2/pages, bu-slideshow/v1/shows) captured 2026-08-30",
    "x-operator": "institution"
  },
  "$defs": {
    "RestError": {
      "type": "object",
      "title": "WordPress REST error",
      "description": "Captured verbatim from https://www.bu.edu/wp-json/bu-slideshow/v1/shows (HTTP 401).",
      "properties": {
        "code": { "type": "string", "examples": ["rest_forbidden", "rest_no_route"] },
        "message": { "type": "string", "examples": ["Sorry, you are not allowed to do that."] },
        "data": {
          "type": "object",
          "properties": { "status": { "type": "integer", "examples": [401, 404] } },
          "required": ["status"]
        }
      },
      "required": ["code", "message", "data"],
      "additionalProperties": true
    },
    "PageSummary": {
      "type": "object",
      "title": "WordPress page summary",
      "description": "Field set observed from GET /wp/v2/pages?per_page=1&_fields=id,slug,link,type,status,date_gmt,title on 2026-08-30. This is a projection requested with _fields, not the full page object.",
      "properties": {
        "id": { "type": "integer", "examples": [456783] },
        "date_gmt": { "type": "string", "format": "date-time", "examples": ["2026-07-30T05:13:00"] },
        "slug": { "type": "string", "examples": ["summer-2026"] },
        "status": { "type": "string", "examples": ["publish"] },
        "type": { "type": "string", "examples": ["page"] },
        "link": { "type": "string", "format": "uri", "examples": ["https://www.bu.edu/bostonia/summer-2026/"] },
        "title": {
          "type": "object",
          "properties": { "rendered": { "type": "string", "examples": ["Summer 2026"] } }
        }
      },
      "additionalProperties": true
    },
    "NamespaceDiscovery": {
      "type": "object",
      "title": "WordPress REST namespace discovery document",
      "description": "Shape returned by GET /{namespace} on www.bu.edu, e.g. /bu-alert/v1. Observed 2026-08-30.",
      "properties": {
        "namespace": { "type": "string", "examples": ["bu-alert/v1"] },
        "routes": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "namespace": { "type": "string" },
              "methods": { "type": "array", "items": { "type": "string" } },
              "endpoints": { "type": "array", "items": { "type": "object" } }
            }
          }
        },
        "_links": { "type": "object" }
      },
      "additionalProperties": true
    }
  }
}
