diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalysis.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalysis.java index 8ac42a84f87a..ce28f0634bab 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalysis.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalysis.java @@ -5,6 +5,7 @@ public class EndpointAnalysis { private List usedEndpoints; + private List unusedEndpoints; public EndpointAnalysis(List usedEndpoints, List unusedEndpoints) { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalyzer.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalyzer.java index 32867618e02c..acf7f447432b 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalyzer.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointAnalyzer.java @@ -37,8 +37,9 @@ private static void analyzeEndpoints() { List endpointClasses = mapper.readValue(new File(EndpointParser.ENDPOINT_PARSING_RESULT_PATH), new TypeReference>() { }); - List restCallFiles = mapper.readValue(new File(EndpointParser.REST_CALL_PARSING_RESULT_PATH), new TypeReference>() { - }); + List restCallFiles = mapper.readValue(new File(EndpointParser.REST_CALL_PARSING_RESULT_PATH), + new TypeReference>() { + }); List endpointsAndMatchingRestCalls = new ArrayList<>(); List unusedEndpoints = new ArrayList<>(); diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointClassInformation.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointClassInformation.java index 0b9d4b31e64a..749adc4772ad 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointClassInformation.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointClassInformation.java @@ -2,12 +2,12 @@ import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - public class EndpointClassInformation { private String filePath; + private String classRequestMapping; + private List endpoints; public EndpointClassInformation() { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointInformation.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointInformation.java index da5704352c9f..b4a30ca1dfa4 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointInformation.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointInformation.java @@ -3,16 +3,21 @@ import java.util.List; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; public class EndpointInformation { private String requestMapping; + private String endpoint; + private String httpMethodAnnotation; + private String URI; + private String className; + private int line; + private List otherAnnotations; public EndpointInformation() { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointParser.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointParser.java index 1662142fe0b5..6f26503f280b 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointParser.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/EndpointParser.java @@ -172,8 +172,8 @@ private static String extractClassRequestMapping(ClassOrInterfaceDeclaration jav return singleMemberAnnotationExpr.getMemberValue().toString(); } else if (annotation instanceof NormalAnnotationExpr normalAnnotationExpr) { - return normalAnnotationExpr.getPairs().stream().filter(pair -> "path".equals(pair.getNameAsString())).map(pair -> pair.getValue().toString()) - .findFirst().orElse(""); + return normalAnnotationExpr.getPairs().stream().filter(pair -> "path".equals(pair.getNameAsString())).map(pair -> pair.getValue().toString()).findFirst() + .orElse(""); } return ""; }).orElse(""); diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallAnalysis.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallAnalysis.java index 4b5a6049ee2c..e76b766f16b2 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallAnalysis.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallAnalysis.java @@ -5,6 +5,7 @@ public class RestCallAnalysis { private List restCallsWithMatchingEndpoints; + private List restCallsWithoutMatchingEndpoints; public RestCallAnalysis(List restCallsWithMatchingEndpoints, List restCallsWithoutMatchingEndpoints) { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallFileInformation.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallFileInformation.java index 4eb9e46d7451..99dfdbe78cda 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallFileInformation.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallFileInformation.java @@ -1,10 +1,9 @@ package de.tum.cit.endpointanalysis; -import com.fasterxml.jackson.annotation.JsonProperty; - public class RestCallFileInformation { String fileName; + RestCallInformation[] restCalls; public RestCallFileInformation() { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallInformation.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallInformation.java index db4cb63114c5..1dacc4b4526b 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallInformation.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallInformation.java @@ -3,8 +3,11 @@ public class RestCallInformation { private String method; + private String url; + private int line; + private String fileName; public RestCallInformation() { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallWithMatchingEndpoint.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallWithMatchingEndpoint.java index 79f01b64a425..f8b2b435a34b 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallWithMatchingEndpoint.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallWithMatchingEndpoint.java @@ -3,7 +3,9 @@ public class RestCallWithMatchingEndpoint { private EndpointInformation matchingEndpoint; + private RestCallInformation restCallInformation; + private String filePath; public RestCallWithMatchingEndpoint(EndpointInformation matchingEndpoint, RestCallInformation restCallInformation, String filePath) { diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/UsedEndpoints.java b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/UsedEndpoints.java index 7a4ea9267d03..ed625f003c8a 100644 --- a/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/UsedEndpoints.java +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/UsedEndpoints.java @@ -5,7 +5,9 @@ public class UsedEndpoints { private EndpointInformation endpointInformation; + private List matchingRestCalls; + private String filePath; public UsedEndpoints(EndpointInformation endpointInformation, List matchingRestCalls, String filePath) {