Endpoints
The way to pass extra information to the module is through comments. Each comment can contain one or more #swagger.<...>
. The following topics show how to add each type of information to endpoints.
NOTE: All comments containing #swagger.<...>
must be inside the endpoint functions.
📄️ Tags
To inform which tags the endpoints belong to, use the #swagger.tags, for example:
📄️ Summary
This is the summary of the Endpoint. To add it, use the #swagger.summary, for example:
📄️ Description
This is the description of the Endpoint. To add it, use the #swagger.description, for example:
📄️ Operation ID
This is the operationId of the Endpoint. To add it, use the #swagger.operationId, for example:
📄️ Endpoint as deprecated
Use the #swagger.deprecated = true to inform that a given endpoint is depreciated, for example:
📄️ Ignoring endpoint
Use the #swagger.ignore = true to ignore a specific endpoint. Thus, it will not appear in the documentation, for example:
📄️ Property Inheritance
In order for the same properties to be assigned to all subroutes, declare them in middlewares, such as:
📄️ Manual capture
📄️ Forced Endpoint Creation
If you want to forcibly create an endpoint, use the #swagger.start and #swagger.end, for example: