---
title: Creating documents using Swagger
slug: dev-en/creating-documents-using-swagger
description: Learn how to create comprehensive documentation for web services using Swagger with this step-by-step guide. Discover how to annotate classes, configure enums for categorization, create interfaces, and utilize different notations to write clear and concis
createdAt: 2021-11-18T19:58:44.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.

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/zqB1coDSMMVr46qEQltmA_image1.png)



- 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.

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/659NFzl9u1lVUoczMdNVy_image2.png)

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

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/JhnoQw2-hwEWsMswk-FbN_image3.png)

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

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/AcpFvC8ZlXmrGlSjYZgio_image4.png)

- 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 *4biz* on the URL.

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/xgDe02lXVTkYuVrgRAiQm_image5.png)

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

![](https://api.archbee.com/api/optimize/pu5VMc-2TW3GQX4ly5Xp7/--HJkNDJmnMExvxMWTNpb_image6.png)



