{"openapi":"3.1.0","info":{"title":"search-service","description":"","license":{"name":""},"version":"0.1.0"},"paths":{"/api/v1/changes":{"get":{"tags":[],"operationId":"changes","responses":{"200":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/episodes":{"get":{"tags":[],"operationId":"list_episodes","responses":{"200":{"description":""}}}},"/api/v1/episodes/{slug}":{"get":{"tags":[],"operationId":"get_episode","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/episodes/{slug}/transcript":{"get":{"tags":[],"operationId":"transcript","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/fetch":{"get":{"tags":[],"operationId":"fetch","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/health":{"get":{"tags":[],"operationId":"health","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/people":{"get":{"tags":[],"operationId":"list_people","responses":{"200":{"description":""}}}},"/api/v1/people/{id}":{"get":{"tags":[],"operationId":"get_person","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/products":{"get":{"tags":[],"operationId":"list_products","responses":{"200":{"description":""}}}},"/api/v1/products/{id}":{"get":{"tags":[],"operationId":"get_product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/search":{"get":{"tags":[],"operationId":"search","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}}},"components":{"schemas":{"ContextResponse":{"type":"object","required":["turns"],"properties":{"next_start_sec":{"type":["integer","null"],"format":"int32","minimum":0},"turns":{"type":"array","items":{"$ref":"#/components/schemas/ContextTurn"}}}},"ContextTurn":{"type":"object","required":["start_sec","speaker_id","text","timestamp_url","source","kind","url"],"properties":{"author":{"type":["string","null"]},"end_sec":{"type":["integer","null"],"format":"int32","minimum":0},"kind":{"type":"string"},"person_md_url":{"type":["string","null"]},"person_url":{"type":["string","null"]},"source":{"type":"string"},"speaker":{"type":["string","null"]},"speaker_id":{"type":"string"},"start_sec":{"type":"integer","format":"int32","minimum":0},"text":{"type":"string"},"timestamp_url":{"type":"string"},"url":{"type":"string"}}},"EpisodeSummary":{"type":"object","required":["slug","number","title","published_at","url"],"properties":{"number":{"type":"integer","format":"int32","minimum":0},"published_at":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}}},"ErrorBody":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"FetchResponse":{"type":"object","required":["id","title","text","url","metadata"],"properties":{"id":{"type":"string"},"metadata":{},"text":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}}},"FragmentProvenance":{"type":"object","required":["source","kind","url"],"properties":{"author":{"type":["string","null"]},"kind":{"type":"string"},"source":{"type":"string"},"speaker_id":{"type":["string","null"]},"url":{"type":"string"}}},"HealthResponse":{"type":"object","required":["status","build_id","schema_version","episodes","turns","counts","loaded_at"],"properties":{"build_id":{"type":"string"},"counts":{},"episodes":{"type":"integer","minimum":0},"loaded_at":{"type":"string"},"schema_version":{"type":"integer","format":"int32","minimum":0},"status":{"type":"string"},"turns":{"type":"integer","minimum":0}}},"SearchMatch":{"type":"object","required":["kind","text","source","url"],"properties":{"author":{"type":["string","null"]},"context_after":{"type":["string","null"]},"context_after_provenance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FragmentProvenance"}]},"context_before":{"type":["string","null"]},"context_before_provenance":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FragmentProvenance"}]},"end_sec":{"type":["integer","null"],"format":"int32","minimum":0},"kind":{"type":"string"},"person_md_url":{"type":["string","null"]},"person_url":{"type":["string","null"]},"source":{"type":"string"},"speaker":{"type":["string","null"]},"speaker_id":{"type":["string","null"]},"start_sec":{"type":["integer","null"],"format":"int32","minimum":0},"text":{"type":"string"},"timecode":{"type":["string","null"]},"url":{"type":"string"}}},"SearchResponse":{"type":"object","required":["api_version","query","took_ms","total","results"],"properties":{"api_version":{"type":"string"},"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}},"took_ms":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}}},"SearchResult":{"type":"object","required":["episode","match","md_url","score"],"properties":{"chunk_id":{"type":["string","null"]},"episode":{"$ref":"#/components/schemas/EpisodeSummary"},"match":{"$ref":"#/components/schemas/SearchMatch"},"md_url":{"type":"string"},"score":{"type":"number","format":"double"},"timestamp_url":{"type":["string","null"]}}}}}}