Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenAPI Tools
openapi-generator
Commits
26c0d991
Commit
26c0d991
authored
5 years ago
by
William Cheng
Browse files
Options
Download
Email Patches
Plain Diff
handle type null example properly
parent
f10de73e
python-null-example
1 merge request
!6394
[Python] handle type `null` example properly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+1
-1
...g/openapitools/codegen/languages/PythonClientCodegen.java
with
1 addition
and
1 deletion
+1
-1
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+
1
-
1
View file @
26c0d991
...
...
@@ -710,7 +710,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
for
(
int
i
=
0
;
i
<
indentation
;
i
++)
indentation_string
+=
" "
;
String
example
=
super
.
toExampleValue
(
schema
);
if
(
ModelUtils
.
isNullType
(
schema
)
&&
null
!=
example
)
{
if
(
ModelUtils
.
isNullType
(
schema
))
{
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
// though this tooling supports it.
return
"None"
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets