{
  "openapi": "3.1.0",
  "info": {
    "title": "Suyaq API",
    "version": "1.0.0",
    "description": "برومبتات وأكواد عربية بصيغة JSON ثابتة",
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://suyaq.com"
    }
  ],
  "paths": {
    "/api/v1/snippets.json": {
      "get": {
        "summary": "قائمة كل العناصر",
        "responses": {
          "200": {
            "description": "count وupdated وitems"
          }
        }
      }
    },
    "/api/v1/snippets/{id}.json": {
      "get": {
        "summary": "عنصر واحد",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "العنصر",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snippet"
                }
              }
            }
          },
          "404": {
            "description": "غير موجود"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Snippet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleEn": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "api": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "variableDetails": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "example": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}