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

"Miscellaneous" vs "Misc" #54

Closed gitmemattb closed 2 years ago

gitmemattb commented 2 years ago

Hi, In the apexdocs/README.md, under the configuration section for "defaultGroupName", it says:

defaultGroupName

Default: Miscellaneous

Defines the @group name to be used when a file does not specify it.

The generated output directories seems to actually be labelled "Misc" - not "Miscellaneous".

I notice in your source file: class-file-generatorHelper.ts , that is shows return groupAnnotation?.body ?? 'Misc';

We had previously received result files in a sub-directory "Miscellaneous". Should we update to "Misc" or is this a bug?

Thanks!

cesarParra commented 2 years ago

Ah, good catch. Should be Miscellaneous as described in the docs, let me look into it.

cesarParra commented 2 years ago

This should now be fixed in the latest version (v2.4.0).

I've also added a new argument (--defaultGroupName) to allow for this value to be overridden with something custom.

jclark-dot-org commented 2 years ago

@cesarParra When I use --defaultGroupName, it changes the name of the output directory, but it doesn't change the label that appears in index.md.

Running apexdocs-generate -s force-app/ -g plain-markdown --defaultGroupName 'Core Utils' -p global public namespaceaccessible, here's the top of index.md:

# Classes
## Miscellaneous

### [ApexUtil](./Core-Utils/ApexUtil.md)
<etc>

Note the link uses /Core-Utils/ and it works; all of the output is in that directory. But the H2 reads "Miscellaneous", not "Core Utils".

edit to add: running 2.6.0-beta.3

cesarParra commented 2 years ago

Thanks @jclark-dot-org . There was a rogue hardcode reference. Latest beta should have a fix for it: https://www.npmjs.com/package/@cparra/apexdocs/v/2.6.0-beta.4