{"id":16981800,"url":"https://github.com/cesarparra/apexdocs","last_synced_at":"2026-01-16T02:36:52.696Z","repository":{"id":38023273,"uuid":"242373411","full_name":"cesarParra/apexdocs","owner":"cesarParra","description":"Generate documentation for your Salesforce Apex Classes.","archived":false,"fork":false,"pushed_at":"2025-09-08T23:16:24.000Z","size":4159,"stargazers_count":131,"open_issues_count":6,"forks_count":23,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T04:53:10.130Z","etag":null,"topics":["apex","apex-class","apex-framework","docs","documentation","npm","salesforce"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cparra/apexdocs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesarParra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"github":"cesarParra"}},"created_at":"2020-02-22T16:28:05.000Z","updated_at":"2025-08-29T10:49:57.000Z","dependencies_parsed_at":"2023-02-13T21:31:01.634Z","dependency_job_id":"8b98d85d-b9f4-45cc-a493-13f1fb71b546","html_url":"https://github.com/cesarParra/apexdocs","commit_stats":{"total_commits":421,"total_committers":4,"mean_commits":105.25,"dds":0.09263657957244653,"last_synced_commit":"4cabba2ae65f3f4051545c0f27fbab102ec140df"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"purl":"pkg:github/cesarParra/apexdocs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fapexdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fapexdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fapexdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fapexdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesarParra","download_url":"https://codeload.github.com/cesarParra/apexdocs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fapexdocs/sbom","scorecard":{"id":271408,"data":{"date":"2025-08-11","repo":{"name":"github.com/cesarParra/apexdocs","commit":"14f227ecd7d55623a3268e811f0c6c2d5d8d5a6f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"25 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 1/5 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/cesarParra/apexdocs/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/cesarParra/apexdocs/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/cesarParra/apexdocs/ci.yaml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: non-200 OK status code: 502 Bad Gateway body: \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e502 Bad Gateway\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e502 Bad Gateway\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\"","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T13:28:24.871Z","repository_id":38023273,"created_at":"2025-08-17T13:28:24.871Z","updated_at":"2025-08-17T13:28:24.871Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278557238,"owners_count":26006294,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apex","apex-class","apex-framework","docs","documentation","npm","salesforce"],"created_at":"2024-10-14T02:06:29.736Z","updated_at":"2026-01-16T02:36:52.689Z","avatar_url":"https://github.com/cesarParra.png","language":"TypeScript","funding_links":["https://github.com/sponsors/cesarParra"],"categories":[],"sub_categories":[],"readme":"# ApexDocs\n\n\u003cdiv align=\"center\"\u003e\n  \u003cb\u003eCLI and Node library to generate documentation for Salesforce Apex classes.\u003c/b\u003e\n\n[![CI](https://github.com/cesarParra/apexdocs/actions/workflows/ci.yaml/badge.svg)](https://github.com/cesarParra/apexdocs/actions/workflows/ci.yaml)\n[![License](https://img.shields.io/github/license/cesarParra/apexdocs)](https://github.com/cesarParra/apexdocs/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/dm/@cparra/apexdocs)](https://www.npmjs.com/package/@cparra/apexdocs)\n\u003c/div\u003e\n\nApexDocs is a non-opinionated documentation generator for Salesforce Apex classes.\nIt can output documentation in Markdown format, which allows you to use the Static Site Generator of your choice to\ncreate a documentation site that fits your needs, hosted in any static web hosting service.\n\n## Table of Contents\n\n- [👀 Examples](#-examples)\n- [🚀 Features](#-features)\n- [💿 Installation](#-installation)\n- [⚡ Quick Start](#-quick-start)\n    - [CLI](#cli)\n        - [Markdown](#markdown)\n        - [OpenApi](#openapi)\n        - [Changelog](#changelog)\n- [▶️ Available Commands](#️-available-commands)\n    - [Markdown](#markdown-1)\n    - [OpenApi](#openapi-1)\n    - [Changelog](#changelog-1)\n- [🔬 Defining a configuration file](#-defining-a-configuration-file)\n- [🌐 Translation](#-translation)\n- [⤵︎ Importing to your project](#︎-importing-to-your-project)\n- [📖 Documentation Guide](#-documentation-guide)\n- [📄 Generating OpenApi REST Definitions](#-generating-openapi-rest-definitions)\n\n## 👀 Examples\n\nApexDocs generates Markdown files, which can be integrated into any Static Site Generation (SSG) engine,\n(e.g. Jekyll, Vitepress, Hugo, Docosaurus, etc.) to create a documentation site that fits your needs.\n\nThis gives you the flexibility to create beautiful sites by leveraging your preferred SSG engine, which\nusually provides a wide range of themes, dark mode support, and other features out of the box.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"imgs/vitepress-light.png\" alt=\"Vitepress Light\" width=\"45%\" /\u003e\n  \u003cimg src=\"imgs/vitepress-dark.png\" alt=\"Vitepress Dark\" width=\"45%\" /\u003e\n\u003c/div\u003e\n\n*These are examples of documentation sites generated using Vitepress.\nHead over to the `examples/vitepress` folder to see the code.*\n\nThe extra flexibility also lets you integrate the output documentation with your existing documentation site,\nallowing you to match the look and feel of your existing site.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"imgs/integration.png\" alt=\"Integration\" width=\"70%\" /\u003e\n\u003c/div\u003e\n\nOpenApi REST definitions can be visualized using a tool like ReDoc, Swagger UI, or any other OpenApi viewer.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"imgs/redocly.png\" alt=\"OpenApi\" width=\"70%\" /\u003e\n\u003c/div\u003e\n\nThis repo contains several other example implementations in the `examples` directory, showcasing how to integrate\nwith different tools.\n\n* [Examples](./examples)\n\n### In the wild\n\nHere are some live projects using ApexDocs:\n\n- [Trailhead Apex Recipes](https://github.com/trailheadapps/apex-recipes)\n- [Salesforce Commerce Apex Reference](https://developer.salesforce.com/docs/commerce/salesforce-commerce/references/comm-apex-reference/cart-reference.html)\n- [Expression (API)](https://cesarparra.github.io/expression/)\n- [Nimble AMS Docs](https://nimbleuser.github.io/nams-api-docs/#/api-reference/)\n\n## 🚀 Features\n\n* Generate documentation for Salesforce code (Apex, triggers, custom objects, LWCs) as Markdown files\n* Generate an OpenApi REST specification based on `@RestResource` classes\n* Generate a changelog based on the differences between two versions of your Salesforce Apex classes\n* Support for grouping blocks of related code within a class\n* Support for ignoring files and members from being documented\n* Namespace support\n* Configuration file support\n* Translation support for different languages and custom terminology\n* Single line ApexDoc Blocks\n* Custom tag support\n* And much, much more!\n\n## 💿 Installation\n\n```bash\nnpm i -g @cparra/apexdocs\n```\n\n## ⚡ Quick Start\n\n### CLI\n\n#### Markdown\n\nRun the following command to generate markdown files for your global Salesforce Apex classes and custom objects:\n\n```bash\napexdocs markdown -s force-app\n\n# Use sfdx-project.json as the source of directories\napexdocs markdown --useSfdxProjectJson\n\n# Specify multiple source directories\napexdocs markdown --sourceDir force-app force-lwc force-utils\n```\n\n#### OpenApi\n\nRun the following command to generate an OpenApi REST specification for your Salesforce Apex classes\nannotated with `@RestResource`:\n\n```bash\napexdocs openapi -s force-app\n```\n\n#### Changelog\n\nRun the following command to generate a changelog for your Salesforce Apex classes:\n\n```bash\napexdocs changelog --previousVersionDir force-app-previous --currentVersionDir force-app\n```\n\n## ▶️ Available Commands\n\n### Markdown\n\n`markdown`\n\n#### Flags\n\n| Flag                              | Alias | Description                                                                                                                                                                                              | Default                    | Required |\n|-----------------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------|\n| `--sourceDir`                     | `-s`  | The directory or directories where the source files are located.                                                                                                                                         | N/A                        | *        |\n| `--useSfdxProjectJson`            | N/A   | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir`.                                                                                                  | `false`                    | *        |\n| `--sfdxProjectPath`               | N/A   | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`.                                                                                 | `process.cwd()`            | No       |\n| `--targetDir`                     | `-t`  | The directory where the generated files will be placed.                                                                                                                                                  | `docs`                     | No       |\n| `--scope`                         | `-p`  | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible.                                                                                      | `[global]`                 | No       |\n| `--customObjectVisibility`        | `-v`  | Controls which custom objects are documented. Values should be separated by a space.                                                                                                                     | `[public]`                 | No       |\n| `--defaultGroupName`              | N/A   | The default group name to use when a group is not specified.                                                                                                                                             | `Miscellaneous`            | No       |\n| `--namespace`                     | N/A   | The package namespace, if any. If provided, it will be added to the generated files.                                                                                                                     | N/A                        | No       |\n| `--sortAlphabetically`            | N/A   | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. | `false`                    | No       |\n| `--includeMetadata `              | N/A   | Whether to include the file's meta.xml information: Whether it is active and the API version                                                                                                             | `false`                    | No       |\n| `--linkingStrategy`               | N/A   | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none`                                                                                                 | `relative`                 | No       |\n| `--customObjectsGroupName`        | N/A   | The name under which custom objects will be grouped in the Reference Guide                                                                                                                               | `Custom Objects`           | No       |\n| `--triggersGroupName`             | N/A   | The name under which triggers will be grouped in the Reference Guide                                                                                                                                     | `Triggers`                 | No       |\n| `--experimentalLwcSupport`        | N/A   | Whether to document LWC files or not.                                                                                                                                                                    | `false`                    | No       |\n| `--lwcGroupName`                  | N/A   | The name under which Lightning Web Components will be grouped in the Reference Guide                                                                                                                     | `Lightning Web Components` | No       |\n| `--includeFieldSecurityMetadata`  | N/A   | Whether to include the compliance category and security classification for fields in the generated files.                                                                                                | `false`                    | No       |\n| `--includeInlineHelpTextMetadata` | N/A   | Whether to include the inline help text for fields in the generated files.                                                                                                                               | `false`                    | No       |\n| `--parallelReflection`            | N/A   | Parallelize CPU-heavy reflection via worker threads.                                                                                                                                                     | `true`                     | No       |\n| `--parallelReflectionMaxWorkers`  | N/A   | Maximum number of worker threads to use for parallel reflection. Defaults to a reasonable value based on CPU count.                                                                                      | N/A                        | No       |\n| `--debug`                         | N/A   | Enable debug logging. Prints file-by-file parsing progress and success/failure.                                                                                                                          | `false`                    | No       |\n\n\u003e **Note:** The `*` in the Required column indicates that **one** of the source directory options must be specified:\n\u003e - `--sourceDir` (single directory or array of directories)\n\u003e - `--useSfdxProjectJson` (read from sfdx-project.json)\n\u003e\n\u003e These options are mutually exclusive - you cannot use more than one at the same time.\n\n##### Linking Strategy\n\nThe linking strategy determines how ApexDocs will link to other classes in your documentation. For example,\nif I have class `A` that links through class `B` (e.g. through an `{@link B}` tag, the `@see` tag,\ntakes it as a param, returns it from a method, etc.), the linking strategy will determine how the link to class `B` is\ncreated.\n\nThese are the possible values for the `linkingStrategy` flag:\n\n- `relative`\n\nCreate a relative link to the class file.\nSo if both classes are in the same directory, the link will be created as\n`[B](B.md)`.\nIf the classes are in different directories, the link will be created as `[B](../path/to/B.md)`\n\n- `no-link`\n\nDoes not create a link at all. The class name will be displayed as plain text.\n\n- `none`\n\nDoes not apply any kind of logic. Instead, the links will be determined by the path to the file\nfrom the root of the documentation site OR by whatever path you have returned in the `transformReference` hook\nfor the file.\n\n#### Sample Usage\n\n```bash\napexdocs markdown -s force-app -t docs -p global public namespaceaccessible -n MyNamespace\n```\n\n---\n\n### OpenApi\n\n`openapi`\n\n#### Flags\n\n| Flag                             | Alias | Description                                                                                      | Default         | Required |\n|----------------------------------|-------|--------------------------------------------------------------------------------------------------|-----------------|----------|\n| `--sourceDir`                    | `-s`  | The directory where the source files are located.                                                | N/A             | Yes      |\n| `--targetDir`                    | `-t`  | The directory where the generated files will be placed.                                          | `docs`          | No       |\n| `--fileName`                     | N/A   | The name of the OpenApi file.                                                                    | `openapi.json`  | No       |\n| `--namespace`                    | N/A   | The package namespace, if any. This will be added to the API file Server Url.                    | N/A             | No       |\n| `--title`                        | N/A   | The title of the OpenApi file.                                                                   | `Apex REST API` | No       |\n| `--apiVersion`                   | N/A   | The version of the API.                                                                          | `1.0.0`         | No       |\n| `--parallelReflection`           | N/A   | Parallelize CPU-heavy reflection via worker threads.                                             | `true`          | No       |\n| `--parallelReflectionMaxWorkers` | N/A   | Maximum number of worker threads to use for parallel reflection. Defaults to a reasonable value. | N/A             | No       |\n| `--debug`                        | N/A   | Enable debug logging. Prints file-by-file parsing progress and success/failure.                   | `false`         | No       |\n\n#### Sample Usage\n\n```bash\napexdocs openapi -s force-app -t docs -n MyNamespace --title \"My Custom OpenApi Title\"\n```\n\n### Changelog\n\n`changelog`\n\n#### Flags\n\n| Flag                             | Alias | Description                                                                                      | Default     | Required |\n|----------------------------------|-------|--------------------------------------------------------------------------------------------------|-------------|----------|\n| `--previousVersionDir`           | `-p`  | The directory location of the previous version of the source code.                               | N/A         | Yes      |\n| `--currentVersionDir`            | `-t`  | The directory location of the current version of the source code.                                | N/A         | Yes      |\n| `--targetDir`                    | `-t`  | The directory location where the changelog file will be generated.                               | `./docs/`   | No       |\n| `--fileName`                     | N/A   | The name of the changelog file to be generated.                                                  | `changelog` | No       |\n| `--scope`                        | N/A   | The list of scope to respect when generating the changelog.                                      | ['global']  | No       |\n| `--customObjectVisibility`       | `-v`  | Controls which custom objects are documented. Values should be separated by a space.             | ['public']  | No       |\n| `--skipIfNoChanges`              | N/A   | Whether to skip generating the changelog if there are no changes.                                | `true`      | No       |\n| `--parallelReflection`           | N/A   | Parallelize CPU-heavy reflection via worker threads.                                             | `true`      | No       |\n| `--parallelReflectionMaxWorkers` | N/A   | Maximum number of worker threads to use for parallel reflection. Defaults to a reasonable value. | N/A         | No       |\n| `--debug`                        | N/A   | Enable debug logging. Prints file-by-file parsing progress and success/failure.                   | `false`     | No       |\n\n#### Sample Usage\n\n```bash\napexdocs changelog -p force-app-previous -t force-app\n```\n\n---\n\n## 🔬 Defining a configuration file\n\nYou can also use a configuration file to define the parameters that will be used when generating the documentation.\n\nConfiguration files are the main way to integrate the generated documentation with the Static Site Generator of your\nchoice and your build process, as well as configuring any custom behavior and the output of the generated files.\n\n### Overview\n\nApexdocs uses [cosmiconfig](https://www.npmjs.com/package/cosmiconfig) to load the configuration file, which means it\nsupports the following formats (plus anything else supported by cosmiconfig):\n\n- A `package.json` property, e.g. `{ \"apexdocs\": { \"sourceDir\": \"src\", \"targetDir\": \"docs\" } }`\n- A `.apexdocsrc` file, written in YAML or JSON, with optional extensions: `.yaml/.yml/.json/.js`\n- An `apexdocs.config.js` (or `.mjs`) file that exports an object\n- A `apexdocs.config.ts` file that exports an object\n\n**The configuration file should be placed in the root directory of your project.**\n\n**Note that when using a configuration file, you can still override any of the parameters by passing them through the\nCLI.**\n\n### Configuration file\n\nWhen defining a configuration file, it is recommended to use ES modules syntax. The config file should `default`\nexport an object with the parameters you want to use.:\n\n```javascript\nexport default {\n  sourceDir: 'force-app',\n  targetDir: 'docs',\n  scope: ['global', 'public'],\n  ...\n}\n```\n\nEvery property in the configuration file is optional, and if not provided, either the value provided through the\nCLI will be used, or the default value will be used.\n\n### Config Intellisense\n\nUsing the `defineMarkdownConfig` (or the `defineOpenApiConfig` for OpenApi documentation)\nhelper will provide Typescript-powered intellisense\nfor the configuration file options. This should work with both Javascript and Typescript files.\n\n```typescript\nimport { defineMarkdownConfig } from \"@cparra/apexdocs\";\n\nexport default defineMarkdownConfig({\n  sourceDir: 'force-app',\n  targetDir: 'docs',\n  scope: ['global', 'public'],\n  translations: {\n    sections: {\n      methods: 'Methods',\n      properties: 'Properties',\n    },\n  },\n  ...\n});\n```\n\n### Generating Different Types of Documentation\n\nYou might want to generate different types of documentation using a single command. For example, if you are releasing\na new version of your project, you might want to generate updated documentation Markdown files, and at the\nsame time generate a changelog listing everything new.\n\nYou can do this by providing a configuration file that exports a configuration object which keys are the type of\ndocumentation you want to generate.\n\n```typescript\nimport { defineMarkdownConfig, defineChangelogConfig } from '@cparra/apexdocs';\n\nexport default {\n  markdown: defineMarkdownConfig({\n    sourceDir: 'force-app',\n    targetDir: 'docs',\n    scope: ['global', 'public'],\n    ...\n  }),\n  changelog: defineChangelogConfig({\n    previousVersionDir: 'force-app-previous',\n    currentVersionDir: 'force-app',\n    targetDir: 'docs',\n    scope: ['global', 'public'],\n  })\n};\n```\n\nThen you only need to run the top level `apexdocs` command, and it will generate both types of documentation.\n\nNote that you can still run the individual commands if you only want to generate one type of documentation by\nproviding the subcommand, e.g `apexdocs markdown` or `apexdocs changelog`.\n\n### LWC Documentation Limitations\n\n⚠️ LWC documentation is only enabled when providing the `--experimentalLwcSupport` flag or setting the\n`experimentalLwcSupport` property to `true` in the configuration file.\n\nApexDocs supports generating documentation for Lightning Web Components (LWC) as well, but please\nbe aware of the following limitations:\n\n* Only components marked as `isExposed=true` in the component's meta.xml file will be documented.\n* At the moment, any JSDoc comments are ignored, documentation is based solely on the component's metadata.\n* Changelog generation does not include changes to LWCs.\n\n### Excluding Files from Being Documented\n\nAny pattern included in the `.forceignore` file will be excluded from the documentation.\n\nAdditionally, you can exclude one or multiple files from being documented by providing a list of glob patterns to\nthe `exclude` property in the configuration file.\n\n```typescript\nimport { defineMarkdownConfig } from \"@cparra/apexdocs\";\n\nexport default defineMarkdownConfig({\n  sourceDir: 'force-app',\n  targetDir: 'docs',\n  scope: ['global', 'public'],\n  exclude: ['**/MyClass.cls', '**/MyOtherClass.cls'],\n  ...\n});\n```\n\nYou can also leverage the `exclude` property to indirectly modify things like custom metadata records you do\nnot want included in the custom metadata type object documentation.\n\n```typescript\n//...\nexclude: ['**/*.md-meta.xml']\n//...\n```\n\n### Excluding Tags from Appearing in the Documentation\n\nNote: Only works for Markdown documentation.\n\nYou can exclude tags from appearing in the documentation by using the `excludeTags` property in the configuration file,\nwhich allow you to pass a list of tags that you want to exclude from the documentation.\n\n```typescript\nimport { defineMarkdownConfig } from \"@cparra/apexdocs\";\n\nexport default defineMarkdownConfig({\n  sourceDir: 'force-app',\n  targetDir: 'docs',\n  scope: ['global', 'public'],\n  excludeTags: ['internal', 'ignore'],\n  ...\n});\n```\n\n### Configuration Hooks\n\nWhen defining a `.js` or `.ts` configuration file, your object export can also make use\nof different hooks that will be called at different stages of the documentation generation process.\n\nAll hooks can be async functions, allowing you to make asynchronous operations, like calling an external API.\n\nThere are hooks for both Markdown and Changelog operations (but not for OpenApi).\n\n#### Markdown Hooks\n\n##### **transformReferenceGuide**\n\nAllows changing the frontmatter and content of the reference guide, or if creating a reference guide page altogether\nshould be skipped.\n\n**Type**\n\n```typescript\ntype TransformReferenceGuide = (referenceGuide: ReferenceGuidePageData) =\u003e Partial\u003cReferenceGuidePageData\u003e | Skip | Promise\u003cPartial\u003cReferenceGuidePageData\u003e | Skip\u003e;\n```\n\nExample: Updating the frontmatter\n\n```typescript\nexport default {\n  transformReferenceGuide: (referenceGuide) =\u003e {\n    return {\n      // The frontmatter can either be an object, of the frontmatter string itself\n      frontmatter: { example: 'example' }\n    };\n  }\n};\n```\n\nExample: skipping the reference guide\n\n```typescript\n// The skip function is imported from the package\nimport { defineMarkdownConfig, skip } from \"@cparra/apexdocs\";\n\nexport default defineMarkdownConfig({\n  transformReferenceGuide: (referenceGuide) =\u003e {\n    return skip();\n  }\n});\n```\n\n##### **transformDocs**\n\nThe main purpose of this hook is to allow you to skip the generation of specific pages,\nby returning a filtered array of `DocPageData` objects.\n\nIf you want to modify the contents or frontmatter of the docs, use the `transformDocPage` hook instead.\n\n**Type**\n\n```typescript\ntype TransformDocs = (docs: DocPageData[]) =\u003e DocPageData[] | Promise\u003cDocPageData[]\u003e\n```\n\nExample\n\n```typescript\nexport default {\n  transformDocs: (docs) =\u003e {\n    return docs.filter(doc =\u003e doc.name !== 'MyClass');\n  }\n};\n```\n\n##### **transformDocPage**\n\nAllows changing the frontmatter and content of the doc page.\n\n**Type**\n\n```typescript\ntype TransformDocPage = (\n  doc: DocPageData,\n) =\u003e Partial\u003cConfigurableDocPageData\u003e | Promise\u003cPartial\u003cConfigurableDocPageData\u003e\u003e\n```\n\nExample\n\n```typescript\nexport default {\n  transformDocPage: (doc) =\u003e {\n    return {\n      frontmatter: { example: 'example' }\n    };\n  }\n};\n```\n\n##### **transformReference**\n\nAllows changing where the files are written to and how files are linked to each other.\n\n**Type**\n\n```typescript\ntype TransformReference = (\n  reference: DocPageReference,\n) =\u003e Partial\u003cConfigurableDocPageReference\u003e | Promise\u003cConfigurableDocPageReference\u003e;\n```\n\nExample\n\n```typescript\nexport default {\n  // Notice how we are setting the linking strategy to none, so that nothing is done\n  // to the links by the tool when it tries to link to other classes\n  linkingStrategy: 'none',\n  transformReference: (reference) =\u003e {\n    return {\n      // Link to the class in Github instead to its doc page.\n      referencePath: `https://github.com/MyOrg/MyRepo/blob/main/src/classes/${reference.name}.cls`\n    };\n  }\n};\n```\n\n##### **macros**\n\nAllows defining custom macros that can be used in the documentation.\n\nMacros are reusable pieces of text that can be injected into the documentation,\nallowing you to define common pieces of text that you can use across multiple files.\n\nA common use case is injecting copyright or license information, without\nhaving to copy-paste the same text across multiple classes, polluting your\nsource code.\n\nA macro can be defined in your documentation using the `{{macro_name}}` syntax.\nIn the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the\nmacro, and the value is a function that returns the text to inject in place of the macro.\n\n**Type**\n\n```typescript\ntype MacroSourceMetadata = {\n  type: 'apex' | 'customobject' | 'customfield' | 'custommetadata' | 'trigger' | 'lwc';\n  name: string;\n  filePath: string;\n};\n\ntype MacroFunction = (metadata: MacroSourceMetadata) =\u003e string;\n```\n\nNotice that the `metadata` object contains information about the source of the file for which the macro is being\ninjected. This allows you to optionally\nreturn different text based on the source of the file.\n\nExample: Injecting a copyright notice\n\n```typescript\n//...\nmacros: {\n  copyright: () =\u003e {\n    return `@copyright Copyright (c) ${new Date().getFullYear()} My Name`;\n  }\n}\n//...\n```\n\nAnd then in your source code, you can use the macro like this:\n\n```apex\n/**\n * {{copyright}}\n * @description This is a class\n */\npublic class MyClass {\n    //...\n}\n```\n\n##### **templates**\n\nAllows providing custom templates for generating Markdown documentation, giving you control over the output format.\nYou can define templates for each type of metadata\nsupported by the `markdown` command (class, interface, enum, trigger, LWC, custom object, and reference guide) .\n\nFor detailed information about creating custom templates, including examples, available helpers, and configuration\noptions,\nplease refer to the [wiki documentation](https://github.com/cesarParra/apexdocs/wiki/5.-Custom-Templates). You can also\nfind a working example in the\n`examples/markdown-custom-templates` directory.\n\n#### Changelog Hooks\n\n##### **transformChangeLogPage**\n\nAllows changing the frontmatter and content of the changelog page.\n\n**Type**\n\n```typescript\ntype TransformChangeLogPage = (\n  changelog: ChangeLogPageData,\n) =\u003e Partial\u003cChangeLogPageData\u003e | Promise\u003cPartial\u003cChangeLogPageData\u003e\u003e\n\n// Supporting types\n\ntype ChangeLogPageData = {\n  source: SourceChangelog;\n  frontmatter: string | Record\u003cstring, any\u003e;\n  content: string;\n  outputDocPath: string;\n};\n\ntype SourceChangelog = {\n  fileChanges: FileChange[];\n};\n\ntype FileChange = {\n  name: string;\n  fileType: 'apex' | 'customobject';\n  changeType: 'added' | 'removed' | 'changed';\n  changes?: {\n    addedMethods?: string[];\n    removedMethods?: string[];\n    addedFields?: string[];\n    removedFields?: string[];\n    addedProperties?: string[];\n    removedProperties?: string[];\n    addedCustomFields?: string[];\n    removedCustomFields?: string[];\n    addedSubtypes?: string[];\n    removedSubtypes?: string[];\n    addedEnumValues?: string[];\n    removedEnumValues?: string[];\n  };\n};\n```\n\nExample\n\n```typescript\nexport default {\n  transformChangeLogPage: (changelog) =\u003e {\n    return {\n      frontmatter: { example: 'example' }\n    };\n  }\n};\n```\n\n## 🌐 Translation\n\nApexDocs supports translations to customize the language and terminology used in the generated documentation.\nThis feature allows you to:\n\n- **Translate documentation to different languages** (Spanish, French, etc.)\n- **Use custom business terminology** (e.g., \"Business Operations\" instead of \"Methods\")\n- **Partially override specific terms** while keeping the rest in English\n\n### How It Works\n\nThe translation system uses:\n\n- **Default English translations** built into the system\n- **User-provided overrides** that can be partial or complete\n\n### Configuration\n\nAdd a `translations` property to your ApexDocs configuration (JS or TS file) and pass\nthe appropriate translation object, depending on the generator you're using:\n\n```javascript\nimport { defineMarkdownConfig } from '@cparra/apexdocs';\n\nexport default defineMarkdownConfig({\n  sourceDir: 'src',\n  targetDir: 'docs',\n  scope: ['public', 'global'],\n  translations: {\n    sections: {\n      methods: 'Métodos',\n      properties: 'Propiedades',\n      fields: 'Campos',\n    },\n  },\n});\n```\n\n### TypeScript Support\n\nFor TypeScript projects, import the translation types for better autocomplete and type safety:\n\n```typescript\nimport { defineMarkdownConfig } from '@cparra/apexdocs';\nimport type { UserTranslations } from '@cparra/apexdocs';\n\nconst markdownTranslations: UserTranslations['markdown'] = {\n  sections: {\n    methods: 'Functions',\n  },\n  // ...other translation keys as needed\n};\n\nexport default defineMarkdownConfig({\n  sourceDir: 'src',\n  targetDir: 'docs',\n  scope: ['public', 'global'],\n  translations: markdownTranslations,\n});\n```\n\n### Notes\n\n- Only the **markdown** and **changelog** generators support translations\n- All translations are optional - anything not specified uses the English default\n\nFor a complete example, see the [translation example](examples/translation/) in this repository.\n\n## ⤵︎ Importing to your project\n\n### Reflection\n\nIf you are just interested in the Apex parsing capabilities, you can use the\nstandalone [Apex Reflection Library](https://www.npmjs.com/package/@cparra/apex-reflection)\nwhich is what gets used by this library behind the scenes to generate the documentation files.\n\n### Processing\n\nIf you would like to use the processing capabilities of ApexDocs directly from Javascript/Typescript\ninstead of using the CLI, you can import the `process` function from the library.\n\n```typescript\nimport { process } from '@cparra/apexdocs';\n\nprocess({\n  sourceDir: 'force-app',\n  targetDir: 'docs',\n  scope: ['global', 'public'],\n  ...\n});\n```\n\n### 👨‍💻 Typescript\n\nIf using Typescript, ApexDocs provides all necessary type definitions.\n\n## 📖 Documentation Guide\n\nSee the [wiki](https://github.com/cesarParra/apexdocs/wiki/2.-%F0%9F%93%96-Documenting-Apex-code)\nfor an in-depth guide on how to document your Apex code to get the most out of ApexDocs.\n\n## 📄 Generating OpenApi REST Definitions\n\nApexDocs can also generate OpenApi REST definitions for your Salesforce Apex classes annotated with `@RestResource`.\n\nSee the [wiki](https://github.com/cesarParra/apexdocs/wiki/3.-%F0%9F%93%84-Generating-OpenApi-REST-Definitions)\nfor more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarparra%2Fapexdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesarparra%2Fapexdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarparra%2Fapexdocs/lists"}