-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
This is an issue with R language generator.
Description
i have an endpoint for which the return type is a dictionary, say Dictonary(string, Object1)
but when the client is generated using openapi-generator-3.3.4.jar the response is just creating an object of type say Object1 instead of a Dictionary equivalent.
I compared the returnType of endpoint in the generated json using the -DdebugOperations with python against that with R
for Python, it has "returnType" : "dict(str, Object1)
for R, it is "returnType" : "Object1"
so the openapi-generator is not generating the returnType key as an equivalent of dictionary for R langauge.
openapi-generator version
3.3.4
OpenAPI declaration file content or url
R generated structure :
using "java -DdebugOperations -jar openapi-generator-cli-3.3.4.jar generate -l r ......."
"isRestful" : false,
"isDeprecated" : false,
"isCallbackRequest" : false,
"path" : "/axxx/px/v1/caxxxxxx",
"operationId" : "get_all_xxxxxx",
**"returnType" : "Oxxxxxxon",** //difference in this line with respect to below json
"httpMethod" : "GET",
"returnBaseType" : "Oxxxxxon",
"returnContainer" : "map",
"summary" : "Get All Oxxxxons",Python generated structure:
using "java -DdebugOperations -jar openapi-generator-cli-3.3.4.jar generate -l python ......."
"isRestful" : false,
"isDeprecated" : false,
"path" : "/axxx/px/v1/caxxxxxx",
"operationId" : "get_all_xxxxxx",
"returnType" : "dict(str, Oxxxxxxon)",
"httpMethod" : "GET",
"returnBaseType" : "Oxxxxxon",
"returnContainer" : "map",
"summary" : "Get All Oxxxxons",From the above the R generation is ignoring the Dictionary and simply returning the bare Object type.
This is causing issue in deserialization in the generated model file.
-->
Command line used for generation
java -DdebugOperations -jar openapi-generator-cli-3.3.4.jar generate -l r
Steps to reproduce
As describe above
Related issues/PRs
NA
@wing328 - looking for your help. Thanks in advance.