{"id":"mustache-variables-list","version":"1.0.0","description":"List the names and partials a Mustache template references, with tag kind, line, column and enclosing sections.","supported_operations":["list variables in a mustache template","find mustache template placeholders","extract mustache tag names","which data keys does a mustache template need","list partials referenced by a mustache template","mustache template variable discovery"],"unsupported_operations":["guessing data types or example values for the names","rendering the template (use mustache-template-render)","following partials into the context of the tag that includes them","listing Handlebars helpers or Jinja expressions"],"semantics":["Parses with the Mustache specification v1.4.2 grammar (same rules and reasons as mustache-template-validate); a syntax error throws invalid_input with details {reason, partial, line, column}, and {{$...}}, {{<...}} or {{>*...}} throws unsupported_input.","references lists every variable ({{x}}), unescaped ({{{x}}} or {{&x}}), section ({{#x}}), inverted ({{^x}}) and partial ({{>x}}) tag in document order: the main template first (partial null), then each supplied partial in code-unit order of its name.","Each reference carries the trimmed name, 1-based line and column (code points) of its opening delimiter, and enclosing: the open sections around it in that same source, outermost first, written \"#name\" or \"^name\".","names is the code-unit-sorted set of referenced variable and section names (partials and \".\" excluded); root_names is the sorted set of first dotted parts of names referenced in the main template with no enclosing \"#\" section, which always resolve against the root data.","partials_referenced is the sorted set of partial names referenced anywhere; partials_missing is the subset absent from the partials map (omitted map means none supplied).","Contexts are not composed across partial inclusion: a partial's references are reported relative to the partial itself."],"limits":{"max_template_bytes":65536,"max_partials":32,"max_tags":10000,"max_section_depth":32,"max_output_bytes":1048576},"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 scanned. Omitted means none."}}},"output_schema":{"type":"object","additionalProperties":false,"required":["references","names","root_names","partials_referenced","partials_missing"],"properties":{"references":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["partial","kind","name","line","column","enclosing"],"properties":{"partial":{"type":["string","null"]},"kind":{"type":"string","enum":["variable","unescaped","section","inverted","partial"]},"name":{"type":"string","minLength":1},"line":{"type":"integer","minimum":1},"column":{"type":"integer","minimum":1},"enclosing":{"type":"array","items":{"type":"string"}}}}},"names":{"type":"array","items":{"type":"string"}},"root_names":{"type":"array","items":{"type":"string"}},"partials_referenced":{"type":"array","items":{"type":"string"}},"partials_missing":{"type":"array","items":{"type":"string"}}}},"examples":[{"input":{"template":"\"{{#a}}{{b.c.d.e.name}}{{/a}}\" == \"Phil\""},"output":{"references":[{"partial":null,"kind":"section","name":"a","line":1,"column":2,"enclosing":[]},{"partial":null,"kind":"variable","name":"b.c.d.e.name","line":1,"column":8,"enclosing":["#a"]}],"names":["a","b.c.d.e.name"],"root_names":["a"],"partials_referenced":[],"partials_missing":[]}},{"input":{"template":"Hi {{user.name}}\n{{^items}}none{{/items}}{{>footer}}{{>legal}}","partials":{"footer":"{{{year}}}"}},"output":{"references":[{"partial":null,"kind":"variable","name":"user.name","line":1,"column":4,"enclosing":[]},{"partial":null,"kind":"inverted","name":"items","line":2,"column":1,"enclosing":[]},{"partial":null,"kind":"partial","name":"footer","line":2,"column":25,"enclosing":[]},{"partial":null,"kind":"partial","name":"legal","line":2,"column":36,"enclosing":[]},{"partial":"footer","kind":"unescaped","name":"year","line":1,"column":1,"enclosing":[]}],"names":["items","user.name","year"],"root_names":["items","user"],"partials_referenced":["footer","legal"],"partials_missing":["legal"]}}],"execute_url":"/v1/tools/mustache-variables-list/versions/1.0.0/execute"}