Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #13327
Closed
Open
Issue created Aug 31, 2022 by Administrator@rootContributor2 of 6 checklist items completed2/6 checklist items

[BUG] Resteasy Response object not closed after API call

Created by: MikeEdgar

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Resteasy client template does not close the Response (implements AutoCloseable).

https://github.com/OpenAPITools/openapi-generator/blob/225204093fa22b6ff1f78bc7b46f8bb3311e4d65/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache#L675-L723

openapi-generator version

6.0.1

OpenAPI declaration file content or url

N/A

Generation Details

N/A

Steps to reproduce

N/A

Related issues/PRs

N/A

Suggest a fix

Handle the Response using try-with-resources, such as: https://github.com/MikeEdgar/openapi-generator/blob/06e93fabbfd66cd4f0f26d47bfba32a9ce3992d4/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache#L675-L730

Assignee
Assign to
Time tracking