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.