[BUG] Options are not parsed correctly
Created by: ackintosh
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? - 4.1.2-SNAPSHOT
-
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
From #japanese slack channel: https://openapi-generator.slack.com/archives/CLTHWFBEJ/p1566966541003500
--type-mappings object=Dict[str, Any],string=String
The parameter above is not parsed correctly.
Expect:
object=Dict[str, Any]
string=String
Actual:
object=Dict[str
Any]
string=String
It's due to the splitCommaSeparatedList implementation that just split by comma:
openapi-generator version
4.1.2-SNAPSHOT
Command line used for generation
openapi-generator \
generate \
--input-spec openapi.yaml \
--generator-name python \
--output /local/out \
--type-mappings object=Dict[str, Any]
Suggest a fix
- Improve the parsing implementation to respect symbols (
[]
,<>
) - or use parsing library that satisfy the requirement