json2tests 0.3.0

Macro to generate your Rust tests from a provided JSON file
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/niri81/json2tests-rs/refs/heads/main/schema.json",
  "title": "Test Cases Schema",
  "description": "Schema for a collection of named test vectors.",
  "type": "object",
  "properties": {
    "testcases": {
      "description": "An object where keys are the test names and values are the test vectors.",
      "type": "object",
      "additionalProperties": {
        "title": "Test Vector",
        "type": "object",
        "properties": {
          "action": {
            "description": "The operation to be performed, e.g., 'add'.",
            "type": "string"
          },
          "arguments": {
            "description": "The input data for the action.",
            "additionalProperties": true
          },
          "result": {
            "description": "The expected result of the action."
          },
          "panic": {
            "description": "The test is expected to panic. When supplied with a string, the panic message will be checked against it.",
            "type": ["boolean", "string"]
          }
        },
        "required": ["action"],
        "additionalProperties": false
      },
      "minProperties": 1
    }
  },
  "required": ["testcases"],
  "additionalProperties": false
}