... | ... | @@ -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¶m2=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:
|
... | ... | |