File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/io/swagger/codegen/v3/generators Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ public abstract class DefaultCodegenConfig implements CodegenConfig {
169
169
170
170
protected String ignoreFilePathOverride ;
171
171
protected boolean useOas2 = false ;
172
+ protected boolean copyFistAllOfProperties = false ;
172
173
173
174
public List <CliOption > cliOptions () {
174
175
return cliOptions ;
@@ -1353,7 +1354,10 @@ else if (schema instanceof ComposedSchema) {
1353
1354
if (codegenModel .interfaces == null ) {
1354
1355
codegenModel .interfaces = new ArrayList <String >();
1355
1356
}
1356
- for (int i = 1 ; i < allOf .size (); i ++) {
1357
+ for (int i = 0 ; i < allOf .size (); i ++) {
1358
+ if (i == 0 && !copyFistAllOfProperties ) {
1359
+ continue ;
1360
+ }
1357
1361
Schema interfaceSchema = allOf .get (i );
1358
1362
if (StringUtils .isBlank (interfaceSchema .get$ref ())) {
1359
1363
continue ;
Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ public void processOpts() {
236
236
modelPackage = packageName + "." + modelPackage ;
237
237
apiPackage = packageName + "." + apiPackage ;
238
238
239
+ copyFistAllOfProperties = true ;
240
+
239
241
}
240
242
241
243
private static String dropDots (String str ) {
You can’t perform that action at this time.
0 commit comments