{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/krimskrams-xyz/json-schema/krimskrams-xyz-review-submission-schema.json",
  "title": "ReviewSubmission",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/route-catalog_krimskrams_xyz_openapi.json#/components/schemas/ReviewSubmission",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2083,
      "minLength": 1,
      "format": "uri",
      "title": "Url"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "HEAD"
      ],
      "title": "Method"
    },
    "rail": {
      "type": "string",
      "enum": [
        "x402",
        "mpp"
      ],
      "title": "Rail"
    },
    "rating": {
      "type": "integer",
      "maximum": 5.0,
      "minimum": 1.0,
      "title": "Rating"
    },
    "dimensions": {
      "anyOf": [
        {
          "$ref": "#/$defs/ReviewDimensions"
        },
        {
          "type": "null"
        }
      ]
    },
    "task": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Task"
    },
    "text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 800
        },
        {
          "type": "null"
        }
      ],
      "title": "Text"
    },
    "tx_hash": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "pattern": "^0x[0-9a-fA-F]{64}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tx Hash"
    },
    "payer_address": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payer Address"
    },
    "signature": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000,
          "pattern": "^0x[0-9a-fA-F]+$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Signature"
    },
    "signed_at": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "title": "Signed At"
    },
    "website": {
      "type": "string",
      "maxLength": 200,
      "title": "Website",
      "default": ""
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "url",
    "method",
    "rail",
    "rating"
  ],
  "$defs": {
    "ReviewDimensions": {
      "properties": {
        "docs_quality": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 5.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Docs Quality"
        },
        "payment_flow": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 5.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Payment Flow"
        },
        "response_quality": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 5.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Response Quality"
        },
        "reliability": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 5.0,
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Reliability"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ReviewDimensions"
    }
  }
}