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
  • #13988
Closed
Open
Issue created Nov 11, 2022 by Administrator@rootContributor

[REQ] swift5 Response type should also contain raw response data

Created by: Jonas1893

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

Current Response type has a body property containing the decoded value of the response data. There are cases where it would be valuable to have access to the (not yet decoded) raw response data, e.g. when logging where we also want to log the raw JSON output.

Describe the solution you'd like

Response type should be enhanced by a new property carrying the raw response data. Current naming of body property is imo misleading as it is the already decoded representation of the response body. I suggest to rename it to decodedResponse and use body for the raw response data. Since this is breaking current API we could also alternatively just use bodyData for the new property name.

Describe alternatives you've considered

It is not possible with reasonable effort to infer raw data from already decoded response as decoder might contain custom logic and there is no guarantee we always have the correct inverse encoder present. Therefor we need the raw data passed in the Response object

Additional context

Assignee
Assign to
Time tracking