{"slug":"api-zfinia-com-x402-v1-json-patch-safety-audit-dcdb00","title":"Judge an RFC 6902 patch against the document it will be applied to","host":"api.zfinia.com","method":"POST","resource":"https://api.zfinia.com/x402/v1/json-patch-safety-audit","category":"code","description":"Judge an RFC 6902 patch against the document it will be applied to. The patch is applied to a copy as a sequence, so each operation is judged against the state it will actually see rather than against the original: a later operation targeting a path an earlier one removed is the defect class this ex","price_listed":0.15,"price_asked":0.15,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":2397,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"document":"{\"name\":\"service\",\"replicas\":3,\"limits\":{\"cpu\":\"200m\",\"memory\":\"256Mi\"},\"hosts\":[\"a.test\",\"b.test\"]}","patch":"[{\"op\":\"remove\",\"path\":\"/limits\"},{\"op\":\"replace\",\"path\":\"/replicas\",\"value\":\"three\"},{\"op\":\"replace\",\"path\":\"/limits/cpu\",\"value\":\"500m\"},{\"op\":\"add\",\"path\":\"/hosts/-\",\"value\":\"c.test\"},{\"op\":\"move\",\"from\":\"/hosts\",\"path\":\"/hosts/0\"},{\"op\":\"remove\",\"path\":\"/name\"}]","protected_paths":["/name"]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"document":{"maxLength":1048576,"type":"string"},"patch":{"maxLength":1048576,"type":"string"},"protected_paths":{"items":{"maxLength":512,"type":"string"},"maxItems":200,"minItems":1,"type":"array"}},"required":["document","patch"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-04","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.15,"price_match":true,"latency_ms":2397,"error":null}],"description_full":"Judge an RFC 6902 patch against the document it will be applied to. The patch is applied to a copy as a sequence, so each operation is judged against the state it will actually see rather than against the original: a later operation targeting a path an earlier one removed is the defect class this exists for. Reports a missing target, which makes the whole patch fail; a remove, which has no inverse; a replace that changes type; a move into itself; and a path the caller marked protected.","last_updated":"2026-10-04T08:30:43.667Z","schemes":["exact"]}