{
  "slug": "json-schema-to-sample",
  "name": "gizza-ai/json-schema-to-sample",
  "version": "0.1.0",
  "title": "JSON Schema to Sample JSON — Example Instance Generator — gizza.ai",
  "description": "Paste a JSON Schema and get a minimal valid example JSON instance. Honors required, default, const, enum, examples, $ref, allOf and formats. Runs in your browser.",
  "tags": [
    "json schema to json",
    "json schema example generator",
    "sample json from schema",
    "json schema to sample",
    "example json instance",
    "openapi example generator",
    "json schema sample data",
    "api docs example"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/json-schema-to-sample/",
    "markdown": "https://gizza.ai/tools/json-schema-to-sample/index.md",
    "descriptor": "https://gizza.ai/tools/json-schema-to-sample/tool.json",
    "deep_link_example": "https://gizza.ai/tools/json-schema-to-sample/?schema=%7B%0A%20%20%22type%22%3A%20%22object%22%2C%0A%20%20%22properties%22%3A%20%7B%0A%20%20%20%20%22id%22%3A%20%7B%20%22type%22%3A%20%22integer%22%2C%20%22minimum%22%3A%201%20%7D%2C%0A%20%20%20%20%22email%22%3A%20%7B%20%22type%22%3A%20%22string%22%2C%20%22format%22%3A%20%22email%22%20%7D%2C%0A%20%20%20%20%22role%22%3A%20%7B%20%22enum%22%3A%20%5B%22admin%22%2C%20%22user%22%5D%20%7D%0A%20%20%7D%2C%0A%20%20%22required%22%3A%20%5B%22id%22%2C%20%22email%22%5D%0A%7D&include_optional=true&array_items=1&pretty=true"
  },
  "cli": "gizza tool json-schema-to-sample '{\n  \"type\": \"object\",\n  \"properties\": {\n    \"id\": { \"type\": \"integer\", \"minimum\": 1 },\n    \"email\": { \"type\": \"string\", \"format\": \"email\" },\n    \"role\": { \"enum\": [\"admin\", \"user\"] }\n  },\n  \"required\": [\"id\", \"email\"]\n}'",
  "tool": {
    "description": "Generate the smallest JSON document that satisfies a JSON Schema, for API docs, fixtures and request bodies. Honours const, default, examples and enum in that order, emits required properties only unless include_optional is set, resolves local $ref into $defs/definitions, merges allOf, takes the first oneOf/anyOf branch, and respects string formats (email, uuid, date-time, uri, ipv4, ...), length/range/multipleOf bounds and array item bounds. Fully deterministic: the same schema always yields the same sample. pattern, if/then/else, not, dependentSchemas and remote $refs are not synthesised.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "array_items": {
          "default": 1,
          "description": "How many entries to put in an array that has no minItems of its own (0-50, default 1). A larger minItems always wins, and maxItems still caps the result.",
          "maximum": 50,
          "minimum": 0,
          "type": "integer"
        },
        "include_optional": {
          "default": false,
          "description": "Include optional properties as well as required ones. Default false, so the sample stays minimal: only required properties plus any property that declares a default.",
          "type": "boolean"
        },
        "pretty": {
          "default": true,
          "description": "Pretty-print the sample with 2-space indentation. Turn off for one compact line.",
          "type": "boolean"
        },
        "schema": {
          "description": "The JSON Schema to build an example for (draft-07 / 2019-09 / 2020-12). Supported: type, properties, required, default, const, enum, examples, string format, minLength/maxLength, minimum/maximum/exclusive bounds, multipleOf, items/prefixItems/minItems/maxItems/uniqueItems, allOf (merged), oneOf/anyOf (first branch), and local $ref into $defs or definitions. Example: {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\"}},\"required\":[\"id\"]}",
          "type": "string"
        }
      },
      "required": [
        "schema"
      ],
      "type": "object"
    }
  }
}