{"openapi":"3.1.0","info":{"title":"Fixed-Width Byte Layout","version":"1.0.0","description":"Validate fixed-width UTF-8 record layouts and flag invalid character boundaries, malformed lengths, and missing required fields.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/fixed-width-byte-layout/v1/check":{"post":{"operationId":"fixed_width_byte_layout","summary":"Validate fixed-width UTF-8 record layouts and flag invalid character boundaries, malformed lengths, and missing required fields.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":1000},"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"offset":{"type":"integer","minimum":0,"maximum":999},"length":{"type":"integer","minimum":1,"maximum":1000},"required":{"type":"boolean"}},"required":["name","offset","length","required"],"additionalProperties":false}},"records":{"maxItems":40,"type":"array","items":{"type":"string","maxLength":1000}}},"required":["width","fields","records"],"additionalProperties":false},"example":{"width":5,"fields":[{"name":"code","offset":0,"length":1,"required":true},{"name":"memo","offset":1,"length":4,"required":false}],"records":["A🙂","🙂A","A","     "]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"valid_records":1,"invalid_records":[{"record":2,"bytes":5,"issues":[{"field":"code","reason":"split_utf8"},{"field":"memo","reason":"split_utf8"}]},{"record":3,"bytes":1,"issues":[{"field":null,"reason":"wrong_width"}]},{"record":4,"bytes":5,"issues":[{"field":"code","reason":"required_blank"}]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}