The spec defines several GET endpoints with schema: { type: file } in their 200 responses:
# Example: /services/haproxy/storage/maps/{name}
get:
operationId: getOneStorageMap
produces:
- application/octet-stream
responses:
"200":
description: Successful operation
schema:
type: file # <-- causes *os.File + temp file in Go client
When consumed by the OpenAPI Generator Go client, type: file maps to *os.File. The generated decode() function creates a temporary file on disk (os.CreateTemp) for every API response, but never cleans it up. Over time, this accumulates thousands of files in /tmp.
Suggestion
These endpoints return text content (map files, crt lists). Consider changing the response schema to type: string or type: string with format: binary, which would let Go clients receive the content directly without temp files.
Alternatively, if type: file is intentional, it may be worth documenting that generated clients require callers to explicitly delete the returned file after use.
Why
Each call to these endpoints leaks a temp file. For applications that poll or sync map files frequently, this can fill /tmp on long-running processes.
The spec defines several GET endpoints with
schema: { type: file }in their 200 responses:When consumed by the OpenAPI Generator Go client,
type: filemaps to*os.File. The generateddecode()function creates a temporary file on disk (os.CreateTemp) for every API response, but never cleans it up. Over time, this accumulates thousands of files in/tmp.Suggestion
These endpoints return text content (map files, crt lists). Consider changing the response schema to
type: stringortype: stringwithformat: binary, which would let Go clients receive the content directly without temp files.Alternatively, if
type: fileis intentional, it may be worth documenting that generated clients require callers to explicitly delete the returned file after use.Why
Each call to these endpoints leaks a temp file. For applications that poll or sync map files frequently, this can fill
/tmpon long-running processes.