Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
calebjones opened this Issue · 8 comments

2 participants

@calebjones

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
Owner

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

@calebjones

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
Owner

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.

@FroMage FroMage closed this
@calebjones

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

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
Owner

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

@FroMage
Owner

See #24.

@calebjones

Awesome. You rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.