Repository navigation
feat(api-detector-core): resolve another class's constant through the property map - #85
Merged
Merged
Conversation
… property map A path held in another class's constant, such as GetUserOperation.PATH in a class generated from the API contract, cannot be resolved from the file that uses it. LiteralPathResolver now looks such a reference up in the PropertyResolutionContext under the key ClassName.FIELD, by the class's simple name even when the reference is fully qualified, both where it is used directly and where it initializes a field in the same file. A reference whose scope is computed is still not resolved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Arc-E-Tect
added a commit
that referenced
this pull request
Sep 17, 2026
# [1.8.0](api-detector-core-v1.7.0...api-detector-core-v1.8.0) (2026-09-17) ### ✨ New and updated features * **api-detector-core:** resolve another class's constant through the property map ([#85](#85)) ([316347b](316347b)), closes [#85](#85) ### 🐛 Bug Fixes * **dsl-updater-core:** fix all 16 missing-javadoc warnings ([#84](#84)) ([38a1b25](38a1b25)), closes [#84](#84) ### 📝 Documentation * **dsl-updater-core:** update README version to 1.0.1 [skip ci] ([0e899ed](0e899ed)) * **api-detector-core:** update README version to 1.7.0 [skip ci] ([24acc69](24acc69))
Owner
Author
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Arc-E-Tect
added a commit
that referenced
this pull request
Sep 17, 2026
## [0.0.1](api-only-transcriberj-restdocs-v0.0.0...api-only-transcriberj-restdocs-v0.0.1) (2026-09-17) ### ✨ New and updated features * **api-only-transcriberj-restdocs:** add the Spring REST Docs emitter for the API-Only TranscriberJ ([#86](#86)) ([259a71a](259a71a)), closes [#86](#86) * **api-detector-core:** resolve another class's constant through the property map ([#85](#85)) ([316347b](316347b)), closes [#85](#85) ### 📝 Documentation * **api-detector-core:** update README version to 1.8.0 [skip ci] ([590f332](590f332))
Owner
Author
|
🎉 This PR is included in version 0.0.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Owner
Author
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Owner
Author
|
🎉 This PR is included in version 1.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Owner
Author
|
🎉 This PR is included in version 1.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Owner
Author
|
🎉 This PR is included in version 1.0.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
LiteralPathResolvernow resolves a reference to another class's constant, such asGetUserOperation.PATH. It looks the reference up in thePropertyResolutionContextunder the keyClassName.FIELD, using the class's simple name even when the reference is fully qualified. This works where the reference is used directly and where it initializes a field in the same file.Why
The API-Only TranscriberJ generates a class per operation from the API contract, so tests take their endpoint paths from compile-checked constants rather than from
ApiEndpoints.get("key"). A scanner that reads one file at a time cannot see those constants' values. The TranscriberJ therefore writes them to a properties file, keyedClassName.PATH, which the Doppelganger plugin'spropertyFilescan point at.Compatibility
The change is additive, and nothing depends on the TranscriberJ.
@Valuefields resolve exactly as before.