Skip to content

[REQ][go] Tempfile is not deleted #15131

@hijiki51

Description

@hijiki51

Is your feature request related to a problem? Please describe.

APIClient creates a temporary file when decoding a response, but it is not deleted afterwards. This causes the /tmp directory to become bloated over time, which can lead to performance and storage issues.

ref: https://github.com/OpenAPITools/openapi-generator/blob/master/samples/openapi3/client/petstore/go/go-petstore/client.go#L480
https://pkg.go.dev/os#CreateTemp

Describe the solution you'd like

Delete temporary files once it is no longer needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions