{"id":25754049,"url":"https://github.com/duologic/autodoc","last_synced_at":"2026-03-02T16:32:20.916Z","repository":{"id":278546367,"uuid":"870319377","full_name":"Duologic/autodoc","owner":"Duologic","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-20T10:35:12.000Z","size":122,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T11:30:00.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jsonnet","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Duologic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T20:28:56.000Z","updated_at":"2025-02-20T10:35:16.000Z","dependencies_parsed_at":"2025-02-20T11:42:55.956Z","dependency_job_id":null,"html_url":"https://github.com/Duologic/autodoc","commit_stats":null,"previous_names":["duologic/autodoc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fautodoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fautodoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fautodoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fautodoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Duologic","download_url":"https://codeload.github.com/Duologic/autodoc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240880195,"owners_count":19872495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-26T15:30:27.676Z","updated_at":"2026-03-02T16:32:20.912Z","avatar_url":"https://github.com/Duologic.png","language":"Jsonnet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autodoc\n\nAutodoc can generate documentation for Jsonnet code, optionally annotated with code comments.\n\nWhile any comments are processed, the goal is to parse and pretty print [JSDoc](https://jsdoc.app/) annotations.\n\n\u003e [!CAUTION]\n\u003e This is an experimental library.\n\n## Index\n\n* [func new](#func-new)\n  * [func new().render](#func-newrender)\n  * [func new().generateIndex](#func-newgenerateindex)\n  * [func new().findRootObject](#func-newfindrootobject)\n  * [func new().renderObject](#func-newrenderobject)\n  * [func new().documentableFields](#func-newdocumentablefields)\n  * [func new().fieldName](#func-newfieldname)\n  * [func new().filterFunctionFields](#func-newfilterfunctionfields)\n  * [func new().filterAnonymousFunctionFields](#func-newfilteranonymousfunctionfields)\n  * [func new().filterObjectFields](#func-newfilterobjectfields)\n  * [func new().renderFieldFunction](#func-newrenderfieldfunction)\n  * [func new().renderAnonymousFunction](#func-newrenderanonymousfunction)\n  * [func new().renderFunction](#func-newrenderfunction)\n  * [func new().getCommentBeforeLine](#func-newgetcommentbeforeline)\n\n## Fields\n\n### func new\n\n```jsonnet\nnew(title, file)\n```\n\n`new` creates a new autodoc parser\n* @constructor\n* @param {string} - title\n* @param {string} - file (example: `imporstr './main.libsonnet'`)\n* @returns {object}\n\n#### func new().render\n\n```jsonnet\nrender(depth=0)\n```\n\n`render` processes the file into Markdown\n* @param {number} - [depth=0]\n* @returns {string}\n\n#### func new().generateIndex\n\n```jsonnet\ngenerateIndex(lines)\n```\n\n#### func new().findRootObject\n\n```jsonnet\nfindRootObject(ast)\n```\n\n#### func new().renderObject\n\n```jsonnet\nrenderObject(object, parents=[], depth, noHeader=false)\n```\n\n#### func new().documentableFields\n\n```jsonnet\ndocumentableFields(object)\n```\n\nFind fields that can be documented.\nThis essentially filters out calculated fields in the form of `[\u003cexpr\u003e]`.\n\n#### func new().fieldName\n\n```jsonnet\nfieldName(field)\n```\n\nGet the field name, this assumes fieldname.type is either `string` or `id`.\nUse `documentableFields()` to filter these out.\n\n#### func new().filterFunctionFields\n\n```jsonnet\nfilterFunctionFields(fields)\n```\n\n#### func new().filterAnonymousFunctionFields\n\n```jsonnet\nfilterAnonymousFunctionFields(fields)\n```\n\n#### func new().filterObjectFields\n\n```jsonnet\nfilterObjectFields(fields)\n```\n\n#### func new().renderFieldFunction\n\n```jsonnet\nrenderFieldFunction(field, parents, depth)\n```\n\n#### func new().renderAnonymousFunction\n\n```jsonnet\nrenderAnonymousFunction(field, parents, depth)\n```\n\n#### func new().renderFunction\n\n```jsonnet\nrenderFunction(name, signature, docstring, depth)\n```\n\n#### func new().getCommentBeforeLine\n\n```jsonnet\ngetCommentBeforeLine(lineNr)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fautodoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduologic%2Fautodoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fautodoc/lists"}