UNPKG

openapi3-generator

Version:

Use your API OpenAPI 3 definition to generate code, documentation, and literally anything you need.

13 lines (9 loc) 295 B
module.exports = (Handlebars, _) =>{ Handlebars.registerHelper('tree', path => { if (!path) return ''; const filteredPaths = path.split('.').filter(Boolean); if (!filteredPaths.length) return; const dottedPath = filteredPaths.join('.'); return `${dottedPath}.`; }); }