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
  • #13266
Closed
Open
Issue created Aug 24, 2022 by Administrator@rootContributor

[REQ] Add deserializers in generated kotlin models

Created by: kentis

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

Deserializing JSON objects with Jackon, by default, uses reflection. All the information about how to deserialize an object is availbale in the OpenAPI spec. This leads to perfomance issues since reflection is a lot slower than explicitly compiled code. In projects that handle large amounts of JSON data this can become a significant bottleneck when processing.

Describe the solution you'd like

We propose to generate Deserializers when generating Kotlin data classes for a model when using the Jackson library. This allows parsing JSON objects using explicitly compiled code rather than relying on reflection. Experiments show that this achives an approximate 3x speedup of JSON parsing.

Describe alternatives you've considered

We looked at the Afterburner module in Jackson, but this does not utilize the information available in the OpenAPI spec and thus does not give the wanted performance boost.

Assignee
Assign to
Time tracking