feat(openapi): annotate track subsystem (social/analytics/search/hls/waveform) — v1.0.8 B-annot
Second batch of the Veza backend OpenAPI annotation campaign. Completes
the track/ handler subtree — 22 more handlers annotated across 5 files —
so the orval-generated frontend client now covers the full track API
surface (stream, download, like, repost, share, search, recommendations,
stats, history, play, waveform, version restore).
Handlers annotated:
- internal/core/track/track_social_handler.go (11):
LikeTrack, UnlikeTrack, GetTrackLikes, GetUserLikedTracks,
GetUserRepostedTracks, CreateShare, GetSharedTrack, RevokeShare,
RepostTrack, UnrepostTrack, GetRepostStatus
- internal/core/track/track_analytics_handler.go (4):
GetTrackStats, GetTrackHistory, RecordPlay, RestoreVersion
- internal/core/track/track_search_handler.go (3):
GetRecommendations, GetSuggestedTags, SearchTracks
- internal/core/track/track_hls_handler.go (3):
HandleStreamCallback (internal), DownloadTrack, StreamTrack
— both user-facing endpoints document the v1.0.8 P2 302-to-signed-URL
behavior for S3-backed tracks alongside the local-FS path.
- internal/core/track/track_waveform_handler.go (1): GetWaveform
All comment blocks converge on the established template:
Summary / Description / Tags / Accept/Produce / Security (BearerAuth
when required) / typed Param path|query|body / Success envelope
handlers.APIResponse{data=...} / Failure 400/401/403/404/500 / Router.
track_hls_handler.go + track_waveform_handler.go receive a blank
import of internal/handlers so swaggo's type resolver can locate
handlers.APIResponse without forcing the file to call that package
at runtime.
Spec coverage:
/tracks/* paths: 13 → 29
make openapi: ✅ valid (Swagger 2.0)
go build ./...: ✅
openapi.yaml: +780 lines describing 16 new track endpoints.
Leaves /internal/core/ subsystems still blank: admin, moderation,
analytics/*, auth/handler.go (duplicates routes handled elsewhere),
discover, feed. Batch 2b next will cover playlists + marketplace gap
so the 4 frontend services (auth/users/tracks/playlists) become
fully orval-migratable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>