cesarParra / apexdocs

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

New annotation / tags. #135

Open codefriar opened 2 days ago

codefriar commented 2 days ago

@cesarParra

Overview: We have a unique need to add a new annotation / tag to Apex docs. I think it would be good for the community at large, and rather than forking apex docs, I wanted to ask if you'd be ok with a PR? and if you could help me orient myself to it. I'm happy to do the work.

Specifics: We work in a highly regulated org. There are certain apex actions / settings and or configurations that we have to Justify the use of. For instance, we have to provide justification for the use of any query or DML that doesn't use 'WITH USER_MODE'. We would like to introduce a new, optional, tag @justification similar to @description. The key is, we need the doc generator to honor and publish that justification in the output.

Thoughts?

cesarParra commented 2 days ago

@codefriar

Of course, contributions are more than welcome!

But in this case you might not need any change. Any custom annotation added to the docs will be respected in the output file as well (ever since 2.0.0). So for example the following input:

/**
 * @description Sample description
 * @justification Sample justification
 */
public class GroupedClass {}

will give you

# GroupedClass

Sample description

**Justification** Sample justification