{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/samva-dev/json-schema/samva-dev-send-feedback-schema.json",
  "title": "SendFeedback",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/samva-dev-feedback-api-openapi.yml#/components/schemas/SendFeedback",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "maxLength": 4000,
      "pattern": "\\S",
      "description": "What happened and what you expected, in plain language (at most 4000 characters).",
      "x-samva-string-checks": [
        {
          "id": "effect/schema/isMaxLength",
          "payload": {
            "maxLength": 4000
          }
        }
      ]
    },
    "category": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "bug",
            "confusing",
            "missing",
            "other"
          ],
          "description": "`bug`: the API behaved wrongly. `confusing`: a response, error, or doc was hard to act on. `missing`: a capability or field you needed does not exist. `other`: anything else."
        },
        {
          "type": "null"
        }
      ]
    },
    "context": {
      "anyOf": [
        {
          "$ref": "#/$defs/FeedbackContext"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "message"
  ],
  "additionalProperties": false,
  "$defs": {
    "FeedbackContext": {
      "type": "object",
      "properties": {
        "operation": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The operation the report is about, as an SDK method, MCP tool, CLI command, or `METHOD /path` (for example `POST /v1/messages`).",
              "x-samva-string-checks": [
                {
                  "id": "effect/schema/isMaxLength",
                  "payload": {
                    "maxLength": 200
                  }
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "resourceId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The id of the resource involved, such as a message or domain id.",
              "x-samva-string-checks": [
                {
                  "id": "effect/schema/isMaxLength",
                  "payload": {
                    "maxLength": 200
                  }
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    }
  }
}