swag-annotation README
Make annotation for https://github.com/swaggo/swag :)
command
"commands": [
{
"command": "swag-annotation.generalTemplate",
"title": "Swag Annotation: Insert template(general)",
"description": "Insert template for swag General API annotation"
},
{
"command": "swag-annotation.operationTemplate",
"title": "Swag Annotation: Insert template(operation)",
"description": "Insert template for swag API Operation annotation"
},
{
"command": "swag-annotation.generate",
"title": "Swag Annotation: Generate",
"description": "Generate swag API Operation annotation"
}
],
config
{
"swag-annotation.general.template": {
"default": "// @title Swagger Example API\n// @version 1.0\n// @description This is a sample server celler server.\n// more -> https://swaggo.github.io/swaggo.io/declarative_comments_format/general_api_info.html",
"description": "General API annotations"
},
"swag-annotation.operation.template": {
"default": "// @Summary Show a account\n// @Description get string by ID\n// @Accept json\n// @Produce json\n// @Param id path int true \"Account ID\"\n// @Success 200 {object} model.Account\n// @Header 200 {string} Token \"qwerty\"\n// @Failure 400,404 {object} httputil.HTTPError\n// @Failure 500 {object} httputil.HTTPError\n// @Failure default {object} httputil.DefaultError\n// @Router /accounts/{id} [get]\n// more -> https://swaggo.github.io/swaggo.io/declarative_comments_format/api_operation.html",
"description": "API Operation annotations"
}
}
| |