Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • delight delight
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • delight
  • delightdelight
  • Wiki
  • DocuFeature

DocuFeature · Changes

Page history
Update DocuFeature authored Mar 18, 2021 by Christian Reuschling's avatar Christian Reuschling
Hide whitespace changes
Inline Side-by-side
DocuFeature.md
View page @ c5361b80
......@@ -16,8 +16,33 @@ Prints out a summary of registered handlers and their provided methods.
Force a text version by adding .txt (or by setting Accept: text/plain).
The text version can serve as machine readable versions used by clients to use/enable the existing API.
Add a `@Documentation` annotation to have an additional description displayed for a method.
Add a `@Documentation` annotation to have an additional description displayed for a method. The documentation text specified with `@Documentation` is in [markdown syntax](https://en.wikipedia.org/wiki/Markdown):
```java
@Documentation("""
This is an example method description in **markdown syntax**. This text will be displayed in front of the generated method signature of the Api documentation. It is similar to java ApiDoc.
You can use html, e.g. for small line breaks:<br>
next line
**param1:** the first parameter<br>
**param2:** the second parameter
**return:** the return value doc
**Examples:**
http://localhost:2300/serviceRootPath/myHandler/myMethod?param1=value1&param2=7
""")
public List<String> myMethod(String param1, int param2)
```
If you don't want that a method is showed in the documentation (e.g. because it is a helper method not relevant for the web service), you can just annotate it with `@Documentation(hide = true)`:
```java
@Documentation(hide = true)
public List<String> myMethod(String param1, int param2)
```
An example method description includes the path to the handler method, a possible empty list of parameters along with their names and types, the return type
and an additional description added through the `@Documentation` annotation. The use of `@Polymorph` annotations are also displayed.
A description might look like this:
......
Clone repository
  • DocuFeature
  • ExampleServer
  • ExampleWebApp
  • Home
  • ServerSentEventsFeature
  • StatsFeature
  • people
  • xmlrpc
    • Documentation
    • ExampleUsingConverterRegistry
    • ExampleUsingOwnConceteTypes
    • ExampleUsingOwnInterfaceTypes
    • ExampleUsingThirdPartyTypes
    • ExampleUsingXmlRpcBeans
    • ExampleUsingXmlRpcCompliantTypes

Legal Notice, Imprint, Privacy Policy