golang-swagger
Document Go APIs with Swagger
Go API annotations often become incomplete, inconsistent, or difficult to generate. This skill guides accurate OpenAPI documentation, Swagger UI wiring, and schema generation with swaggo.
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "golang-swagger" from https://skillstore.io/skills/samber-golang-swagger.md and its manifest at https://skillstore.io/api/skills/samber-golang-swagger/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「golang-swagger」。 A Gin service has generated docs, but Swagger UI displays an empty specification.
預期結果:
The fix is to register the generated docs package with a blank import, mount the Gin Swagger handler, regenerate the specification, and verify the route.
正在使用「golang-swagger」。 An endpoint returns a response envelope whose data field contains a user object.
預期結果:
The documentation should use nested response composition so the generated schema shows the concrete user model inside the envelope.
正在使用「golang-swagger」。 A user model needs documented roles, score limits, examples, and a hidden secret field.
預期結果:
Use struct tags for allowed values, numeric bounds, example values, and Swagger-only exclusion while preserving required JSON serialization.
安全審計
安全All 89 static findings are false positives caused by Markdown backticks, documentation URLs, Go annotations, evaluation text, or tool metadata rather than executable threats. Review of the three scanned files found no prompt-injection text, unauthorized network behavior, or data-exfiltration intent.
風險因素
⚙️ 外部命令 (50)
🌐 網路存取 (4)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/samber-golang-swagger/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/samber-golang-swagger?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/samber-golang-swagger?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-swagger/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/samber-golang-swagger.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
samber. (2026). golang-swagger security audit report (audit version 1) [Author version 1.1.2]. Skillstore. https://skillstore.io/skills/samber-golang-swagger/audits/1BibTeX 引用
@techreport{samber-samber-golang-swagger-2026,
author = {samber},
title = {golang-swagger security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-swagger/audits/1},
note = {Author version 1.1.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-swagger security audit report (audit version 1)"
version: "1.1.2"
type: report
authors:
- name: "samber"
date-released: "2026-09-23"
url: "https://skillstore.io/skills/samber-golang-swagger/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-swagger:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 中你可以打造什麼
Document a New Go API
Create endpoint annotations, response schemas, and a generated Swagger UI for a new Go service.
Repair an Existing Specification
Find annotation gaps, stale generated files, invalid response types, and missing security requirements.
Standardize Team Documentation
Apply consistent schemas, naming, constraints, examples, and framework wiring across multiple Go services.
試試這些提示
Document this Go endpoint with a summary, parameters, success response, failure response, and route annotation. Explain where each comment belongs.
Connect generated swag documentation to my Go framework and explain the required imports, route registration, generation command, and verification steps.
Improve this API schema for nested response data, map values, timestamps, byte fields, enums, examples, and validation constraints. Identify unsupported patterns.
Review this Go service documentation for missing routes, inaccurate schemas, inconsistent annotations, stale generated files, and missing security requirements. Return prioritized fixes.
最佳實務
- Regenerate documentation after annotation or model changes, then review the generated schema for accuracy.
- Keep security definitions and endpoint requirements explicit, consistent, and aligned with deployed authentication.
- Use named response types and focused annotations when generic maps or envelopes would produce ambiguous schemas.
避免
- Do not publish stale generated documentation that differs from current handlers or models.
- Do not hide fields with JSON exclusion when the application still needs to serialize them.
- Do not expose production Swagger UI without authentication, authorization, or an intentional deployment policy.
常見問題
Which Go frameworks does this skill cover?
Does this skill generate the OpenAPI files?
Can it document authentication?
How does it handle fields that Swagger should hide?
Can it document generic or nested responses?
Does it test the API implementation?
開發者詳細資訊
作者
samber授權
MIT
作者版本
v1.1.2
Skillstore 修訂
r1
引用
2aa351cb09c29b7287d263bd8ea81e9bee3b2a61
維護新鮮度
2026/9/30
使用量
0 次下載 · 0 次瀏覽
檔案結構