Skip to content

BUG/MINOR: spec: use string type for storage GET file responses - #139

Closed
jmdelafe wants to merge 2 commits into
haproxytech:masterfrom
jmdelafe:storage-get-response-type-file-tempfile-leak
Closed

jmdelafe wants to merge 2 commits into
haproxytech:masterfrom
jmdelafe:storage-get-response-type-file-tempfile-leak

Conversation

@jmdelafe

Copy link
Copy Markdown
Contributor

Three storage GET endpoints (getOneStorageMap, getOneStorageGeneralFile, getOneStorageSSLCrtListFile) use schema: type: file in their responses. This causes generated clients (e.g. Go/OpenAPI Generator) to create temporary files on disk for every response, which are never cleaned up.

This changes the response schema to type: string for these three endpoints. Request-side type: file parameters (uploads) are not changed.

Fixes #138

@mjuraga

mjuraga commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

A couple of things, first, this would break the API contract, and second not all files need to be text files, there could be binary files uploads. I think the spec in the API is fair and clear, and when using the generated libraries the client should take care of cleaning up the temporary files.

@mjuraga mjuraga closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

specs: type: file responses cause temp file leaks

2 participants