Skip to content

Commit

Permalink
changed mapping from array of linkedhashmap to linkedhashmap
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla committed Sep 12, 2023
1 parent 8bf6b55 commit 6b14023
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions examples/spec/twilio_api_v2010.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ paths:
dependentProperties:
address:
mapping:
- account_sid: sid
account_sid: sid
resource_url: /Accounts/{account_sid}/Addresses.json
application:
mapping:
- account_sid: sid
account_sid: sid
resource_url: /Accounts/{account_sid}/Applications.json
/2010-04-01/Accounts/{Sid}.json:
description: A top-level resource instance
Expand Down Expand Up @@ -420,8 +420,8 @@ paths:
dependentProperties:
address:
mapping:
- account_sid: account_sid
test_call_sid: sid
account_sid: account_sid
test_call_sid: sid
resource_url: Accounts/{account_sid}/Addresses/{test_call_sid}/Test.json
pathType: list
/2010-04-01/Accounts/{AccountSid}/Calls/{TestInteger}.json:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private Map<String, String> mapOperationsDependents(CodegenOperation operation){
for(Map.Entry<String, LinkedHashMap<String, Object>> propertiesDetails : dependentProperties.entrySet()){
String mountName = propertiesDetails.getKey();
dependentParams = "";
LinkedHashMap<String, String> mapping = ((List<LinkedHashMap<String, String>>)propertiesDetails.getValue().get("mapping")).get(0);
LinkedHashMap<String, String> mapping = (LinkedHashMap<String, String>)propertiesDetails.getValue().get("mapping");
if(!seenParams.contains(mountName)) {
for (Map.Entry<String, String> mappingEntry : mapping.entrySet()) {
String dependent = mappingEntry.getKey() + ": @solution[:" + mappingEntry.getValue()+ "], ";
Expand Down

0 comments on commit 6b14023

Please sign in to comment.