Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

JSON Schema Diff

schema.diff_json_schema

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
File inputNo network

Overview

You send the old and the new version of a JSON Schema and we sort every difference into three buckets: breaking, non-breaking, and ambiguous. The yardstick is consumer-first backward compatibility — data written against the old schema should still validate against the new one. We look at type, required, properties, enum, the six size and range constraints, and additionalProperties, and every change comes back with the path where it happened. To check a payload against a schema, use schema.validate_json; to build a schema from sample data, use schema.infer_json_schema. Accepts file input via file_ref — no need to extract file content first.

Schemas keep moving, and the cost of a breaking change lands on whoever consumes your data. You get a deterministic verdict before you publish, instead of a support ticket afterwards.

Reliability

Deterministic: the same pair of schemas always yields the same diff in the same order. The verdict is consumer-first, so anything whose direction we cannot settle lands in ambiguous for you to judge. JSON_MALFORMED — trigger: one of the two schema documents is not parseable JSON; retryable: no, not as sent; next: run it through schema.repair_json, or fix the escaping, then call again. We also reject the call outright when a side has neither its inline field nor its file reference, when a schema is longer than 524288 characters, or when a referenced file is missing, unreadable, or over 5000000 bytes.

Context footprint

Each side accepts up to 524288 characters, inline or from a file reference; a file reference also saves you escaping JSON inside JSON. The response carries one small entry per change. A successful call costs 1 execution credit.

When to use it

Right before you publish a new version of a schema or an API contract, to see what the change does to existing consumers.

When you want to check data against a schema, merge two schemas together, or build a schema from sample documents.

Scope

Note
Two schemas in, one compatibility verdict out, with every difference sorted into breaking, non-breaking or ambiguous and pinned to the path where it happened.

Non-goals

  • We never check a document against a schema — that is schema.validate_json
  • We never merge the two schemas into a combined version
  • We never follow a remote $ref or fetch anything from the network

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input512 KBMax file size4.8 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file4.8 MiBSkill maximum

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
oldSchemastringNoOld schema as JSON text, 1 to 524288 characters. Required unless old_file_ref is provided.
old_file_refstringNoTenant-owned old-schema file reference; omit it to read oldSchema. When both are sent this one wins.
newSchemastringNoNew schema as JSON text, 1 to 524288 characters. Required unless new_file_ref is provided.
new_file_refstringNoTenant-owned new-schema file reference; omit it to read newSchema. When both are sent this one wins.

Output schema

FieldTypeRequiredDescription
compatiblebooleanYesTrue when the breaking list is empty.
breakingarrayYesBreaking changes, 0 through 10000 closed {path, changeType, description} objects that reject previously valid data.
nonBreakingarrayYesNon-breaking changes, 0 through 10000 closed {path, changeType, description} objects that old data survives.
ambiguousarrayYesAmbiguous changes, 0 through 10000 closed {path, changeType, description} objects whose impact depends on readers and writers.
totalChangesintegerYesBreaking, non-breaking and ambiguous differences added up.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.diff_json_schema","input":{"oldSchema":"{\"type\":\"object\"}","newSchema":"{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\"}}}"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("schema.diff_json_schema", {"oldSchema":"{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"}},\"required\":[\"name\"]}","newSchema":"{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"email\":{\"type\":\"string\"}},\"required\":[\"name\"]}"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
JSON_MALFORMED400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • We never check a document against a schema — that is schema.validate_json
  • We never merge the two schemas into a combined version
  • We never follow a remote $ref or fetch anything from the network
  • Validating data against a schema — use schema.validate_json
  • Merging two schemas into one
  • Inferring schemas from data — use schema.infer_json_schema

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "schema.diff_json_schema",
  "input": {
    "oldSchema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"}},\"required\":[\"name\"]}",
    "newSchema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"email\":{\"type\":\"string\"}},\"required\":[\"name\"]}"
  }
}

Examples

Non-breaking change: add optional field

Inputjson
{
  "oldSchema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"}},\"required\":[\"name\"]}",
  "newSchema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"email\":{\"type\":\"string\"}},\"required\":[\"name\"]}"
}
Expected outputjson
{
  "ambiguous": [],
  "totalChanges": 1,
  "nonBreaking": [
    {
      "path": "/properties/email",
      "changeType": "property_added_optional",
      "description": "New optional property 'email' added"
    }
  ],
  "compatible": true,
  "breaking": []
}

Breaking change: property type change

Inputjson
{
  "oldSchema": "{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\"}},\"required\":[\"id\"]}",
  "newSchema": "{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]}"
}
Expected outputjson
{
  "ambiguous": [],
  "totalChanges": 1,
  "nonBreaking": [],
  "compatible": false,
  "breaking": [
    {
      "path": "/properties/id/",
      "changeType": "type_changed",
      "description": "Type changed from \"integer\" to \"string\""
    }
  ]
}
  • API contract compatibility checks during schema evolution
  • CI/CD gates that block deployments on breaking changes
  • Schema version review before publishing updated contracts

Avoid for

  • Validating data against a schema — use schema.validate_json
  • Merging two schemas into one
  • Inferring schemas from data — use schema.infer_json_schema

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

jsonanalysisvalidation