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
@status.setterdefstatus(self, status):
"""<omitted> """allowed_values= [None,local, invited, accepted, confirmed, rejected] # noqa: E501ifstatusnotinallowed_values:
raiseValueError(
"Invalid value for `status` ({0}), must be one of {1}"
.format(status, allowed_values)
)
self._status=status
Notice that the line allowed_values = ... isn't valid python code. The enum values need to be surrounded by quotes because they are string types.
Simply run the codegen CLI and check the output file to see the missing quotes in the stub.
Related issues/PRs
This issue is similar to #3196, but the opposite direction. Here we have manually defined an OpenAPI 3.0 YAML, and want to generate python server stub.
Suggest a fix
I'd imagine this bug is specific to the python flask server generator. I'm not too familiar with the code base to navigate to the culprit.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Generated python server stub doesn't have quotes around the enum values. This generates python code with syntax errors.
OpenAPI 3.0 YAML input:
Generated python model stub code:
Notice that the line
allowed_values = ...
isn't valid python code. The enum values need to be surrounded by quotes because they are string types.openapi-generator version
6.2.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Simply run the codegen CLI and check the output file to see the missing quotes in the stub.
Related issues/PRs
This issue is similar to #3196, but the opposite direction. Here we have manually defined an OpenAPI 3.0 YAML, and want to generate python server stub.
Suggest a fix
I'd imagine this bug is specific to the python flask server generator. I'm not too familiar with the code base to navigate to the culprit.
The text was updated successfully, but these errors were encountered: