tagify

command
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

tagify injects a top-level `tags:` array into the swag-generated OpenAPI 2.0 spec so Swagger UI and downstream generators can render tag groups in a deliberate, curated order instead of alphabetical.

Why this exists: swag v1.16.x silently drops package-level `@tag.name` / `@tag.description` general-info directives — verified empirically, confirmed against v2.0.0-rc5 as well. The post- processing shim below papers over the gap. Revisit if a future swag release honors the directives natively.

Usage:

go run ./pkg/webapi/docs/cmd/tagify --json path/to/swagger.json --yaml path/to/swagger.yaml

The tool rewrites both files in place. It preserves swag's byte-for- byte output style (4-space JSON, 2-space YAML, HTML escapes in JSON strings) so `make docs-check` sees stable output across runs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL