{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openhandle/json-schema/openhandle-test-data-entry-envelope-schema.json",
  "title": "TestDataEntryEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openhandle-test-data-api-openapi.yml#/components/schemas/TestDataEntryEnvelope",
  "additionalProperties": false,
  "properties": {
    "data": {
      "$ref": "#/$defs/TestDataEntry"
    }
  },
  "required": [
    "data"
  ],
  "type": "object",
  "$defs": {
    "TestDataEntry": {
      "additionalProperties": false,
      "properties": {
        "datasetVersion": {
          "minLength": 1,
          "type": "string"
        },
        "description": {
          "minLength": 1,
          "type": "string"
        },
        "expected": {
          "$ref": "#/$defs/TestDataExpectedResult"
        },
        "id": {
          "minLength": 1,
          "type": "string"
        },
        "inputs": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "label": {
          "minLength": 1,
          "type": "string"
        },
        "operationIds": {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "platform": {
          "enum": [
            "instagram",
            "tiktok",
            "twitter",
            "reddit"
          ],
          "type": "string"
        },
        "relationships": {
          "items": {
            "$ref": "#/$defs/TestDataRelationship"
          },
          "type": "array"
        },
        "resource": {
          "enum": [
            "profile",
            "post",
            "comment",
            "hashtag",
            "location",
            "music",
            "category",
            "list",
            "entity",
            "subreddit",
            "rule",
            "wiki",
            "trophy"
          ],
          "type": "string"
        },
        "synthetic": {
          "const": true,
          "type": "boolean"
        },
        "traits": {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "datasetVersion",
        "platform",
        "resource",
        "label",
        "description",
        "traits",
        "inputs",
        "expected",
        "relationships",
        "operationIds",
        "synthetic"
      ],
      "type": "object"
    },
    "TestDataExpectedResult": {
      "additionalProperties": false,
      "properties": {
        "errorCode": {
          "minLength": 1,
          "type": "string"
        },
        "status": {
          "enum": [
            200,
            403,
            404
          ],
          "type": "integer"
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "TestDataRelationship": {
      "additionalProperties": false,
      "properties": {
        "entryId": {
          "minLength": 1,
          "type": "string"
        },
        "type": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "type",
        "entryId"
      ],
      "type": "object"
    }
  }
}