YAML Schema Validator
schema.validate_yaml_schema
Overview
You send YAML text and a JSON Schema, and we read the YAML with a parser that will not build arbitrary objects, will not follow custom tags, and gives up on the alias and nesting tricks that turn a small file into a memory bomb. What comes out is checked against your schema, and every problem is reported with the path inside the document, the rule that rejected it, and a readable message. We check structure and values, not indentation style or comment placement.
Most of what runs your infrastructure is a YAML file, and the usual way to find a mistake in one is to apply it. Checking it against a schema first is cheaper, and doing so with a parser that refuses to instantiate objects keeps an untrusted file from becoming an execution path.
Reliability
Deterministic: the same text, schema, and options always produce the same verdict and the same errors. The dialect comes from schemaDialect rather than from your schema's own $schema keyword. Parsing is deliberately restrictive — no custom tags, no recursive keys, at most 50 aliases and 64 levels of nesting — so a file built to exhaust memory is refused instead of expanded. We reject the call, and an unchanged retry will not help, when yaml is missing or is not a string, when it exceeds 1000000 bytes or holds a line over 32768 characters, when the text is not valid YAML, when it holds several documents and you did not allow that, when schema is missing, is not an object, or cannot be compiled, when schemaDialect is not one we recognise, or when maxErrors falls outside 1 to 1000.
Context footprint
The text is capped at 1000000 bytes and is never echoed back; the response holds at most maxErrors short rows. A successful call costs 1 execution credit.
When to use it
Before applying or shipping YAML that has to match a schema you already have.
When you care about how the file is formatted rather than what it says, or when the schema is only complete once another document is loaded.
Scope
Non-goals
- We never pull in another schema document, so send a self-contained schema
- We never build custom objects from YAML tags; only plain data comes out
- We never comment on style, indentation, or key ordering
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 |
|---|---|---|---|
| yaml | string | Yes | YAML text to check, 1 to 1000000 characters, with no line longer than 32768. |
| schema | object | Yes | JSON Schema applied to each YAML document, with local $ref only and at most 4096 properties. — unconstrained RFC 8259 JSON items. |
| schemaDialect | string | No | Dialect such as draft-2020-12, draft-2019-09 or draft-07; omit it for draft-2020-12. Punctuation is ignored. |
| allowMultipleDocuments | boolean | No | Whether a stream of several YAML documents is acceptable; omit it for false. |
| maxErrors | integer | No | How many problems to list, 1 through 1000; omit it for 100. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when every document satisfied the schema. |
| errors | array | Yes | Problems in validator order, 0 through 1000 closed {path, schemaPath, keyword, message} objects; empty when valid. |
| documentCount | integer | Yes | How many YAML documents the text held; 1 for an ordinary or empty file. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_yaml_schema","input":{"yaml":"name: Alice\nage: 30","schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.validate_yaml_schema", {"yaml":"name: Alice\nage: 30\n","schema":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}}}});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. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- We never pull in another schema document, so send a self-contained schema
- We never build custom objects from YAML tags; only plain data comes out
- We never comment on style, indentation, or key ordering
- Judging formatting or style rather than content
- Schemas that only work if another document is fetched
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.validate_yaml_schema",
"input": {
"yaml": "name: Alice\nage: 30\n",
"schema": {
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "integer"
}
}
}
}
}Examples
Valid config YAML
{
"yaml": "name: Alice\nage: 30\n",
"schema": {
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "integer"
}
}
}
}{
"errors": [],
"valid": true,
"documentCount": 1
}Type mismatch on a field
{
"yaml": "name: Alice\nage: not-an-int\n",
"schema": {
"type": "object",
"properties": {
"age": {
"type": "integer"
}
}
}
}{
"errors": [
{
"path": "/age",
"schemaPath": "/properties/age/type",
"message": "string found, integer expected",
"keyword": "type"
}
],
"valid": false,
"documentCount": 1
}Recommended use cases
- Check a config or manifest before you deploy it anywhere
- Hold infrastructure-as-code to a schema in review or in CI
- Verify generated YAML against the contract it is supposed to meet
Avoid for
- Judging formatting or style rather than content
- Schemas that only work if another document is fetched
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.