{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://bedrocknews.com/schema/v1/article.json",
  "title": "BedrockNews GET /api/article/{id} response (v1)",
  "description": "Envelope returned by GET /api/article/{id}. By default `data` is the full ArticleView; with ?fields=grin (or an allowlisted comma-separated key list) it is a projection containing only the requested keys.",
  "type": "object",
  "required": ["schemaVersion", "data"],
  "additionalProperties": true,
  "properties": {
    "schemaVersion": {
      "type": "string",
      "description": "Contract version. MINOR bumps are additive/backward-compatible; a MAJOR bump ships a new /schema/{major}/ path.",
      "examples": ["1.0"]
    },
    "data": {
      "description": "The article + its analysis. Default: the full ArticleView. With ?fields=: a projection containing only the requested keys (no field guaranteed).",
      "anyOf": [
        { "$ref": "https://bedrocknews.com/schema/v1/article-view.json" },
        { "$ref": "https://bedrocknews.com/schema/v1/article-projection.json" }
      ]
    },
    "isSaved": {
      "type": "boolean",
      "description": "Whether the authenticated caller has bookmarked this article. Always false for anonymous requests."
    }
  }
}
