{
  "$schema":"https://json-schema.org/draft/2020-12/schema",
  "$id":"https://investment-research-apis.pages.dev/samples/normalized-record.schema.json",
  "title":"Research record / version 1",
  "description":"Shape reference for the publication's offline adapters. This is not a provider schema or a guarantee of point-in-time data.",
  "type":"object",
  "required":["source","series","observation_date","observation_period","period_kind","value","unit","available_date","availability_basis","retrieved_at","revision_key","source_record"],
  "properties":{
    "source":{"enum":["fred","worldbank","sec"]},
    "series":{"type":"string","minLength":1},
    "observation_date":{"type":"string","format":"date"},
    "observation_period":{"type":"string","minLength":1},
    "period_kind":{"enum":["date","annual","instant"]},
    "value":{"type":["number","null"]},
    "unit":{"type":"string","minLength":1},
    "available_date":{"type":"string","format":"date"},
    "availability_basis":{"enum":["fred_realtime_date","retrieval_time","sec_filed_date"]},
    "retrieved_at":{"type":"string","format":"date-time","pattern":"Z$"},
    "revision_key":{"type":"string","minLength":1},
    "source_record":{"type":"string","minLength":1}
  },
  "$comment":"The adapter additionally checks calendar validity, source/basis/period compatibility, annual period mapping, availability <= retrieval date, finite values, duplicate revision keys and conflicting selected versions. JSON Schema shape validation alone does not implement those collection and temporal checks. source_record is a provenance locator, not the original raw response."
}
