Skip to content

Commit 9022f47

Browse files
committed
Move out the client codegen with custom features to its own class
1 parent f1cc156 commit 9022f47

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ public CustomJavaClientCodegen( GenerationConfiguration config )
4646
super.updatePropertyForArray(property, innerProperty);
4747

4848
if( USE_FLOAT_ARRAYS.isEnabled(config) && innerProperty.isNumber && property.isArray ) {
49-
property.dataType = "float[]";
5049
property.datatypeWithEnum = "float[]";
51-
property.isArray = false; // set false to omit `add{{nameInPascalCase}}Item(...)` convenience method
5250
property.vendorExtensions.put("isPrimitiveArray", true);
5351
}
5452
}
@@ -58,7 +56,7 @@ public CustomJavaClientCodegen( GenerationConfiguration config )
5856
@Nullable
5957
public String toDefaultValue( @Nonnull final CodegenProperty cp, @Nonnull final Schema schema )
6058
{
61-
if( USE_FLOAT_ARRAYS.isEnabled(config) && "float[]".equals(cp.dataType) ) {
59+
if( USE_FLOAT_ARRAYS.isEnabled(config) && "float[]".equals(cp.datatypeWithEnum) ) {
6260
return null;
6361
}
6462
return super.toDefaultValue(cp, schema);

0 commit comments

Comments
 (0)