You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Description
Single quotes are not escaped and break the code. From the given example, the inline_object.py contains this line: def __init__(self, highlight='A text containing 'single' quotes'): # noqa: E501.
Escape single quotes or use double quotes. I'm not familiar with the source code of the generator, so I can't fix it.
If given a hint where put the fix, I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Single quotes are not escaped and break the code. From the given example, the
inline_object.py
contains this line:def __init__(self, highlight='A text containing 'single' quotes'): # noqa: E501
.Expected:
def __init__(self, highlight='A text containing \'single\' quotes'): # noqa: E501
or:
def __init__(self, highlight="A text containing 'single' quotes"): # noqa: E501
openapi-generator version
v4.0.0-beta3
OpenAPI declaration file content or url
-->
Command line used for generation
java -jar openapi-generator-cli-4.0.0-beta3.jar generate -i example.json -g python -o example-client
Steps to reproduce
Run the given command with the given example.
Related issues/PRs
Nothing found
Suggest a fix
Escape single quotes or use double quotes. I'm not familiar with the source code of the generator, so I can't fix it.
If given a hint where put the fix, I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered: