cesarParra / apexdocs

Node.js tool to generate documentation for your Salesforce Apex Classes.
https://www.npmjs.com/package/@cparra/apexdocs
MIT License
102 stars 18 forks source link

Option to not include Apex file meta information #72

Closed IlyaMatsuev closed 1 year ago

IlyaMatsuev commented 1 year ago

Hi, Thanks for creating this CLI, it helps a lot. However, I have a suggestion about what's being printed in the .md file for an Apex class. Doesn't matter what options and generators I use, I always get ApexClass meta information in the final markdown file. I don't really see much sense in printing this information as I've never seen in that somebody would expose and not delete an Apex class with Status: Inactive. ApexClass API version is a bit more important but again, most of the time it's not required for a user to know the exact API version.

So, would it be possible to have at least a CLI option to disable that ApexClass meta information to be printed?

What I'm running:

npx apexdocs-generate -s ./src/main -t ./docs -p global -g docsify --defaultGroupName Classes

Example source file:

/**
 * @description Some description
 */
global abstract class Service implements IService {}

Expected result .md file:

# Service

Some description

**Implemented types**

[IService](/Interfaces/IService.md)

Actual result .md file:

# Service

`APIVERSION: 55`

`STATUS: ACTIVE`

Some description

**Implemented types**

[IService](/Interfaces/IService.md)
cesarParra commented 1 year ago

Hi @IlyaMatsuev

That totally makes sense, and I agree. I think I rather make it the default to not include that info, and have a flag to optionally include it, cause I agree that is a rare use case, and skipping having to read the .xml file could have a positive performance impact. Could be a breaking change for some but I honestly wonder how many people would care.

Let me look into this

IlyaMatsuev commented 1 year ago

Cool, thanks for the quick feedback

cesarParra commented 1 year ago

Available in 2.14.0 https://www.npmjs.com/package/@cparra/apexdocs/v/2.14.0. Let me know if anything could be improved or is not working