MyJSON
Power tools

Schema (Validate / Library / Mock / Tool export)

A small JSON Schema workbench inside MyJSON.

Schema tab. Four sub-tabs: Validate, Library, Mock data, Export as AI tool.

Validate

Live Ajv-powered validation. Edit the schema on the left, see violations on the right with keyword + path + message. Click `Infer from document` to generate a schema from your current editor. The `All required` checkbox controls whether sampled keys become required by default — turn it off for the optional-by-default behavior most teams prefer.

Library

Curated schemas for common APIs and configs — Stripe webhook, GitHub push, K8s Deployment, package.json, OpenAPI 3.x, tsconfig, Docker Compose, vercel.json. Clicking a card loads the schema AND a matching example into the editor so validation lights up immediately.

Mock data

Generate fake data that conforms to the schema, using `json-schema-faker`. Format hints (`email`, `uri`, `uuid`, `date-time`) produce realistic values. Pick 1 / 5 / 10 / 100 records; copy or download as JSON.

Export as AI tool

Turn your schema into a function-calling / tool-use definition for Anthropic, OpenAI, Gemini, Mistral, Cohere, Vercel AI SDK, or LangChain. Includes warnings for anti-patterns like missing descriptions or `additionalProperties: true` with strict mode.

Examples

Validate a Stripe payment_intent against the canonical schema

You're not sure your webhook handler covers every field.

  1. Schema tab → Library sub-tab.
  2. Click `Stripe webhook event`.
  3. Editor loads the example; right pane shows `Valid ✓`.
  4. Edit the editor to mismatch — violations appear in real time.

Generate test fixtures

Your tests need 50 user records that conform to your User schema.

  1. Paste your schema into the editor.
  2. Switch to the Mock data sub-tab.
  3. Click `100` (close enough), copy or download.
  4. Drop the JSON into your fixtures folder.

Wire a tool into Claude

You have a JSON Schema for a function's parameters and want the Anthropic tool format.

  1. Schema tab → Export as AI tool.
  2. Set name + description.
  3. Pick `Anthropic` format.
  4. Copy the resulting `{ name, description, input_schema }` block.