I've added an "INHERIT" literal string that can be used in the @HtmlDoc annotation to inherit and extend values from the servlet class.

Where this is useful is when you want to define a a set of links on a class, but want to add an additional link on a particular method.  Previously this meant you had to duplicate all the links on the method annotation such as shown below from the PetStore example:

Links defined on class:

Links overridden on method to add a single QUERY menu item:

With the "INHERIT" literal, you can include the parent links and augment them with more links like so:

The parent links are included in the position specified in the array, so you can include links before or after the list parent links, or you can optionally use square brackets to specify an index position if you want to insert your link in the middle of the parent links.  

The "INHERIT" literal can be used in any of the following @HtmlDoc values:  header, script, style, links, aside, footer.

When used on the @HtmlDoc in the @RestResource annotation, it inherits the value from the parent class.

 

  • No labels