0

I have a web service with several paths. I want to add a description to each one. I added the name using @Api(value = "serviceName1") however the description attribute is deprecated and even if i use it it is not showing in Swagger UI. I even tried the SwaggerDefinition annotation and filled the description attribute in it with no result displayed:

@SwaggerDefinition(
 info = @Info(
       description = "text here ", title = "", version = ""))

I tried to create in the same way a tag with description and it didn't work as well.

Can anyone help to find any way to be able to add a note or description to the service similarly to the way we add a note to the Api Operation.

user666
  • 1,750
  • 3
  • 18
  • 34
  • can you share content of your swagger file? at least some part where you need to add description – Mara Mar 27 '18 at 11:14
  • I'm not sure to understand well. Why don't you use ApiOperation ? – B. Bri Mar 27 '18 at 11:15
  • Current class code: _@Api(value = "Provisioning") @Path("{userId}/provisioning/") @EnterprisePermissions(enterprisePermissions = Permissions.PROVISIONING_PERMISSION) public class ProvisioningService extends BaseService {....}_ – user666 Mar 27 '18 at 11:36
  • Swagger file part that needs to include description: _"tags" : [ { "name" : "DAP" }, { "name" : "JKP" }, { "name" : "Provisioning" } ],_ – user666 Mar 27 '18 at 11:39
  • @B.Bri i am already using ApiOperation with its notes but i need to add something similar to the notes attributes on the class level (on the service or tag level) – user666 Mar 27 '18 at 11:41
  • hope this will help: https://stackoverflow.com/questions/38074936/api-annotaions-description-is-deprecated/38113193#38113193 – dkb Apr 17 '18 at 20:32
  • Does using the tag will display the description in the swagger UI? or only in the JSON? – user666 Apr 19 '18 at 05:03

0 Answers0