{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://metkagram.github.io/api/v1/schemas/pattern.json",
  "title": "Metkagram Advanced Pattern",
  "type": "object",
  "required": [
    "id",
    "group_id",
    "set_id",
    "title_ru",
    "langs"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "group_id": {
      "type": "string"
    },
    "set_id": {
      "type": "string"
    },
    "title_ru": {
      "type": "string"
    },
    "metaphor_ru": {
      "type": "string"
    },
    "langs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "lang",
          "formula",
          "example",
          "translation",
          "examples"
        ],
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "en",
              "de"
            ]
          },
          "formula": {
            "type": "string"
          },
          "example": {
            "type": "string"
          },
          "translation": {
            "type": "string"
          },
          "examples": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "text",
                "translation_ru"
              ],
              "properties": {
                "text": {
                  "type": "string"
                },
                "translation_ru": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "formulas": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "gen": {
      "type": "object"
    }
  }
}
