{"uid":"cap_V-zu04JYEubFGYAyJbENn","slug":"openapi-payload-validator-1f9200d2","name":"OpenAPI Payload Validator","description":"Validate a JSON payload against the request or response schema for one operation in an OpenAPI 3.x or Swagger 2.x spec. Locate the operation by operationId or method+path; choose `part: \"request\"` or `part: \"response\"` (status defaults to the first 2xx). Deterministic subset of JSON Schema: type, required, enum, properties, items, additionalProperties:false, oneOf/anyOf/allOf, $ref-detection (not dereferenced).","url":"https://agent402.tools/api/openapi-validate-payload","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"part":{"description":"Schema to validate against: \"request\" or \"response\""},"path":{"description":"Path template (use with `method` if no operationId)"},"spec":{"description":"OpenAPI/Swagger document (object or JSON string)"},"method":{"description":"HTTP method (use with `path` if no operationId)"},"status":{"description":"Response status when part=\"response\" (defaults to first 2xx)"},"payload":{"description":"JSON value to validate"},"operationId":{"description":"operationId to validate against (preferred)"}}},"responseSchema":{"type":"json","example":{"valid":false,"errors":[{"path":"","rule":"required","message":"missing required field: email"},{"path":".age","rule":"type","message":"expected integer, got string"},{"path":".extra","rule":"additionalProperties","message":"unexpected property: extra"}],"schemaPresent":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8M3QokTRuDu9TQXG5nb8p","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON payload against the request or response schema for a specific operation in an OpenAPI 3.x or Swagger 2.x specification","exampleAgentPrompt":"Can you validate this JSON payload against the request schema for the 'createUser' operation in my OpenAPI spec? Here's the spec and the payload I want to check — let me know if it's valid or what errors it has.","exampleUseCases":null,"resultDescription":"A validation result indicating whether the provided JSON payload conforms to the request or response schema for the specified API operation, including any schema validation errors or constraint violations found.","failureModes":["Invalid or unparseable OpenAPI/Swagger spec document — returns error indicating spec is malformed","operationId not found in spec — returns error that the operation could not be located","Neither operationId nor method+path provided — returns error that operation cannot be identified","Invalid value for 'part' field (not 'request' or 'response') — returns validation or parse error","No matching schema found for the given status code in response validation — may default or error","Malformed payload JSON — returns parse error","Spec references external $refs that cannot be resolved — may return incomplete validation or error"],"whenToPreferThis":"Use this endpoint when you need to programmatically validate a JSON payload against a specific OpenAPI 3.x or Swagger 2.x operation schema — either request body or response body — without running the actual API. Ideal for pre-flight request validation, CI/CD pipeline checks, contract testing, or debugging schema mismatches. Prefer this over generic JSON Schema validators when the schema is embedded in an OpenAPI spec and you want to leverage the spec's full operation context including operationId lookup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:06.181Z","isFirstParty":false}