@@ -913,16 +913,16 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
913
913
914
914
List <String > consumes = new ArrayList <String >();
915
915
if (operation .getConsumes () != null ) {
916
- if (operation .getConsumes ().size () > 0 ) {
917
- // use consumes defined in the operation
918
- consumes = operation .getConsumes ();
919
- } else {
920
- // empty list, do nothing to override global setting
921
- }
916
+ if (operation .getConsumes ().size () > 0 ) {
917
+ // use consumes defined in the operation
918
+ consumes = operation .getConsumes ();
919
+ } else {
920
+ // empty list, do nothing to override global setting
921
+ }
922
922
} else if (swagger != null && swagger .getConsumes () != null && swagger .getConsumes ().size () > 0 ) {
923
- // use consumes defined globally
924
- consumes = swagger .getConsumes ();
925
- LOGGER .debug ("No consumes defined in operation. Using global consumes (" + swagger .getConsumes () + ") for " + op .operationId );
923
+ // use consumes defined globally
924
+ consumes = swagger .getConsumes ();
925
+ LOGGER .debug ("No consumes defined in operation. Using global consumes (" + swagger .getConsumes () + ") for " + op .operationId );
926
926
}
927
927
928
928
// if "consumes" is defined (per operation or using global definition)
@@ -946,16 +946,16 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
946
946
947
947
List <String > produces = new ArrayList <String >();
948
948
if (operation .getProduces () != null ) {
949
- if (operation .getProduces ().size () > 0 ) {
950
- // use produces defined in the operation
951
- produces = operation .getProduces ();
952
- } else {
953
- // empty list, do nothing to override global setting
954
- }
949
+ if (operation .getProduces ().size () > 0 ) {
950
+ // use produces defined in the operation
951
+ produces = operation .getProduces ();
952
+ } else {
953
+ // empty list, do nothing to override global setting
954
+ }
955
955
} else if (swagger != null && swagger .getProduces () != null && swagger .getProduces ().size () > 0 ) {
956
- // use produces defined globally
957
- produces = swagger .getProduces ();
958
- LOGGER .debug ("No produces defined in operation. Using global produces (" + swagger .getProduces () + ") for " + op .operationId );
956
+ // use produces defined globally
957
+ produces = swagger .getProduces ();
958
+ LOGGER .debug ("No produces defined in operation. Using global produces (" + swagger .getProduces () + ") for " + op .operationId );
959
959
}
960
960
961
961
// if "produces" is defined (per operation or using global definition)
0 commit comments