{"openapi":"3.1.0","info":{"title":"Chuyên Chọn API Gateway","version":"1.0.0","description":"Public edge contract for the Chuyên Chọn learning ecosystem. Domain endpoints are activated incrementally behind the gateway."},"servers":[{"url":"https://api.chuyenchon.com","description":"Production"}],"tags":[{"name":"Operations","description":"Liveness and release metadata"},{"name":"Catalog","description":"Public, cacheable learning package metadata"}],"paths":{"/health":{"get":{"tags":["Operations"],"summary":"Worker liveness","operationId":"getHealth","responses":{"200":{"description":"Gateway is alive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/ready":{"get":{"tags":["Operations"],"summary":"Gateway readiness","operationId":"getReadiness","responses":{"200":{"description":"Configured dependencies are ready"},"503":{"description":"A required dependency is unavailable"}}}},"/version":{"get":{"tags":["Operations"],"summary":"Release metadata","operationId":"getVersion","responses":{"200":{"description":"Current gateway release"}}}},"/v1/packages":{"get":{"tags":["Catalog"],"summary":"List active package metadata","operationId":"listPackages","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"A cursor-paginated package collection"}}}},"/v1/packages/{packageId}":{"get":{"tags":["Catalog"],"summary":"Get active package metadata","operationId":"getPackage","parameters":[{"name":"packageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published package metadata"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"schemas":{"Health":{"type":"object","required":["status","service","timestamp","request_id"],"properties":{"status":{"const":"ok"},"service":{"const":"api-gateway"},"timestamp":{"type":"string","format":"date-time"},"request_id":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id","details"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"array","items":{}},"documentation_key":{"type":"string"}}}}}},"responses":{"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}