swagger-api / swagger-api/swagger-codegen
[JAVA] Spring RestTemplate: Encode request URL not work
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
https://github.com/swagger-api/swagger-codegen/pull/8880
this fix is not found in the master of v2
Swagger-codegen version
2.4.21
Suggest a fix/enhancement
change from:
final BodyBuilder requestBuilder = RequestEntity.method(method, builder.build().toUri());
to:
final BodyBuilder requestBuilder = RequestEntity.method(method, builder.build().encode().toUri());
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 RestTemplate request construction using RequestEntity.method and UriComponentsBuilder, then compare the referenced pull request 8880. Done means the request URL is encoded before conversion to a URI and the generated client handles encoded request URLs correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100