{"id":"mustache-template-validate","version":"1.0.0","description":"Check Mustache template syntax (spec v1.4.2) and its partials; returns valid or the first error with line and column.","supported_operations":["validate mustache template syntax","check a mustache template for errors","find an unclosed mustache section","lint mustache tags and delimiters","mustache syntax checker with line and column","is this mustache template well formed"],"unsupported_operations":["checking whether data contains every referenced key (use mustache-variables-list)","rendering the template (use mustache-template-render)","validating Handlebars, Jinja or Liquid syntax","accepting inheritance or dynamic-name extensions"],"semantics":["Grammar of Mustache specification v1.4.2: tags open with the current opening delimiter ({{ by default); sigils ! # ^ / > & { and = select comment, section, inverted section, close, partial, unescaped, triple mustache and set-delimiter tags.","Names are \".\" or non-empty dot-separated parts with no ASCII whitespace after trimming padding; partial names are any non-empty run without ASCII whitespace.","A set-delimiter tag must contain exactly two whitespace-separated delimiters, neither containing \"=\"; otherwise reason invalid_delimiter_change.","Reasons: unclosed_tag, invalid_tag_name, invalid_delimiter_change, unexpected_section_close, mismatched_section_close (names compared exactly), unclosed_section (the outermost still-open section), unsupported_tag ({{$...}}, {{<...}}, {{>*...}}).","The template is checked first, then each partial in code-unit order of its name with default delimiters; the first error is reported with partial (null for the template), line and column (1-based, column in code points at the opening delimiter).","A missing partial or missing data key is not a syntax error."],"limits":{"max_template_bytes":65536,"max_partials":32,"max_tags":10000,"max_section_depth":32},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["template"],"properties":{"template":{"type":"string","maxLength":65536,"description":"Mustache template text (at most 65536 UTF-8 bytes)."},"partials":{"type":"object","maxProperties":32,"additionalProperties":{"type":"string","maxLength":65536},"description":"Optional map from partial name to template text; each is validated. Omitted means none."}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","partial","line","column"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["unclosed_tag","invalid_tag_name","invalid_delimiter_change","unexpected_section_close","mismatched_section_close","unclosed_section","unsupported_tag",null]},"partial":{"type":["string","null"]},"line":{"type":["integer","null"],"minimum":1},"column":{"type":["integer","null"],"minimum":1}}},"examples":[{"input":{"template":"Hello, {{name}}!"},"output":{"valid":true,"reason":null,"partial":null,"line":null,"column":null}},{"input":{"template":"{{#a}}\n  {{b}}\n{{/c}}"},"output":{"valid":false,"reason":"mismatched_section_close","partial":null,"line":3,"column":1}},{"input":{"template":"{{>row}}","partials":{"row":"{{= a=b c =}}"}},"output":{"valid":false,"reason":"invalid_delimiter_change","partial":"row","line":1,"column":1}}],"execute_url":"/v1/tools/mustache-template-validate/versions/1.0.0/execute"}