Commit 26c0d991 authored by William Cheng's avatar William Cheng
Browse files

handle type null example properly

1 merge request!6394[Python] handle type `null` example properly
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment