API: Add const, func, and struct comments for easier troubleshooting

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-30 22:02:43 +02:00
parent bbf6580512
commit 983cbb50ff
6 changed files with 23 additions and 6 deletions

View File

@@ -2,11 +2,9 @@ package api
import "time"
// Schema Overrides for Swagger generation.
// Override the generated schema for time.Duration to avoid unstable enums
// from the standard library constants (Nanosecond, Minute, etc.). Using
// a simple integer schema is accurate (nanoseconds) and deterministic.
// SwaggerTimeDuration overrides the generated schema for time.Duration to avoid unstable enums
// from the standard library constants (Nanosecond, Minute, etc.). Using a simple integer schema is
// accurate (nanoseconds) and deterministic.
//
// @name time.Duration
// @description Duration in nanoseconds (int64). Examples: 1000000000 (1s), 60000000000 (1m).