@@ -385,11 +385,13 @@ class Codegen(config: CodegenConfig) {
385
385
" httpMethodLowerCase" -> operation.method.toLowerCase,
386
386
operation.method.toLowerCase -> " true" )
387
387
if (0 < operation.consumes.length) {
388
- val m = new HashMap [String , String ]
389
388
val o = new ListBuffer [Map [String , String ]]
390
389
for (i <- 0 until operation.consumes.length) {
391
- if (i < operation.consumes.length - 1 )
390
+ val m = new HashMap [String , String ]
391
+ if (i < (operation.consumes.length - 1 )) {
392
+ println(i + " , " + operation.consumes.length)
392
393
m += " hasMore" -> " true"
394
+ }
393
395
m += " mediaType" -> operation.consumes(i)
394
396
o += m.toMap
395
397
}
@@ -398,10 +400,10 @@ class Codegen(config: CodegenConfig) {
398
400
properties += " consumes" -> List (Map (" mediaType" -> " application/json" ))
399
401
}
400
402
if (0 < operation.produces.length) {
401
- val m = new HashMap [String , String ]
402
403
val o = new ListBuffer [Map [String , String ]]
403
404
for (i <- 0 until operation.produces.length) {
404
- if (i < operation.produces.length - 1 )
405
+ val m = new HashMap [String , String ]
406
+ if ((i + 1 ) < operation.produces.length)
405
407
m += " hasMore" -> " true"
406
408
m += " mediaType" -> operation.produces(i)
407
409
o += m.toMap
0 commit comments