{"openapi":"3.1.0","info":{"title":"MathsGenie Public API","version":"1.0.0","description":"A read-only, unauthenticated discovery API for canonical public MathsGenie revision resources. Student accounts, progress, purchases, marking, and classroom data are not exposed.","contact":{"name":"MathsGenie support","email":"hello@mathsgenie.co.uk","url":"https://mathsgenie.co.uk/contact"}},"servers":[{"url":"https://mathsgenie.co.uk"}],"tags":[{"name":"Resources","description":"Canonical public revision-resource discovery."}],"paths":{"/api/public/v1/resources":{"get":{"operationId":"listPublicResources","summary":"List public revision resources","description":"Returns a curated list of canonical MathsGenie resource URLs. Optionally filter the list by qualification.","tags":["Resources"],"parameters":[{"name":"qualification","in":"query","required":false,"description":"Only return resources for this qualification.","schema":{"type":"string","enum":["gcse","igcse","a-level","as-level","international-a-level","international-as-level","ks2"]}}],"responses":{"200":{"description":"A list of canonical public resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceListResponse"}}}},"400":{"description":"A structured error with a stable code and resolution hint.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"Resource":{"type":"object","additionalProperties":false,"required":["id","name","description","qualification","url"],"properties":{"id":{"type":"string","description":"Stable resource identifier."},"name":{"type":"string","description":"Human-readable resource name."},"description":{"type":"string","description":"Short description of what the public page contains."},"qualification":{"oneOf":[{"type":"string","enum":["gcse","igcse","a-level","as-level","international-a-level","international-as-level","ks2"]},{"type":"null"}],"description":"Qualification scope, or null for cross-qualification resources."},"url":{"type":"string","format":"uri","description":"Canonical public URL."}}},"ResourceListResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Resource"}},"meta":{"type":"object","additionalProperties":false,"required":["count","documentationUrl","openapiUrl"],"properties":{"count":{"type":"integer","minimum":0},"documentationUrl":{"type":"string","format":"uri"},"openapiUrl":{"type":"string","format":"uri"}}}}},"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","hint","documentationUrl"],"properties":{"code":{"type":"string","enum":["invalid_parameter","method_not_allowed","not_found"]},"message":{"type":"string"},"hint":{"type":"string"},"documentationUrl":{"type":"string","format":"uri"}}}}}}}}