{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://openbeautystandard.org/schema/0.9/search-response.schema.json",
 "title": "OBS search response",
 "type": "object",
 "required": [],
 "properties": {
  "obs_version": {
   "$ref": "common.schema.json#/$defs/obs_version"
  },
  "registry_release": {
   "type": "string"
  },
  "results": {
   "type": "array",
   "items": {
    "$ref": "result.schema.json"
   },
   "description": "each an offering plus match_status and match_notes"
  },
  "answered_as": {
   "oneOf": [
    {
     "$ref": "common.schema.json#/$defs/code"
    },
    {
     "type": "null"
    }
   ],
   "description": "the code the search used (a retired or unknown code answers as its replacement or nearest known parent)"
  },
  "expand": {
   "type": "string"
  },
  "notes": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "what was ignored, assumed or answered differently"
  },
  "unsupported_facets": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "facets asked for that the concept does not have; ignored"
  },
  "next_cursor": {
   "oneOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "availability": {
   "const": "not_included",
   "description": "an offering is not an open appointment"
  },
  "error": {
   "$ref": "common.schema.json#/$defs/error"
  }
 },
 "oneOf": [
  {
   "required": [
    "results"
   ]
  },
  {
   "required": [
    "error"
   ]
  }
 ],
 "$defs": {}
}
