I add the swag package and the swagger service to generate and serve swagger files.
To generate the swagger file run this command:
make swagger-generator
This command is installs swag if it is not installed before then run the swag format command and then generate swagger files.
At this time swagger is generated for two services:
Source
Manager
Each service has a separate route to access the Swagger service.
I add the swag package and the swagger service to generate and serve swagger files.
To generate the swagger file run this command:
This command is installs swag if it is not installed before then run the
swag format
command and then generate swagger files. At this time swagger is generated for two services:Each service has a separate route to access the Swagger service.
The main route of swagger service includes all swagger services links.
For more details on writing operations in swag format, please look at the swag documentation.
Change list:
cmd/manager/main.go
and add swag doc to itcmd/source/main.go
and add swag doc to it