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
  • Merge requests
  • !5732

[Java][Client][vert.x] Support per-call authentication and JsonNullable in client request bodies, fix path parameter encoding

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jekkel/vertx-client-fixes into master Mar 27, 2020
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 24

Created by: jekkel

Extensions

Since vertx is an asynchronous/reactive toolkit usage of mutable fields of ApiClient to store authentication prohibits delegation of authentication from incoming call without recreating the client everytime (which is prohibitively expensive due to instantiation of objectmapper). This commit adds a per call authentication override which takes precedence over the mutable fields so a single client can be safely reused. To ease usage a simple builder-style auxiliary AuthInfo object is provided providing methods for each specified authentication.

A new configuration option for ApiClient has been added: timeout. It gets applied as timeout for the vertx http request.

Fixes #6428 (closed)

Request bodies have been wrongly serialized using vert.x built-in ObjectMapper instance instead of the embedded instance thus usage of beans with JsonNullable wrapped fields in request bodies led to bad requests because the required Jackson module is not registered in the vert.x mapper instance.

Fixes #6876 (closed)

Path parameters have been replaced as is in the operation path template. This breaks whenever a parameter contains reserved characters. Now all path parameters are properly URL encoded prior to replacement.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jekkel/vertx-client-fixes