{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/remem-me/json-schema/remem-me-verse-schema.json",
  "title": "Verse",
  "description": "Serializer for Verse model with batch FK validation.\n\nValidates 'origin' and 'tags' foreign keys in batch during bulk operations\nto prevent N+1 queries. Invalid origin FKs are auto-nullified and invalid\ntag IDs are filtered out rather than rejected to support offline-first\nreplication (see ReplicableSerializer docstring).",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/remem-me-openapi.yml#/components/schemas/Verse",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "modified": {
      "type": "integer",
      "maximum": 9223372036854775807,
      "minimum": -9223372036854775808,
      "format": "int64"
    },
    "modified_by": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 36
    },
    "deleted": {
      "type": "boolean"
    },
    "account": {
      "type": "integer",
      "maximum": 9223372036854775807,
      "minimum": -9223372036854775808,
      "format": "int64"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "integer",
        "maximum": 9223372036854775807,
        "minimum": -9223372036854775808,
        "format": "int64"
      }
    },
    "reference": {
      "type": "string",
      "maxLength": 500
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 250
    },
    "topic": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "passage": {
      "type": "string",
      "maxLength": 100000
    },
    "review": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "commit": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "level": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "image": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1500
    },
    "note": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 10000
    },
    "shared": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "link": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1500
    },
    "origin": {
      "type": [
        "integer",
        "null"
      ],
      "maximum": 9223372036854775807,
      "minimum": -9223372036854775808,
      "format": "int64",
      "description": "Source entity if this is a subscription copy"
    },
    "origin_refreshed": {
      "type": [
        "integer",
        "null"
      ],
      "maximum": 9223372036854775807,
      "minimum": -9223372036854775808,
      "format": "int64",
      "description": "Timestamp (ms) of last sync. Null = user customized"
    }
  },
  "required": [
    "account",
    "id",
    "passage",
    "reference"
  ]
}