{
  "openapi": "3.1.0",
  "info": {
    "title": "واجهة منصة الصحة النفسية وذوي الاحتياجات الخاصة",
    "version": "1.3.0",
    "description": "واجهة قراءة عامة ثابتة لاكتشاف أقسام المنصة وسجل المصادر المرشحة وموارد التقنيات المساعدة وأطر الجودة والتحقق من التعليم المستمر وعقد استيراد بيانات الدورات المخولة. لا تتضمن تشخيصًا أو بيانات شخصية.",
    "license": {"name": "Rights vary by resource"}
  },
  "servers": [
    {"url": "https://healthrenewal.org"}
  ],
  "paths": {
    "/api/v1/platform.json": {
      "get": {
        "summary": "اكتشاف المنصة والموارد",
        "operationId": "getPlatform",
        "responses": {
          "200": {
            "description": "بيانات المنصة",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Platform"}}}
          }
        }
      }
    },
    "/api/source-registry.json": {
      "get": {
        "summary": "سجل المصادر الرسمية المرشحة ومسارات التكامل",
        "description": "سجل تحريري مستقل يوضح الرابط الرسمي والاستخدام المقصود وحالة مراجعة الحقوق. الإدراج لا يعني شراكة أو اعتمادًا، والحالة candidate تسمح بالاكتشاف والربط المبدئي فقط.",
        "operationId": "getSourceRegistry",
        "responses": {
          "200": {
            "description": "سجل المصادر وحالة الحوكمة",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SourceRegistry"}}}
          }
        }
      }
    },
    "/api/v1/assistive-technology-resources.json": {
      "get": {
        "summary": "فهرس عربي لمصادر التقنيات المساعدة الرسمية",
        "description": "فهرس تحريري مستقل يربط بالمصادر الرسمية المنشورة لدى RESNA دون إعادة نشر المعايير أو الأوراق أو الدورات المحمية ودون ادعاء اعتماد أو شراكة.",
        "operationId": "getAssistiveTechnologyResources",
        "responses": {
          "200": {
            "description": "دليل مصادر التقنيات المساعدة وسياسات استخدامها",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AssistiveTechnologyResourceCatalog"}}}
          }
        }
      }
    },
    "/api/v1/assistive-technology-quality-framework.json": {
      "get": {
        "summary": "إطار جودة وأخلاقيات خدمات وابتكارات التقنيات المساعدة",
        "description": "مبادئ أخلاقية ومراحل خدمة وبوابات مراجعة ابتكار وإشارات توقف، بصيغة قابلة للقراءة آليًا.",
        "operationId": "getAssistiveTechnologyQualityFramework",
        "responses": {
          "200": {
            "description": "إطار الجودة والأخلاقيات",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AssistiveTechnologyQualityFramework"}}}
          }
        }
      }
    },
    "/api/v1/resna-ce-providers.json": {
      "get": {
        "summary": "دليل تحقق تحريري لمزودي التعليم المستمر الرسميين لدى RESNA",
        "description": "لقطة مؤرخة من الدليل الرسمي مع حقول التحقق المطلوبة لكل دورة وتنبيه أن اعتماد المزود لا يعني اعتماد جميع دوراته.",
        "operationId": "getResnaContinuingEducationProviders",
        "responses": {
          "200": {
            "description": "مزودو التعليم المستمر وقواعد التحقق",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResnaContinuingEducationProviders"}}}
          }
        }
      }
    },
    "/api/v1/courses.schema.json": {
      "get": {
        "summary": "مخطط تغذية الدورات المخولة",
        "operationId": "getCourseSchema",
        "responses": {"200": {"description": "JSON Schema لاستيراد الدورات"}}
      }
    },
    "/api/v1/courses.example.json": {
      "get": {
        "summary": "مثال غير إنتاجي لتغذية الدورات",
        "operationId": "getCourseExample",
        "responses": {"200": {"description": "مثال توضيحي لا يمثل شراكة فعلية"}}
      }
    }
  },
  "components": {
    "schemas": {
      "Platform": {
        "type": "object",
        "required": ["apiVersion", "name", "baseUrl", "resources", "endpoints"],
        "properties": {
          "apiVersion": {"type": "string"},
          "name": {"type": "string"},
          "baseUrl": {"type": "string", "format": "uri"},
          "resources": {"type": "array", "items": {"type": "object"}},
          "endpoints": {"type": "object"}
        }
      },
      "SourceRegistry": {
        "type": "object",
        "required": ["schema_version", "updated_at", "relationship_policy", "disclaimer_ar", "sources"],
        "properties": {
          "schema_version": {"type": "string"},
          "updated_at": {"type": "string", "format": "date"},
          "relationship_policy": {"type": "string", "const": "independent_source_candidate_not_partner"},
          "disclaimer_ar": {"type": "string"},
          "sources": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": ["id", "name", "name_ar", "url", "category", "intended_use", "status", "rights_review", "contacted_at"],
              "properties": {
                "id": {"type": "string"},
                "name": {"type": "string"},
                "name_ar": {"type": "string"},
                "url": {"type": "string", "format": "uri"},
                "category": {"type": "string"},
                "intended_use": {"type": "string"},
                "status": {"type": "string", "enum": ["candidate", "approved", "suspended"]},
                "rights_review": {"type": "string", "enum": ["pending", "approved", "restricted", "not_applicable"]},
                "contacted_at": {"type": "string", "format": "date"}
              }
            }
          }
        }
      },
      "AssistiveTechnologyResourceCatalog": {
        "type": "object",
        "required": ["schemaVersion", "generatedAt", "language", "title", "canonicalPage", "disclaimer", "resources", "editorialRules"],
        "properties": {
          "schemaVersion": {"type": "string"},
          "generatedAt": {"type": "string", "format": "date-time"},
          "language": {"type": "string", "const": "ar"},
          "title": {"type": "string"},
          "canonicalPage": {"type": "string", "format": "uri"},
          "disclaimer": {"type": "string"},
          "publisher": {"type": "object"},
          "sourceOrganization": {"type": "object"},
          "resources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "type", "titleAr", "titleEn", "url", "access", "recommendedUse"],
              "properties": {
                "id": {"type": "string"},
                "type": {"type": "string"},
                "titleAr": {"type": "string"},
                "titleEn": {"type": "string"},
                "url": {"type": "string", "format": "uri"},
                "access": {"type": "string"},
                "topics": {"type": "array", "items": {"type": "string"}},
                "recommendedUse": {"type": "array", "items": {"type": "string"}},
                "doNot": {"type": "array", "items": {"type": "string"}}
              }
            }
          },
          "editorialRules": {"type": "array", "items": {"type": "string"}}
        }
      },
      "AssistiveTechnologyQualityFramework": {
        "type": "object",
        "required": ["schemaVersion", "generatedAt", "title", "canonicalPages", "disclaimer", "ethicsPrinciples", "serviceStages", "innovationGates", "stopSignals"],
        "properties": {
          "schemaVersion": {"type": "string"},
          "generatedAt": {"type": "string", "format": "date-time"},
          "title": {"type": "string"},
          "canonicalPages": {"type": "object"},
          "sourceOrganization": {"type": "object"},
          "disclaimer": {"type": "string"},
          "ethicsPrinciples": {"type": "array", "items": {"type": "object"}},
          "serviceStages": {"type": "array", "items": {"type": "string"}},
          "innovationGates": {"type": "array", "items": {"type": "string"}},
          "publicationStatuses": {"type": "array", "items": {"type": "object"}},
          "stopSignals": {"type": "array", "items": {"type": "string"}},
          "officialSources": {"type": "array", "items": {"type": "string", "format": "uri"}}
        }
      },
      "ResnaContinuingEducationProviders": {
        "type": "object",
        "required": ["schemaVersion", "generatedAt", "lastChecked", "title", "officialDirectory", "disclaimer", "providers", "requiredCourseVerificationFields"],
        "properties": {
          "schemaVersion": {"type": "string"},
          "generatedAt": {"type": "string", "format": "date-time"},
          "lastChecked": {"type": "string", "format": "date"},
          "title": {"type": "string"},
          "canonicalPage": {"type": "string", "format": "uri"},
          "officialDirectory": {"type": "string", "format": "uri"},
          "disclaimer": {"type": "string"},
          "providers": {"type": "array", "items": {"type": "object", "required": ["id", "name", "verificationStatus"]}},
          "requiredCourseVerificationFields": {"type": "array", "items": {"type": "string"}},
          "prohibitedClaimsWithoutEventEvidence": {"type": "array", "items": {"type": "string"}},
          "officialSources": {"type": "array", "items": {"type": "string", "format": "uri"}}
        }
      }
    }
  }
}
