{
  "openapi": "3.1.0",
  "info": {
    "title": "KFS Analytics Catcher Feedback API",
    "version": "1.0.0",
    "description": "Public endpoint for submitting game feedback."
  },
  "paths": {
    "/api/feedback": {
      "post": {
        "summary": "Submit feedback",
        "description": "Creates a new feedback record for a game build and platform.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackSubmission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Feedback was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackSubmitResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FeedbackSubmission": {
        "type": "object",
        "required": ["game_name", "game_version", "platform", "feedback_text"],
        "properties": {
          "game_name": {
            "type": "string",
            "maxLength": 255
          },
          "game_version": {
            "type": "string",
            "maxLength": 255
          },
          "platform": {
            "type": "string",
            "maxLength": 255
          },
          "contact_email": {
            "type": "string",
            "maxLength": 255
          },
          "feedback_text": {
            "type": "string",
            "maxLength": 20000
          }
        }
      },
      "FeedbackRecord": {
        "type": "object",
        "properties": {
          "feedback_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "game_name": {
            "type": "string"
          },
          "game_version": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "contact_email": {
            "type": "string"
          },
          "feedback_text": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "is_acknowledged": {
            "type": "boolean"
          },
          "is_deleted": {
            "type": "boolean"
          }
        }
      },
      "FeedbackSubmitResponse": {
        "type": "object",
        "properties": {
          "res": {
            "type": "string",
            "enum": ["ok"]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedbackRecord"
            }
          }
        }
      }
    }
  }
}
