{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/misata-studio/json-schema/misata-studio-revision-request-schema.json",
  "title": "RevisionRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/misata-studio-openapi.json#/components/schemas/RevisionRequest",
  "properties": {
    "instruction": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "minLength": 3
        },
        {
          "type": "null"
        }
      ],
      "title": "Instruction",
      "description": "What to change, in words, as a person would say it (\"half as many customers\", \"refunds rarer in December\"). Needs a model: the revision says what it was read as and what changed"
    },
    "story": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Story",
      "description": "A template dataset's story with new stated months, rates or events (GET /v1/datasets/{id}/story, edited): made again on the same template and seed"
    },
    "curves": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "maxItems": 4
        },
        {
          "type": "null"
        }
      ],
      "title": "Curves",
      "description": "Curves the data should follow instead: [{metric, points: {YYYY-MM: value}, target?, time?, measure?}]; [] removes them"
    },
    "controls": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Controls",
      "description": "Controls to set, by name, as GET /v1/datasets/{id}/controls lists them"
    },
    "webhook_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url",
      "description": "An https address told when the revision ends (signed, as a build's webhook is)"
    }
  },
  "type": "object"
}