swagger-api / swagger-api/swagger-codegen
[JAVA] Bug swagger don't encode Germany character in query params
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The query parameter contain Germany character (more specific, the character ß) is not encoded when we send the request
Swagger-codegen version
3.0.20
Command line used for generation
I am using io.swagger.codegen.v3:swagger-codegen-maven-plugin
Related issues/PRs
https://github.com/swagger-api/swagger-codegen/pull/8880
https://github.com/swagger-api/swagger-codegen/pull/9387
Suggest a fix/enhancement
I checked the method ApiClient#invokeAPI that we currently don't use the encode feature of UriComponentsBuilder or RestTemplate but use ti from method toUri(). At my glance there, the method is just encode the character under ISO control. And it looks like Germany character is not a part of it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Java ApiClient#invokeAPI method and inspect how UriComponentsBuilder or RestTemplate constructs and encodes query parameters. Review related PRs 8880 and 9387 for context. Done means a query parameter containing ß is correctly encoded in the generated request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100