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

Add ability to disable "API Example:" section #12

Closed
calebjones opened this issue Oct 3, 2011 · 8 comments
Closed

Add ability to disable "API Example:" section #12

calebjones opened this issue Oct 3, 2011 · 8 comments
Labels
Milestone

Comments

@calebjones
Copy link

I'm trying to generate RESTful docs for external consumption. The "API Example:" section showing the Java example on how to call the method is meaningless (and confusing) for parties which will only consume the REST API.

Is there a way to disable this section upon documentation generation?

Note: You can "hide" this via a CSS selector, but that's more of a hack since there's no current cross-browser CSS selector that will allow you to hide the nth td element (thanks IE).

@FroMage
Copy link
Owner

FroMage commented Oct 4, 2011

I've been meaning to do this for a long time, hopefully I will have time this week.

@calebjones
Copy link
Author

Great! Let me know if you need help on this. I haven't looked at the jax-doclets code yet and my experience in JAX and customizing Javadoc routines is close to none so I'm sure I wouldn't be terribly helpful until I can ramp up a bit.

@FroMage
Copy link
Owner

FroMage commented Jan 2, 2012

Fixed now, with the -disablejavascriptexample doclet param. Though note that the example in question is for consumers since it describes how to use the RESTEasy JavaScript client.

@calebjones
Copy link
Author

Hmmm... I'm having trouble getting this to work (which I anticipate being my own issue). I can't seem to get any of the jaxrs-doclet specific params to work (http://fromage.github.com/jax-doclets/docs/0.10.0/html/index.html#d0e362). Exactly where does one add the config to enable/disable this? I've tried adding via -D.... param in maven command line as well as adding inside <configuration> section in my <reportSet> section in my pom.xml alongside my other params like <header> or <footer> (which do work).

@calebjones
Copy link
Author

Ok, got it after reading up on alternate doclet config (see http://maven.apache.org/plugins/maven-javadoc-plugin/examples/alternate-doclet.html). These params need to be put alltogether inside a single <additionalparam> in the <reportSet> <configuration> section. It was a bit confusing since the config that overlaps with JavaDoc params work outside <additionalparam>.

It might be helpful if the documentation mentioned this specifically for those not necessarily familiar with doclet's ins and outs.

@FroMage
Copy link
Owner

FroMage commented Jan 11, 2012

Right, I'll add a note in the docs, thanks.

@FroMage
Copy link
Owner

FroMage commented Jan 11, 2012

See #24.

@calebjones
Copy link
Author

Awesome. You rock!

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

No branches or pull requests

2 participants