-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Development: Improve endpoint analysis (#9236)
- Loading branch information
1 parent
d6099e9
commit bff9c88
Showing
8 changed files
with
88 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...dpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallFileInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
package de.tum.cit.endpointanalysis; | ||
|
||
public record RestCallFileInformation(String fileName, RestCallInformation[] restCalls) { | ||
import java.util.List; | ||
|
||
public record RestCallFileInformation(String filePath, List<RestCallInformation> restCalls) { | ||
} |
11 changes: 8 additions & 3 deletions
11
...f-endpoint-connections/src/main/java/de/tum/cit/endpointanalysis/RestCallInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
package de.tum.cit.endpointanalysis; | ||
|
||
public record RestCallInformation(String method, String url, int line, String fileName) { | ||
public record RestCallInformation(String method, String url, String filePath, int line) { | ||
|
||
public String buildCompleteRestCallURI() { | ||
String buildCompleteRestCallURI() { | ||
return this.url.replace("`", ""); | ||
} | ||
|
||
public String buildComparableRestCallUri() { | ||
String buildComparableRestCallUri() { | ||
// Replace arguments with placeholder | ||
String result = this.buildCompleteRestCallURI().replaceAll("\\$\\{.*?\\}", ":param:"); | ||
|
||
// Remove query parameters | ||
result = result.split("\\?")[0]; | ||
|
||
// Some URIs in the artemis client start with a redundant `/`. To be able to compare them to the endpoint URIs, we remove it. | ||
if (result.startsWith("/")) { | ||
result = result.substring(1); | ||
} | ||
|
||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters