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
  • #834
Closed
Open
Issue created Aug 17, 2018 by Administrator@rootContributor

[JAVA][library: vertx] generated client does not maintain backwards compatibility with older versions of vertx

Created by: ccozzolino

Description

The buildResponseHandler method defined in Java/libraries/vertx/ApiClient.mustache makes a call to Json.decodeValue(String, Class<T>) which is not supported in older versions (< 3.5) of Vert.x. The call should be adjusted to handle all versions.

Swagger-codegen version

All versions with vertx async & rx support

Suggest a fix/enhancement

Change the call from:

resultContent = Json.decodeValue(httpResponse.body(), returnType);

to:

try {
   resultContent = Json.mapper.readValue(httpResponse.bodyAsString(), returnType);
} catch (Exception e) {
   throw new DecodeException("Failed to decode:" + e.getMessage(), e);
}
Assignee
Assign to
Time tracking