Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-only-suite/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ owasp-dependency-check = { id = "org.owasp.dependencycheck", version.re

owasp-dependency-check = "13.0.0"

api-detector-core = "1.6.0"
api-detector-core = "1.8.0"
dsl-updater-core = "1.0.0"
javaparser = "3.28.2"
swagger-parser = "2.1.47"
Expand Down
15 changes: 15 additions & 0 deletions doppelganger-api-detector/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,21 @@ private String usersByUsernamePath;
mockMvc.perform(get(usersByUsernamePath, "alice"));
----

A constant declared in another class, such as `GetUserOperation.PATH`, resolves the same way: it is
looked up in the merged `propertyFiles` map under the key `SimpleClassName.FIELD`, whether the
reference is written simply or fully qualified. The API-Only TranscriberJ writes such a file for the
operation classes it generates, so a project using it only points `propertyFiles` at that file:

[source,java]
----
// Constant pattern - only propertyFiles needs to be configured, with an entry such as
// GetUserOperation.PATH=/v1/users/{username}
mockMvc.perform(get(GetUserOperation.PATH, "alice"));
----

Without a matching key, another class's constant resolves to nothing, as it always did. The plugin
itself does not depend on the TranscriberJ.

Matching is by simple class/method name only, exactly like every other scanner in this plugin -
no classpath is consulted, so `ApiEndpoints` never needs to be on the plugin's own classpath.
Both `propertyFiles` and `pathResolverHelperMethods` default to empty, so a project that doesn't
Expand Down
2 changes: 1 addition & 1 deletion doppelganger-api-detector/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ owasp-dependency-check = { id = "org.owasp.dependencycheck", version.re

owasp-dependency-check = "13.0.0"

api-detector-core = "1.6.1"
api-detector-core = "1.8.0"
dsl-updater-core = "1.0.0"
javaparser = "3.28.2"
swagger-parser = "2.1.47"
Expand Down
2 changes: 1 addition & 1 deletion mirage-api-detector/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ owasp-dependency-check = { id = "org.owasp.dependencycheck", version.re

owasp-dependency-check = "13.0.0"

api-detector-core = "1.6.1"
api-detector-core = "1.8.0"
dsl-updater-core = "1.0.0"
javaparser = "3.28.2"
swagger-parser = "2.1.46"
Expand Down
2 changes: 1 addition & 1 deletion shadow-api-detector/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ owasp-dependency-check = { id = "org.owasp.dependencycheck", version.re

owasp-dependency-check = "13.0.0"

api-detector-core = "1.6.1"
api-detector-core = "1.8.0"
dsl-updater-core = "1.0.0"
javaparser = "3.28.2"
swagger-parser = "2.1.46"
Expand Down
Loading