{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thinair-co/json-schema/thinair-co-feedback-request-schema.json",
  "title": "FeedbackRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thinair-co-learning-api-openapi.yml#/components/schemas/FeedbackRequest",
  "type": "object",
  "properties": {
    "verdict": {
      "type": "string",
      "enum": [
        "accepted",
        "rejected",
        "corrected"
      ],
      "description": "Your judgement of the subject result."
    },
    "subject_event_id": {
      "type": "string",
      "description": "Event id of the result you're commenting on (or provide tool + query_text)."
    },
    "tool": {
      "type": "string"
    },
    "query_text": {
      "type": "string"
    },
    "subject_entity_id": {
      "type": "string",
      "description": "Stable id the feedback is about."
    },
    "correction": {
      "type": "object",
      "properties": {
        "entity_id": {
          "type": "string"
        },
        "label": {
          "type": "string",
          "maxLength": 120
        },
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "note": {
          "type": "string",
          "maxLength": 500,
          "description": "Free-text note for human review — never sent to analytics."
        }
      },
      "description": "Required when verdict is 'corrected' (entity_id, label, or lat+lon)."
    },
    "feedback_source": {
      "type": "string",
      "enum": [
        "user",
        "agent",
        "automated_validator",
        "support"
      ]
    }
  },
  "required": [
    "verdict"
  ]
}