io.swagger.annotations.ExternalDocs Java Examples
The following examples show how to use
io.swagger.annotations.ExternalDocs.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApiOperationStep.java From camunda-bpm-swagger with Apache License 2.0 | 6 votes |
public void annotate(final MethodStep methodStep, final Method m) { // resources are not annotated at all, because the resource itself will contain a method // that will get into the public API. It is a method with GET annotation and empty path. if (!TypeHelper.isResource(methodStep.getReturnType())) { final String description = restOperation != null && restOperation.getDescription() != null ? restOperation.getDescription() : WordUtils.capitalize(StringHelper.splitCamelCase(m.getName())); getMethod().annotate(ApiOperation.class) // .param("value", StringHelper.firstSentence(description)) .param("notes", description) ; if (restOperation != null && restOperation.getExternalDocUrl() != null) { getMethod().annotate(ExternalDocs.class) .param("value", "Reference Guide") .param("url", restOperation.getExternalDocUrl()) ; } } }