{"id":26002728,"url":"https://github.com/1and1/neberus","last_synced_at":"2025-03-05T19:30:11.997Z","repository":{"id":42632355,"uuid":"177083963","full_name":"1and1/neberus","owner":"1and1","description":"REST Api Documentation Library","archived":false,"fork":false,"pushed_at":"2024-11-22T13:19:48.000Z","size":3007,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-22T14:25:04.528Z","etag":null,"topics":["documentation-tool","javadoc-doclet","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1and1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-22T06:28:35.000Z","updated_at":"2024-11-22T13:19:52.000Z","dependencies_parsed_at":"2023-10-12T21:26:40.400Z","dependency_job_id":null,"html_url":"https://github.com/1and1/neberus","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1and1%2Fneberus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1and1%2Fneberus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1and1%2Fneberus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1and1%2Fneberus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1and1","download_url":"https://codeload.github.com/1and1/neberus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242091077,"owners_count":20070275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation-tool","javadoc-doclet","rest-api"],"created_at":"2025-03-05T19:30:10.926Z","updated_at":"2025-03-05T19:30:11.917Z","avatar_url":"https://github.com/1and1.png","language":"Java","readme":"# Neberus REST Documentation\n\n[![Build Status](https://travis-ci.org/1and1/neberus.svg?branch=master)](https://travis-ci.org/1and1/neberus)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.oneandone.neberus/neberus-doclet/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.oneandone.neberus/neberus-doclet)\n\nJavaDoc Doclet that automatically generates REST Documentation from your code!\nOut of the box compatibility with javax.ws.rs and spring-webmvc.\n\n- [Neberus REST Documentation](#neberus-rest-documentation)\n\t- [Setup](#setup)\n\t\t- [Maven](#maven)\n\t\t\t- [Using classes from dependencies](#using-classes-from-dependencies)\n\t- [Viewing the Apidocs](#viewing-the-apidocs)\n\t- [Service Documentation](#service-documentation)\n\t- [Method Documentation](#method-documentation)\n\t\t- [Annotations](#annotations)\n\t\t- [Example Usage](#example-usage)\n\t\t- [Example Usage with Interface](#example-usage-with-interface)\n\t\t- [Deprecated Methods](#deprecated-methods)\n\t- [Usecase Documentation](#usecase-documentation)\n\t\t- [Annotations](#annotations-1)\n\t\t- [Example](#example)\n\t- [Extensions](#extensions)\n\n## Setup\n\n### Java Version Compatibility\n\nJava 8 is only supported with version 1.x.\n\nJava 11 is only supported with version 2.x and 3.x.\n\nAll newer versions require Java 17+. \n\n### Maven\n\n- Add a dependency to `neberus-core` to get access to Neberus annotations in your code.\n- Configure the maven-javadoc-plugin to use the Neberus doclet\n\n\n`pom.xml`\n\n```xml\n\u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003enet.oneandone.neberus\u003c/groupId\u003e\n        \u003cartifactId\u003eneberus-core\u003c/artifactId\u003e\n        \u003cversion\u003e${neberus.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    ...\n\u003c/dependencies\u003e\n\n \u003cbuild\u003e\n    \u003cplugins\u003e\n        ...\n        \u003cplugin\u003e\n            \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n            \u003cartifactId\u003emaven-javadoc-plugin\u003c/artifactId\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cid\u003egenerate-service-docs\u003c/id\u003e\n                    \u003cphase\u003egenerate-resources\u003c/phase\u003e\n                    \u003cconfiguration\u003e\n                        \u003cdoclet\u003enet.oneandone.neberus.Neberus\u003c/doclet\u003e\n                        \u003cdocletArtifact\u003e\n                            \u003cgroupId\u003enet.oneandone.neberus\u003c/groupId\u003e\n                            \u003cartifactId\u003eneberus-doclet\u003c/artifactId\u003e\n                            \u003cversion\u003e${neberus.version}\u003c/version\u003e\n                        \u003c/docletArtifact\u003e\n\t\t\t\t\t\t\u003c!-- ATTENTION: \u003creportOutputDirectory\u003e is not supported anymore by maven-javadoc-plugin since version 3.10.0 --\u003e\n                        \u003coutputDirectory\u003e\n                        \u003c!-- recommended path for traditional '*.war' services --\u003e\n                        ${project.build.directory}/${project.build.finalName}\n                        \u003c!-- recommended path for spring boot services --\u003e\n                        ${project.build.directory}/classes/resources/\n                        \u003c/outputDirectory\u003e\n                        \u003cuseStandardDocletOptions\u003efalse\u003c/useStandardDocletOptions\u003e\n                        \u003cadditionalOptions\u003e\u003c!-- ATTENTION: this has been renamed from 'additionalparam' with maven-javadoc-plugin version 3.0.0 --\u003e\n                            --apiVersion ${project.version}\n                            --apiTitle \"${project.name}\" \u003c!-- remember to put enclosing quotes when the name contains blanks --\u003e\n                            --docBasePath .\n                            --apiBasePath ${apiBasePath}\n                            --apiHosts http://yourhost.com \u003c!-- the leading 'http://' can be omitted, but it must be provided for 'https://' --\u003e\n                            --scanPackages net.oneandone \u003c!-- semicolon separated list of packages to be included --\u003e\n                        \u003c/additionalOptions\u003e\n                    \u003c/configuration\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003ejavadoc\u003c/goal\u003e\n                    \u003c/goals\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n        ...\n    \u003c/plugins\u003e\n\u003c/build\u003e\n\n```\n\n#### Doclet Options\n\n```text\nProvided by the Neberus doclet:\n    --apiBasePath \u003cpath\u003e\n                  Root path of the Api on the server (e.g. '/rest').\n    --apiHosts \u003chost[description]\u003e(;\u003chost[description]\u003e)*\n                  List of hosts where the Api can be accessed, separated by semicolon (;). Description for each host can be provided inside optional trailing brackets. Example: \"https://testserver.com[the default testserver];https://otherserver.com[the other testserver]\"\n    --apiTitle \u003ctitle\u003e\n                  Api Title.\n    --apiVersion \u003cversion\u003e\n                  Api version.\n    -d \u003cstring\u003e   outputDirectory\n    --docBasePath \u003cpath\u003e\n                  Root path where the generated documentation is placed inside outputDirectory.\n    -ignoreErrors\n                  Ignore generation errors.\n    --scanPackages \u003cpackage\u003e(;\u003cpackage\u003e)*\n                  List of packages that include classes relevant for the apidoc\n    --markup [HTML|MARKDOWN|ASCIIDOC]\n    \t\t\t  Global markup option. Valid for all descriptions and used javadoc. Default: HTML.\n    --scanSecurityAnnotations\n    \t\t\t  Enable automatic parsing of security annotations for allowed roles like @Secured \u0026 @RolesAllowed.\n```\n\n#### Markup Options\n\nPer default the normal javadoc style HTML tags are supported and will be converted.\n\nWith the `--markup` option it is possible to use Markdown (see [CommonMark](https://commonmark.org/)) or AsciiDoc (see [AsciiDoctor](https://asciidoctor.org/)) instead.\n\nThe chosen markup can also be used for the `package.html` file inside the `\u003cbody\u003e` tag. \n\n#### Using classes from dependencies\n\nIf classes from dependencies are used as entities of parameters or response values of some methods, it is required to include those dependencies in the configuration of the maven-javadoc-plugin.\nOtherwise it is not possible to properly generate the templates for these classes.\n\nMore information about how the inclusion works can be found [here](https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate-dependency-sources.html).\n\n## Viewing the Apidocs\n\nNeberus generates `html` files and adds some `json`, `css` and `js` files. This means that the docs can be served from many places and viewed in any browser.\n\nThe apidocs can be deployed to an external server, accessed over the repository or included within the webapp.\n\n## Service Documentation\n\nIf a `package.html` file is found in the same package as classes/interfaces annotated with `@ApiDocumentation`, the content of this file is included on the index site.\n\nHeadings should start with `h2`, since Neberus generates a `h1` heading with the service name.\n\n## Method Documentation\n\nREST methods can be documented either directly on the method or in a separate interface (recommended) that is implemented by the class containing the methods.\n\nDefinitions in the REST-class will be used as fallback in case the interface does not provide sufficient Documentation.\n\n![neberus-method-doc](docs/neberus-method-doc.png)\n\n### Annotations\n\n| Name                 | Description                                                                                                                                                                                                          | Target                                 |\n|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|\n| @ApiDocumentation    | Enables Neberus documentation for a class containing REST methods.                                                                                                                                                   | Type                                   |\n| @ApiCurl             | Generate an example curl.                                                                                                                                                                                            | Method                                 |\n| @ApiAllowedValue     | Define the allowed values for a parameter.                                                                                                                                                                           | Method, Parameter, Field, TypeArgument |\n| @ApiDescription      | If provided, the value of this will be used as description of the method instead of the javadoc comment. If defined on a class, this will be used as short description of the resource on the service overview page. | Method, Type                           |\n| @ApiHeader           | Define a response Header within a @ApiResponse.                                                                                                                                                                      | -                                      |\n| @ApiHeaderDefinition | Define a Header on class level, this can be used to provided descriptions of headers that are reused many times. The header name will be used for reference.                                                         | Type                                   |\n| @ApiLabel            | Defines the name of a REST class or method.                                                                                                                                                                          | Method, Type                           |\n| @ApiParameter        | Defines a custom parameter for a REST method. Most likely used to document fields inside the body.                                                                                                                   | Method                                 |\n| @ApiResponse         | Document a Response.                                                                                                                                                                                                 | Method                                 |\n| @ApiCommonResponse   | Document a common Response on class level, the response will be added to every method inside that class. An @ApiResponse defined on the method with the same status will be favoured.                                | Type                                   |\n| @ApiEntity           | Define a response entity.                                                                                                                                                                                            | -                                      |\n| @ApiRequestEntity    | Define a request entity for a specific content-type.                                                                                                                                                                 | Method                                 |\n| @ApiExample          | Define a example for a specific value.                                                                                                                                                                               | -                                      |\n| @ApiType             | Define the type that should be displayed instead of the actual type. This can be used to hide internal wrapper DTOs.                                                                                                 | Parameter                              |\n| @ApiOptional         | Declare a parameter as optional. This will have precedence over framework declarations.                                                                                                                              | Method, Parameter, Field               |\n| @ApiRequired         | Declare a parameter as required. This will have precedence over framework declarations.                                                                                                                              | Method, Parameter, Field               |\n| @ApiIgnore           | Exclude a request parameter, DTO field or a whole REST method from documentation.                                                                                                                                    | Method, Parameter, Field               |\n| @ApiFormParam        | Declare a @RequestParam annotated parameter as form parameter instead of query parameter.                                                                                                                            | Parameter                              |\n| @ApiAllowedRoles     | Define roles/authorities required to access.                                                                                                                                                                         | Method                                 |\n\n### Example Usage\n\n```java\n/*\n * REST Class Documentation\n */\n@ApiDocumentation\n@RequestMapping(path = \"/rootPath\", name = \"Super Awesome REST Service\")\n@ApiHeaderDefinition(name = \"header1\", description = \"description1\")\n@ApiHeaderDefinition(name = \"header2\", description = \"description2\")\n@ApiHeaderDefinition(name = \"Predefined\", description = \"one description to rule them all\")\n@ApiCommonResponse(status = ApiStatus.INTERNAL_SERVER_ERROR, description = \"internal server error defined on class\")\npublic class RestService {\n\n\t/**\n\t * ApiDescription of this awesomely awesome method defined as javadoc!\n\t * \n\t * @param pathParam description of the pathParam\n\t */\n\t@RequestMapping(method = RequestMethod.GET,\n\t\t\t\t\tpath = \"/anotherGet/{pathParam}/anotherPathParam/{anotherPathParam}/{wrappedPathParam}\",\n\t\t\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\t@ApiLabel(\"This is an awesome method\")\n\t@ApiDescription(\"Description of this awesomely awesome method defined in annotation!\")\n\t@ApiResponse(status = ApiStatus.OK, description = \"success\",\n\t\t\t\t headers = {\n\t\t\t\t\t\t @ApiHeader(name = \"header2\", allowedValues = {\n\t\t\t\t\t\t\t\t @ApiAllowedValue(value = \"this one value\", valueHint = \"only that one\"),\n\t\t\t\t\t\t\t\t @ApiAllowedValue(value = \"this other value\", valueHint = \"or only that one\")\n\t\t\t\t\t\t }) },\n\t\t\t\t entities = {\n\t\t\t\t\t\t @ApiEntity(entityClass = SomeDto.class, examples = {\n\t\t\t\t\t\t\t\t @ApiExample(title = \"example response\", value = \"{\\\"string1\\\":\\\"some value example\\\"}\"),\n\t\t\t\t\t\t\t\t @ApiExample(title = \"other example response\", value = \"{\\\"string1\\\":\\\"some other value example\\\"}\")\n\t\t\t\t\t\t }),\n\t\t\t\t\t\t @ApiEntity(entityClass = SomeDtoList.class, contentType = \"application/list+json\", examples = {\n\t\t\t\t\t\t\t\t @ApiExample(title = \"list example response\", value = \"[{\\\"string1\\\":\\\"some value example\\\"}]\")\n\t\t\t\t\t\t }),\n\t\t\t\t\t\t @ApiEntity(entityClass = SomeDto[].class, contentType = \"application/array+json\", examples = {\n\t\t\t\t\t\t\t\t @ApiExample(title = \"array example response\", value = \"[{\\\"string1\\\":\\\"some value example\\\"}]\")\n\t\t\t\t\t\t })\n\t\t\t\t })\n\t@ApiResponse(status = ApiStatus.BAD_REQUEST, description = \"success\", headers = {\n\t\t\t@ApiHeader(name = \"header2\", allowedValues = {\n\t\t\t\t\t@ApiAllowedValue(value = \"this second value\", valueHint = \"only that one\"),\n\t\t\t\t\t@ApiAllowedValue(value = \"this second other value\", valueHint = \"or only that one\")\n\t\t\t})\n\t})\n\t@ApiParameter(name = \"anotherQueryParam\", type = ApiParameter.Type.QUERY, deprecated = true, deprecatedDescription = \"use queryParam instead\",\n\t\t\t\t  optional = true)\n\t@ApiCurl\n\tpublic String justAnotherGetMethod(@PathVariable @ApiAllowedValue(\"default\") String pathParam,\n\t\t\t\t\t\t\t\t\t   @PathVariable(\"anotherPathParam\") String anotherPathParam,\n\t\t\t\t\t\t\t\t\t   @PathVariable(\"wrappedPathParam\") @ApiType(String.class) WrappedString wrappedPathParam,\n\t\t\t\t\t\t\t\t\t   @Deprecated @RequestParam(\"queryParam\") String queryParam) {\n\t}\n\n\tpublic static class SomeDto {\n\t\t/**\n\t\t * Parameter can be placed here.\n\t\t * {@link SomeEnum} \u003c- this will place the enum values as 'allowed values'\n\t\t * @see SomeEnum \u003c- this will do the same\n\t\t */\n\t\tpublic String string1;\n\t\t\n\t\t/**\n\t\t * @see SomeWrapperClass#value \u003c- can be used to reference the javax.validation constraints of another field\n         */\n\t\tpublic String string2;\n\n\t\t/**\n\t\t * If the fields are private, the doc can be placed on the getter\n\t\t */\n\t\tpublic String getString1() {}\n\n\t\t/**\n\t\t * @param string1 or it can be placed on the ctor if all fields are private and no getters are found\n\t\t *                {@link SomeEnum} \u003c- can also be used here\n\t\t */\n\t\tpublic SomeDto(String string1) {}\n\t}\n\n\t/**\n\t * A custom interface like this can be used when the entity should be a list of SomeDto.\n\t * Alternatively just use SomeDto[].class in @ApiEntity.\n\t */\n\tpublic static interface SomeDtoList extends List\u003cSomeDto\u003e {}\n}\n```\n\n### Example Usage with Interface\n\n```java\n/*\n * REST Class Documentation\n */\n@Path(\"/rootPath\")\npublic class RestService implements RestDoc {\n\n\t/**\n\t * Internal JavaDoc not visible in the ApiDocumentation because it is overwritten in the interface\n         * @param pathParam this will be visible in the apidocs\n\t */\n\t@GET\n\t@Path(\"/anotherGet/{pathParam}/anotherPathParam/{anotherPathParam}\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic void justAnotherGetMethod(\n\t\t@PathParam(\"pathParam\") String pathParam,\n\t\t@PathParam(\"anotherPathParam\") String anotherPathParam,\n\t\t@QueryParam(\"queryParam\") String queryParam) {\n\t}\n}\n```\n\n```java\n@ApiDocumentation\n@ApiHeaderDefinition(name = \"header1\", description = \"description1\")\n@ApiHeaderDefinition(name = \"header2\", description = \"description2\")\n@ApiHeaderDefinition(name = \"Predefined\", description = \"one description to rule them all\")\n@ApiCommonResponse(status = ApiStatus.INTERNAL_SERVER_ERROR, description = \"internal server error defined on class\")\npublic interface RestDoc {\n\n\t/**\n\t * ApiDescription of this awesomely awesome method defined as javadoc!\n\t *\n\t * @param dto the body\n\t */\n\t@ApiLabel(\"This is an awesome method\")\n\t@ApiDescription(\"Description of this awesomely awesome method defined in annotation!\")\n\t@ApiResponse(status = ApiStatus.OK, description = \"success\",\n\t\t\t\t headers = {\n\t\t\t\t\t\t @ApiHeader(name = \"header2\", allowedValues = {\n\t\t\t\t\t\t\t\t @ApiAllowedValue(value = \"this one value\", valueHint = \"only that one\"),\n\t\t\t\t\t\t\t\t @ApiAllowedValue(value = \"this other value\", valueHint = \"or only that one\")\n\t\t\t\t\t\t }) },\n\t\t\t\t entities = {\n\t\t\t\t\t\t @ApiEntity(entityClass = SomeDto.class, examples = {\n\t\t\t\t\t\t\t\t @ApiExample(title = \"example response\", value = \"{\\\"string1\\\":\\\"some value example\\\"}\"),\n\t\t\t\t\t\t\t\t @ApiExample(title = \"other example response\", value = \"{\\\"string1\\\":\\\"some other value example\\\"}\")\n\t\t\t\t\t\t })\n\t\t\t\t })\n\t@ApiResponse(status = ApiStatus.BAD_REQUEST, description = \"success\", headers = {\n\t\t\t@ApiHeader(name = \"header2\", allowedValues = {\n\t\t\t\t\t@ApiAllowedValue(value = \"this second value\", valueHint = \"only that one\"),\n\t\t\t\t\t@ApiAllowedValue(value = \"this second other value\", valueHint = \"or only that one\")\n\t\t\t})\n\t})\n\t@ApiParameter(name = \"anotherQueryParam\", type = ApiParameter.Type.QUERY, deprecated = true, deprecatedDescription = \"use queryParam instead\",\n\t\t\t\t  optional = true)\n\t@ApiCurl\n\tvoid justAnotherGetMethod(@ApiAllowedValue(\"default\") String pathParam,\n\t\t\t\t\t\t\t  String anotherPathParam,\n\t\t\t\t\t\t\t  @ApiType(String.class) WrappedString wrappedPathParam,\n\t\t\t\t\t\t\t  @RequestParam(\"queryParam\") String queryParam);\n\n}\n```\n\n### Deprecated Methods\n\nMethods annotated with @Deprecated will be specially marked in the generated documentation and can provide links to other methods that shouls be used instead inside the @deprecated javadoc tag with @link tags.\nThe referenced method may be in the same class or in another documented class within the same project.\n\n```java\n/**\n * @deprecated use this one {@link #justYetAnotherPostMethod(java.lang.String, java.lang.String, net.oneandone.neberus.test.RestService.SomeDto)}\n */\n@POST\n@Path(\"/anotherPost/{pathParam}/anotherPathParam/{anotherPathParam}\")\n@ApiLabel(\"This is a POST method\")\n@Consumes(MediaType.APPLICATION_JSON)\n@Deprecated\npublic void justAnotherPostMethod(@PathParam(\"pathParam\") @ApiAllowedValue(\"toast\") String pathParam,\n                                  @PathParam(\"anotherPathParam\") String anotherPathParam,\n                                  @QueryParam(\"queryParam\") String queryParam,\n                                  SomeDto dto) {\n}\n\n@POST\n@Path(\"/anotherPOST\")\n@ApiLabel(\"This is another POST method\")\n@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\npublic void justYetAnotherPostMethod(@PathParam(\"pathParam\") @ApiAllowedValue(\"only this one\") String pathParam,\n                                     @QueryParam(\"queryParam\") String queryParam,\n                                     SomeDto dto) {\n}\n```\n\n## Usecase Documentation\n\nIt is also possible to write documentation for usecases that span multiple methods or use already documented methods in a non-trivial way.\n\nFor this purpose a new dedicated `class` or `interface` should be defined that only contains the usecase documentation.\n\nThe generated documentation will be appended to the index page.\n\n![neberus-usecase-doc](docs/neberus-usecase-doc.png)\n\n### Annotations\n\n| Name  | Description  |  Target |\n|---|---|---|\n| @ApiUsecase | Defines a specific usecase of the REST service. Usecases must be defined in seperate classes or interfaces apart from the normal apidoc.\u003cbr\u003eThe javadoc of the defining class (must be placed above the annotations) will be used as introduction. | Type |\n| @ApiUsecaseMethod | A specific REST method used in an usecase.\u003cbr\u003eIf the method is documented within the same service, it can be referenced by providing the restClass and name (label) of the method. In this case a link will be created and all parameters and responseValues will be cross-checked so they actually exist in the referenced method. | - |\n| @ApiUsecaseParam | Parameter used by a REST method in a usecase. If the method is linked to an actual REST method, the name must exist in the linked method. Use dot-syntax for nested parameters, e.g. 'myDto.myField' | - |\n| @ApiUsecaseRequestBody | Request body for a REST method in a usecase. | - |\n| @ApiUsecaseResponseBody | Response body for a REST method in a usecase. | - |\n\n### Example\n\n```java\n/**\n * This javadoc has to be located ABOVE the annotations.\n * This contains only usecases that are not trivial or require multiple calls.\n */\n@ApiUsecase(name = \"do it with hints\", description = \"just do it already\",\n\t\t\tmethods = {\n\t\t\t\t\t@ApiUsecaseMethod(\n\t\t\t\t\t\t\tpath = PATH_ROOT + PATH_POST,\n\t\t\t\t\t\t\thttpMethod = \"GET\",\n\t\t\t\t\t\t\tdescription = \"Call this first\",\n\t\t\t\t\t\t\trequestBody = @ApiUsecaseRequestBody(contentType = \"application/json\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t valueHint = \"the expected request body\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t value = \"{\\\"key\\\":\\\"value\\\"}\")),\n\t\t\t\t\t@ApiUsecaseMethod(\n\t\t\t\t\t\t\tpath = PATH_ROOT + PATH_GET,\n\t\t\t\t\t\t\thttpMethod = \"GET\",\n\t\t\t\t\t\t\tdescription = \"Then call this\",\n\t\t\t\t\t\t\tresponseBody = @ApiUsecaseResponseBody(contentType = \"application/json\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   valueHint = \"and some hint\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   value = \"{\\\"stringField\\\":\\\"with some value\\\"}\"))\n\t\t\t})\n@ApiUsecase(name = \"do it without hints\", description = \"just do it already\",\n\t\t\tmethods = {\n\t\t\t\t\t@ApiUsecaseMethod(\n\t\t\t\t\t\t\tpath = PATH_ROOT + PATH_GET_WITH_RESPONSES,\n\t\t\t\t\t\t\thttpMethod = \"GET\",\n\t\t\t\t\t\t\tdescription = \"Call this first\",\n\t\t\t\t\t\t\tparameters = {\n\t\t\t\t\t\t\t\t\t@ApiUsecaseParam(name = \"stringPathParam\", value = \"myId\"),\n\t\t\t\t\t\t\t\t\t@ApiUsecaseParam(name = \"queryParam123\", value = \"not my type\")\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t@ApiUsecaseMethod(\n\t\t\t\t\t\t\tpath = PATH_ROOT + PATH_GET,\n\t\t\t\t\t\t\thttpMethod = \"GET\",\n\t\t\t\t\t\t\tdescription = \"Then call this\",\n\t\t\t\t\t\t\tresponseBody = @ApiUsecaseResponseBody(contentType = \"application/json\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   valueHint = \"the expected request body\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   value = \"{\\\"stringField\\\":\\\"with some value\\\"}\"))\n\t\t\t})\npublic class UsecaseDoc {\n\n}\n```\n\n## Extensions\n\nNeberus can be extended with modules and shortcodes. To include an extension it must be \nadded to the `configuration` of the `maven-javadoc-plugin` as `resourcesArtifact`.\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-javadoc-plugin\u003c/artifactId\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003egenerate-service-docs\u003c/id\u003e\n            \u003cphase\u003egenerate-resources\u003c/phase\u003e\n            \u003cconfiguration\u003e\n                ...\n                \u003cresourcesArtifacts\u003e\n                    \u003cresourcesArtifact\u003e\n                        \u003cgroupId\u003e${your-extension-groupid}\u003c/groupId\u003e\n                        \u003cartifactId\u003e${your-extension-artifactid}\u003c/artifactId\u003e\n                        \u003cversion\u003e${your-extension.version}\u003c/version\u003e\n                    \u003c/resourcesArtifact\u003e\n                \u003c/resourcesArtifacts\u003e\n            \u003c/configuration\u003e\n            ...\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1and1%2Fneberus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1and1%2Fneberus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1and1%2Fneberus/lists"}