Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>swag-annotationNew to Visual Studio Code? Get it now.
swag-annotation

swag-annotation

sakayuka

|
112 installs
| (0) | Free
Generate swag annotations
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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"
  }
}
  • https://swaggo.github.io/swaggo.io/declarative_comments_format/general_api_info.html
  • https://swaggo.github.io/swaggo.io/declarative_comments_format/api_operation.html
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft