Skip to content

Commit b3133a2

Browse files
jonschoningwing328
authored andcommitted
[haskell-http-client] fix bug when generating models-only (#6931)
1 parent 473dfde commit b3133a2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,17 @@ public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
580580
ops.get(0).vendorExtensions.put(X_HAS_NEW_TAG, true);
581581
}
582582

583+
updateGlobalAdditionalProps();
584+
return ret;
585+
}
586+
587+
@Override
588+
public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
589+
updateGlobalAdditionalProps();
590+
return super.postProcessAllModels(objs);
591+
}
592+
593+
public void updateGlobalAdditionalProps() {
583594
additionalProperties.put(X_HAS_UNKNOWN_MIME_TYPES, !unknownMimeTypes.isEmpty());
584595

585596
Collections.sort(unknownMimeTypes, new Comparator<Map<String, String>>() {
@@ -601,8 +612,6 @@ public int compare(Map<String,Object> o1, Map<String,Object> o2) {
601612
}
602613
});
603614
additionalProperties.put(X_ALL_UNIQUE_PARAMS, params);
604-
605-
return ret;
606615
}
607616

608617
@Override

0 commit comments

Comments
 (0)