{"openapi":"3.1.0","info":{"title":"Locale JSON Audit","description":"Check JSON locale keys and placeholders against a source locale.","version":"1.0.0"},"components":{"schemas":{"Locale":{"type":"object","additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":"string"}}}}}}}}}}}}}}}}}}}}}}}},"paths":{"/regression-cases":{"get":{"operationId":"getLocaleRegressionCases","summary":"A versioned JSON regression suite for testing localization CI, with 32 original source/target pairs and exact expected findings.","responses":{"200":{"description":"All 32 fixtures with source, target, and expected findings."},"402":{"description":"x402 v2 challenge for 0.01 USDC on Base."}}}},"/example":{"get":{"operationId":"getLocaleAuditExample","summary":"Get a sample audit report for a synthetic locale pair.","responses":{"200":{"description":"A sample report in the same format as POST /audit.","content":{"application/json":{"schema":{"type":"object","required":["ok","checkedEntries","findings"],"properties":{"ok":{"type":"boolean","description":"True when there are no findings."},"checkedEntries":{"type":"integer","minimum":0,"description":"Number of entries in the source locale."},"findings":{"type":"array","items":{"type":"object","required":["path","rule"],"properties":{"path":{"type":"string","description":"JSON Pointer to the locale entry."},"rule":{"type":"string","description":"Audit rule that produced the finding."},"missing":{"type":"object","description":"Missing token counts, present on token_mismatch findings.","additionalProperties":{"type":"integer","minimum":1}},"unexpected":{"type":"object","description":"Unexpected token counts, present on token_mismatch findings.","additionalProperties":{"type":"integer","minimum":1}}}}}}},"example":{"ok":false,"checkedEntries":1,"findings":[{"path":"/checkout/greeting","rule":"token_mismatch","missing":{"{name}":1},"unexpected":{}}]}}}}}}},"/audit":{"post":{"operationId":"auditLocaleJson","summary":"Check JSON locale keys and placeholders against a source locale.","description":"Compare two JSON locales for missing and extra keys, blank translations, and placeholder mismatches. Returns findings by JSON Pointer.","tags":["localization","quality-assurance","json"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source","target"],"properties":{"source":{"type":"object","additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":"string"}}}}}}}}}}}}}}}}}}}}},"description":"Source locale with string values or nested locale objects."},"target":{"type":"object","additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":["string","object"],"additionalProperties":{"type":"string"}}}}}}}}}}}}}}}}}}}}},"description":"Target locale with string values or nested locale objects."}}},"example":{"source":{"checkout":{"greeting":"Hi {name}"}},"target":{"checkout":{"greeting":"你好"}}}}}},"responses":{"200":{"description":"Audit report with findings by JSON Pointer.","content":{"application/json":{"schema":{"type":"object","required":["ok","checkedEntries","findings"],"properties":{"ok":{"type":"boolean","description":"True when there are no findings."},"checkedEntries":{"type":"integer","minimum":0,"description":"Number of entries in the source locale."},"findings":{"type":"array","items":{"type":"object","required":["path","rule"],"properties":{"path":{"type":"string","description":"JSON Pointer to the locale entry."},"rule":{"type":"string","description":"Audit rule that produced the finding."},"missing":{"type":"object","description":"Missing token counts, present on token_mismatch findings.","additionalProperties":{"type":"integer","minimum":1}},"unexpected":{"type":"object","description":"Unexpected token counts, present on token_mismatch findings.","additionalProperties":{"type":"integer","minimum":1}}}}}}},"example":{"ok":false,"checkedEntries":1,"findings":[{"path":"/checkout/greeting","rule":"token_mismatch","missing":{"{name}":1},"unexpected":{}}]}}}},"400":{"description":"Invalid locale data."},"402":{"description":"x402 v2 challenge for 0.01 USDC on Base."},"413":{"description":"Request body exceeds 64 KiB."}}}}}}