{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pingwa-dev/json-schema/pingwa-dev-action-patch-schema.json",
  "title": "ActionPatch",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pingwa-dev-openapi.json#/components/schemas/ActionPatch",
  "properties": {
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label"
    },
    "target_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Url"
    },
    "confirm": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confirm"
    },
    "reply_ok": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1024
        },
        {
          "type": "null"
        }
      ],
      "title": "Reply Ok"
    },
    "kind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind"
    },
    "inputs": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ReportInput"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inputs"
    },
    "notify_owner": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "in_window",
            "always",
            "never"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Notify Owner"
    },
    "sign_query": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sign Query"
    },
    "near": {
      "anyOf": [
        {
          "$ref": "#/$defs/Near"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "$defs": {
    "Near": {
      "properties": {
        "lat": {
          "type": "number",
          "title": "Lat"
        },
        "lon": {
          "type": "number",
          "title": "Lon"
        },
        "radius_m": {
          "type": "number",
          "title": "Radius M"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "lat",
        "lon",
        "radius_m"
      ],
      "title": "Near",
      "description": "control-09: run only near this point: the tap asks for the person's location, and\na point within radius_m metres (haversine) runs it (near.py)."
    },
    "ReportInput": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text",
            "number",
            "choice",
            "location",
            "photo"
          ],
          "title": "Type"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "required": {
          "type": "boolean",
          "title": "Required",
          "default": true
        },
        "options": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Options"
        }
      },
      "type": "object",
      "required": [
        "type",
        "label"
      ],
      "title": "ReportInput",
      "description": "control-06: one question of a report action, asked after the tap in this order."
    }
  }
}