Validate Avro Schema
schema.validate_avro_schema
Overview
You send one Avro JSON schema or an ordered list of named schemas. Apache Avro Schema.Parser checks types, defaults and named-type resolution, then optionally returns the parsing-form fingerprint of the last schema. This does not decode data files, generate classes or talk to a schema registry. A successful call costs 2 execution credits.
Agents need an offline Avro JSON lint that cannot generate code or fetch a registry.
Reliability
AVRO_SCHEMA_LIMIT_EXCEEDED — trigger: more than 2 MiB or 32 schemas; retryable: no; next: split the schema set.
Context footprint
Schemas are JSON text only. A successful call costs 2 execution credits.
When to use it
When the caller already holds Avro JSON schema text.
When Avro binary data, code generation or compatibility must be checked.
Powered by Apache Avro Schema.Parser. No code generation or data decoding.
Scope
Non-goals
- Does not generate Java classes
- Does not decode Avro data files
- Does not talk to a schema registry or check compatibility
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| schema | string | No | Avro JSON schema, 1 through 2097153 characters; runtime accepts at most 2097152. Omit it when sending schemas. |
| schemas | array | No | Ordered named schemas, 0 through 33 closed {name, schema} objects; runtime accepts at most 32. Omit it when sending schema. |
| validateDefaults | boolean | No | Whether default values are type-checked; omit it for true. |
| returnCanonicalFingerprint | boolean | No | Whether a valid parse returns canonicalFingerprint; omit it for true. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when every supplied schema parsed. |
| namedTypes | array | Yes | Sorted full names of RECORD, ENUM and FIXED types discovered in the last schema. |
| namedTypeCount | integer | Yes | How many named types were listed. |
| diagnostics | array | Yes | Deterministically ordered closed {code, severity, message, path} diagnostics, empty when valid. |
| canonicalFingerprint | string | No | Unsigned decimal parsingFingerprint64 of the last schema; omit it when invalid or when returnCanonicalFingerprint is false. |
| engine | string | Yes | Pinned Apache Avro Maven coordinate used for parse. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_avro_schema","input":{"schema":"{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"}]}"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.validate_avro_schema", {"schema":"{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"}]}"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| AVRO_SCHEMA_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not generate Java classes
- Does not decode Avro data files
- Does not talk to a schema registry or check compatibility
- Reading Avro containers
- Cross-version compatibility checks
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.validate_avro_schema",
"input": {
"schema": "{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"}]}"
}
}Examples
A record with a string id field is valid
{
"schema": "{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"}]}"
}{
"namedTypeCount": 1,
"valid": true,
"namedTypes": [
"User"
],
"engine": "org.apache.avro:avro",
"diagnostics": [],
"canonicalFingerprint": "1081319052329829407"
}A duplicated field name is invalid
{
"schema": "{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"id\",\"type\":\"int\"}]}"
}{
"namedTypeCount": 0,
"valid": false,
"namedTypes": [],
"diagnostics": [
{
"code": "AVRO_PARSE",
"severity": "ERROR",
"message": "Duplicate field id in record User: id type:INT pos:1 and id type:STRING pos:0.",
"path": "/schema"
}
],
"engine": "org.apache.avro:avro"
}Recommended use cases
- Lint an Avro record before a producer publishes it
- Fingerprint a schema for an offline catalog
Avoid for
- Reading Avro containers
- Cross-version compatibility checks
Related skills
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.