Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping of functions/methods #57

Open
DURK opened this issue Jul 10, 2013 · 1 comment
Open

Grouping of functions/methods #57

DURK opened this issue Jul 10, 2013 · 1 comment

Comments

@DURK
Copy link

DURK commented Jul 10, 2013

In our Angular-application, we make extensive use of singleton services. Each service has a number of methods/functions. Some are attached to the service, making it an publicly available API-function. Others are just local helper-functions, used by the API-functions.

Our problem is: we want both the API-functions and the helper-functions to be well documented and exported by docular, but we want them to be separated in the docs.

Is there a way to do this? The only 'workaround' I've found is using @methodOf for API-functions and @propertyOf for helpers. This makes the clear division, but obviously the helpers aren't properties (property doesn't expect params for example).

@gitsome
Copy link
Contributor

gitsome commented Jul 12, 2013

I see. Your goal is pretty clear. I am trying to think how one would do this outside of Docular. Have you had success with other documentation generators for this scenario?

The two solutions I can think of off hand (besides your @methodOf and @propertyof solution), would be:

  1. to include details about the private methods inside the @description. This would give more details and keep a clean external api. The downside is this is all manual with no automagical formatting etc...

  2. create a second service with some naming convention. So suppose you had service "A" with it's public set of methods and properties. You could within the same code document another service "A_private" with it's own set of methods and properties. Downsides here are they wouldn't necessarily show up next to each other in the Docular UI.

I think ultimately we need to be looking at private versus public distinctions. Perhaps we need to add @ppropperty and @pmethod and have them rendered in their own space. Would that be a good solution?

I know other documentation generators offer private/public filtering.

Great question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants