---
title: Creating documents using Swagger
slug: pink-dev/creating-documents-using-swagger
description: Learn how to create documentation for web services using Swagger. This step-by-step guide outlines the process of adding annotations to the class and interface, including the use of the @Api note to specify the webservice category. It also covers the use 
docTags: 
createdAt: 2022-03-07T15:14:54.000Z
---

## Procedure

To create documentation for webservices using Swagger you must follow a few step:

- The class that will be documented should receive the @Api note of the package *io.swagger.annotations.Api*, which consists of the identification of which category the webservice is related to, for example: ticket, change request, etc.
- The identification should be put inside the @Api note, in the property *tags*, which will receive a value in enum ApiTagsEnum.

::Image[]{src="/en-us/webservice/images-swagger/image1.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

- The enum *ApiTagsEnum* is responsible for storing the categories the webservice has. Each enum is composed by the enum value and a Tag class instance (package *springfox.documentation.service.Tag*), which receives the enum value and the description of the enum.

::Image[]{src="/en-us/webservice/images-swagger/image2.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

- After configuring these scenarios, to actually insert the webservice documentation, you must create an interface that the webservice should implement.

::Image[]{src="/en-us/webservice/images-swagger/image3.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

- The interface is where the documentation will be written. These are the most used notations:

::Image[]{src="/en-us/webservice/images-swagger/image4.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

- The other notations are commonly used in a webservice created with spring, which will be brought to the interface and implemented on the webservice.
- To check if the documentation was created succesfully, add *webmvc/swagger-ui.html#* after *citsmart/* on the URL.

::Image[]{src="/en-us/webservice/images-swagger/image5.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

- It is also possible to access the documentation of the webservice directly. Just type the webservice path on the url to see it.

::Image[]{src="/en-us/webservice/images-swagger/image6.png" size="50" caption="imagem 1" isUploading="false" showCaption="true"}

