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
  • #11032
Closed
Open
Issue created Dec 03, 2021 by Administrator@rootContributor

[BUG] [Java] The Java openapi client doesn't send query parameters that contain spaces.

Created by: alanxoc3

Description

The client that gets generated for java doesn't allow query parameters that only contain whitespace. Like "%20%20%0A". When the generated client makes a request like that, it will send an empty string instead.

The fix should be to just remove these lines: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/Pair.mustache#L44-L46

The original commit this came from is: https://github.com/OpenAPITools/openapi-generator/commit/7a9a41fe01d4c7d1f7bfc53c2c36440913c43e84

I don't understand why it would be a good idea to trim spaces here, hence the bug report.

openapi-generator version

master, see description.

Steps to reproduce

Pass just spaces as a query parameter to a generated java client. That query parameter will be empty before it sends the request.

Assignee
Assign to
Time tracking