Skip to main content

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

MicroSkills Reference

Enum Values Validator

schema.validate_enum_values

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You send a JSON payload and, for each field you care about, the list of values it is allowed to hold. We look the field up by path and tell you when it holds something else, when it is null, or when it is not there at all. Where the value is a near-miss for one of your allowed values we name the one you probably meant, which turns a typo into a one-line fix. This is a targeted check on the fields you list, not full schema validation.

A single unexpected value in a status or currency field is enough to have an API reject your request, and writing the same membership check by hand in every caller is wasted effort. You describe the allowed values once and get a precise answer.

Reliability

Deterministic: the same payload and rules always produce the same violations and the same suggestions, and on a tie between equally close candidates we pick the alphabetically first. Numbers are compared by value, so 1 satisfies an allowed 1.0. A path that is not present in the payload counts as a violation rather than being skipped, so only list fields you expect to be there. We reject the call, and an unchanged retry will not help, when payload is missing or is not an object, when enums is missing or is not an array, when a rule lacks a string path or an allowedValues array, when arrayMode is anything other than value or each, or when maxErrors falls outside 1 to 10000.

Context footprint

The payload is capped at 1000000 bytes and is never echoed back; the response holds one short row per violation, up to maxErrors. A successful call costs 1 execution credit.

When to use it

When only a handful of fields are constrained and you want them checked cheaply, with a hint about what the right value probably was.

When the whole document needs checking against a schema, or when the constraint is a range, a length, or a pattern rather than a fixed list.

Scope

Note
We check the fields you name against the value lists you supply, and name the closest allowed value when what we found looks like a typo.

Non-goals

  • We never run full schema validation — that is schema.validate_json
  • We never audit which fields are present overall — that is schema.check_required_fields
  • We never change the payload or correct a value for you

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input976.6 KB

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
payloadobjectYesJSON object to check; extra keys are payload fields and only the named paths are read. — unconstrained RFC 8259 JSON items.
enumsarrayYesRules to apply, 1 through 1000 closed objects each naming a path and its allowed values.
maxErrorsintegerNoHow many violations to report, 1 through 10000; omit it for 1000.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when every rule was satisfied.
errorsarrayYesViolations in rule order, 0 through 10000 closed objects; empty when valid.

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.validate_enum_values","input":{"payload":{"status":"active"},"enums":[{"path":"/status","allowedValues":["active"]}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("schema.validate_enum_values", {"payload":{"status":"activ"},"enums":[{"allowedValues":["active","inactive"],"path":"/status"}]});

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.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • We never run full schema validation — that is schema.validate_json
  • We never audit which fields are present overall — that is schema.check_required_fields
  • We never change the payload or correct a value for you
  • Checking a whole document against a schema (schema.validate_json)
  • Auditing which fields are present (schema.check_required_fields)
  • Checking numeric ranges, lengths, or patterns

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "schema.validate_enum_values",
  "input": {
    "payload": {
      "status": "activ"
    },
    "enums": [
      {
        "allowedValues": [
          "active",
          "inactive"
        ],
        "path": "/status"
      }
    ]
  }
}

Examples

Invalid enum with suggestion

Inputjson
{
  "payload": {
    "status": "activ"
  },
  "enums": [
    {
      "allowedValues": [
        "active",
        "inactive"
      ],
      "path": "/status"
    }
  ]
}
Expected outputjson
{
  "errors": [
    {
      "suggestion": "active",
      "path": "/status",
      "actual": "activ",
      "allowedValues": [
        "active",
        "inactive"
      ]
    }
  ],
  "valid": false
}

Valid enum value

Inputjson
{
  "payload": {
    "status": "active"
  },
  "enums": [
    {
      "allowedValues": [
        "active",
        "inactive"
      ],
      "path": "/status"
    }
  ]
}
Expected outputjson
{
  "errors": [],
  "valid": true
}
  • Guard the status, type, and currency fields in a payload you are about to send
  • Catch the case where an upstream service quietly added a new value you do not handle
  • Turn a misspelled value into a concrete suggestion you can act on

Avoid for

  • Checking a whole document against a schema (schema.validate_json)
  • Auditing which fields are present (schema.check_required_fields)
  • Checking numeric ranges, lengths, or patterns

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

schemavalidation