macOS
brew install swaglocal Homebrew formula metadata
安装
brew install swaglocal Homebrew formula metadata
sudo zypper install swagopenSUSE Tumbleweed package metadata · swag · 来源: download.opensuse.org
概览
Automatically generate RESTful API documentation with Swagger 2.0 for Go
历史
swag is the Swaggo command-line generator for producing Swagger 2.0 documentation from Go source-code annotations. It became a common Go ecosystem tool because it lets web services generate API docs without leaving the Go build and source layout.
The swaggo/swag repository was created on GitHub in June 2017. Its README says Swag converts Go annotations to Swagger Documentation 2.0 and provides plugins for popular Go web frameworks so generated output can be served through Swagger UI.
The project reached a v1.0.0 release in November 2017 and continued through the v1.x line while publishing binaries, a Docker image, and `go install` instructions. The README lists integrations for Gin, Echo, Buffalo, net/http, gorilla/mux, chi, Fiber, Hertz, and other Go web stacks.
The standard workflow is to add declarative comments to Go handlers, install the `swag` command, and run `swag init` at the project root. The CLI then writes a docs package plus swagger.json and swagger.yaml outputs, with flags for alternate entry files, output directories, parse depth, dependency parsing, and global overrides via `.swaggo`.
swag is package-nerd relevant because it turns API documentation generation into a reproducible build step for Go projects. Distributions and developer package managers care about it as a standalone CLI, while Go users care that the same tool can be installed as a binary, Docker image, or module-aware `go install` target.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
.swaggo可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
swag | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/swaggo/swag
安装元数据
| 软件包键 | brew:swag |
|---|---|
| 版本 | 1.16.6 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/swag |
| 主页 | https://github.com/swaggo/swag |
| 仓库 | https://github.com/swaggo/swag |
| 上游文档 | https://github.com/swaggo/swag#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/swaggo/swag/archive/refs/tags/v1.16.6.tar.gz |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | swag |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
swag 1.16.6-1.4
Automatically generate RESTful API documentation with Swagger 2.0 for Go
https://github.com/swaggo/swag
sudo zypper install swag来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.