Skip to content

Commit fc8fe61

Browse files
committed
change default wrapComplexType to true
1 parent 9b7bcf0 commit fc8fe61

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

bin/configs/protobuf-schema-config-wrapComplexType.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ additionalProperties:
66
packageName: petstore
77
addJsonNameAnnotation: true
88
numberedFieldNumberList: true
9-
startEnumsWithUnspecified: true
10-
wrapComplexType: true
9+
startEnumsWithUnspecified: true

bin/configs/protobuf-schema-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ additionalProperties:
66
packageName: petstore
77
addJsonNameAnnotation: true
88
numberedFieldNumberList: true
9-
startEnumsWithUnspecified: true
9+
startEnumsWithUnspecified: true
10+
wrapComplexType: false

docs/generators/protobuf-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2121
|addJsonNameAnnotation|Append "json_name" annotation to message field when the specification name differs from the protobuf field name| |false|
2222
|numberedFieldNumberList|Field numbers in order.| |false|
2323
|startEnumsWithUnspecified|Introduces "UNSPECIFIED" as the first element of enumerations.| |false|
24-
|wrapComplexType|Generate Additional message for complex type| |false|
24+
|wrapComplexType|Generate Additional message for complex type| |true|
2525

2626
## IMPORT MAPPING
2727

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf
7474

7575
private boolean addJsonNameAnnotation = false;
7676

77-
private boolean wrapComplexType = false;
77+
private boolean wrapComplexType = true;
7878

7979
@Override
8080
public CodegenType getTag() {

0 commit comments

Comments
 (0)