Skip to content

[BUG] [Java] [Vertx] Path parameter white space is encoded as + instead of %20 #21401

@oscarobr

Description

@oscarobr

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Vertx

Path parameter encoding is using + instead of %20 for white spaces when using vertx library for java.
The generated code is using URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());

openapi-generator version

7.13.0

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\+", "%20");

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions