Skip to content

Commit

Permalink
Accept header fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Dec 12, 2024
1 parent 1f07156 commit 0e3d03f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/com/twilio/oai/DirectoryStructureService.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ public List<CodegenOperation> processOperations(final OperationsMap results) {
final String version = PathUtils.getFirstPathPart(firstOperation.path);

for(CodegenOperation co : operations){
for(Map<String, String> map : co.produces){
Map.Entry<String, String> firstEntry = map.entrySet().iterator().next();
List<Map<String, String>> successProduce = new ArrayList<>();
Map<String, String> successMap = new HashMap<>();
successMap.put(firstEntry.getKey(), firstEntry.getValue());
successProduce.add(successMap);
co.vendorExtensions.put("successProduce", successProduce);
break;
if(co.produces != null)
for(Map<String, String> map : co.produces){
Map.Entry<String, String> firstEntry = map.entrySet().iterator().next();
List<Map<String, String>> successProduce = new ArrayList<>();
Map<String, String> successMap = new HashMap<>();
successMap.put(firstEntry.getKey(), firstEntry.getValue());
successProduce.add(successMap);
co.vendorExtensions.put("successProduce", successProduce);
break;

}
}
Expand Down

0 comments on commit 0e3d03f

Please sign in to comment.