@@ -1535,36 +1535,6 @@ public CodegenModel fromModel(String name, Schema schema, Map<String, Schema> al
1535
1535
return m ;
1536
1536
}
1537
1537
1538
- /**
1539
- * Recursively look for a discriminator in the interface tree
1540
- *
1541
- * @param schema composed schema
1542
- * @param allDefinitions all schema defintion
1543
- * @return true if it's a discriminator
1544
- */
1545
- private boolean isDiscriminatorInInterfaceTree (ComposedSchema schema , Map <String , Schema > allDefinitions ) {
1546
- if (schema == null || allDefinitions == null || allDefinitions .isEmpty ()) {
1547
- return false ;
1548
- }
1549
- if (schema .getDiscriminator () != null ) {
1550
- return true ;
1551
- }
1552
- final List <Schema > interfaces = getInterfaces (schema );
1553
- if (interfaces == null ) {
1554
- return false ;
1555
- }
1556
- for (Schema interfaceSchema : interfaces ) {
1557
- if (interfaceSchema .getDiscriminator () != null ) {
1558
- return true ;
1559
- }
1560
- // TODO revise the logic below
1561
- if (interfaceSchema instanceof ComposedSchema ) {
1562
- return isDiscriminatorInInterfaceTree ((ComposedSchema ) interfaceSchema , allDefinitions );
1563
- }
1564
- }
1565
- return false ;
1566
- }
1567
-
1568
1538
protected void addAdditionPropertiesToCodeGenModel (CodegenModel codegenModel , Schema schema ) {
1569
1539
addParentContainer (codegenModel , codegenModel .name , schema );
1570
1540
}
@@ -2958,20 +2928,6 @@ private static List<CodegenParameter> addHasMore(List<CodegenParameter> objs) {
2958
2928
return objs ;
2959
2929
}
2960
2930
2961
- private static Map <String , Object > addHasMore (Map <String , Object > objs ) {
2962
- if (objs != null ) {
2963
- for (int i = 0 ; i < objs .size () - 1 ; i ++) {
2964
- if (i > 0 ) {
2965
- objs .put ("secondaryParam" , true );
2966
- }
2967
- if (i < objs .size () - 1 ) {
2968
- objs .put ("hasMore" , true );
2969
- }
2970
- }
2971
- }
2972
- return objs ;
2973
- }
2974
-
2975
2931
/**
2976
2932
* Add operation to group
2977
2933
*
@@ -3989,19 +3945,6 @@ public static Set<String> getProducesInfo(OpenAPI openAPI, Operation operation)
3989
3945
return produces ;
3990
3946
}
3991
3947
3992
- protected Schema detectParent (ComposedSchema composedSchema , Map <String , Schema > allSchemas ) {
3993
- if (composedSchema .getAllOf () != null && !composedSchema .getAllOf ().isEmpty ()) {
3994
- Schema schema = composedSchema .getAllOf ().get (0 );
3995
- String ref = schema .get$ref ();
3996
- if (StringUtils .isBlank (ref )) {
3997
- return null ;
3998
- }
3999
- ref = ModelUtils .getSimpleRef (ref );
4000
- return allSchemas .get (ref );
4001
- }
4002
- return null ;
4003
- }
4004
-
4005
3948
protected String getParentName (ComposedSchema composedSchema , Map <String , Schema > allSchemas ) {
4006
3949
if (composedSchema .getAllOf () != null && !composedSchema .getAllOf ().isEmpty ()) {
4007
3950
Schema schema = composedSchema .getAllOf ().get (0 );
@@ -4033,12 +3976,6 @@ protected String getCollectionFormat(Parameter parameter) {
4033
3976
}
4034
3977
}
4035
3978
4036
- // TODO do we still need the methdo below?
4037
- protected static boolean hasSchemaProperties (Schema schema ) {
4038
- final Object additionalProperties = schema .getAdditionalProperties ();
4039
- return additionalProperties != null && additionalProperties instanceof Schema ;
4040
- }
4041
-
4042
3979
public CodegenType getTag () {
4043
3980
return null ;
4044
3981
}
@@ -4362,10 +4299,6 @@ public CodegenParameter fromRequestBody(RequestBody body, Map<String, Schema> sc
4362
4299
return codegenParameter ;
4363
4300
}
4364
4301
4365
- protected void addOption (String key , String description ) {
4366
- addOption (key , description , null );
4367
- }
4368
-
4369
4302
protected void addOption (String key , String description , String defaultValue ) {
4370
4303
CliOption option = new CliOption (key , description );
4371
4304
if (defaultValue != null )
0 commit comments