Skip to content

Commit

Permalink
Fix API invocation error after migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharika Madurapperuma committed Oct 4, 2024
1 parent f88d331 commit 12c51a3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,12 @@ public Map<String, API> getAllAPIsByContextList() {
apiContextAPIMap.put(api.getContext(), api);
if (api.isDefaultVersion()) {
String context = api.getContext();
String defaultContext = context;
int index = context.lastIndexOf("/" + api.getApiVersion());
apiContextAPIMap.put(context.substring(0, index), api);
if (index != -1) {
defaultContext = context.substring(0, index);
}
apiContextAPIMap.put(defaultContext, api);
}
}
return apiContextAPIMap;
Expand Down

0 comments on commit 12c51a3

Please sign in to comment.