---
title: Creating documents using Swagger
slug: dev-en/creating-documents-using-swagger
description: Learn how to create comprehensive documentation for web services using Swagger. This step-by-step guide explains how to annotate the class with @Api note and specify the web service category. Discover how the documentation is written in an interface using
docTags: 
createdAt: 2022-03-07T15:14:54.000Z
---

## Procedure

To create documentation for web services using Swagger you must follow a few steps:

- 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 web service 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 web service has. Each enum is composed of 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 web service documentation, you must create an interface that the web service 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 web service created with spring, which will be brought to the interface and implemented on the web service.
- To check if the documentation was created successfully, 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 web service directly. Just type the web service 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"}

