OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA] Query param '$select' is URL encoded twice as '%2524select' instead of '%24select'
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Consuming the getTransactions method with a $select param with value "foo" results in a client calling something like
/transtactions%2524select=foo
instead of
/transtactions%24select=foo
openapi-generator version
7.3.0
OpenAPI declaration file content or url
{
"openapi": "3.0.1",
"info": {
"title": "Test",
"version": "1.0.0"
},
"servers": [
{
"url": "https://some-url"
}
],
"paths": {
"/transactions": {
"get": {
"tags": [
"transactions"
],
"operationId": "getAlltransactions",
"parameters": [
{
"name": "$select",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "transactions response",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
}
}
Generation Details
Java - Resttemplate
Steps to reproduce
Related issues/PRs
Suggest a fix
The query params should not be URL encoded twice.
The expected result is
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 with Java Resttemplate generation using the supplied OpenAPI declaration and inspect how the $select query parameter becomes part of the request URL. Confirm the generated client sends %24select rather than %2524select, and add or update coverage for this declaration if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100