Repository navigation
Encoding path parameters - #51
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Validation, generated artifacts, documentation, and focused tests are consistent and complete.
Review effort: Balanced
Findings: None
What changed in this PR
Rejects RFC 3986 dot-segments in generated path parameters to prevent unintended endpoint normalization.
Changes:
- Validates escaped path parameters before requests.
- Documents the restriction in generated APIs and reference docs.
- Adds coverage for rejection and safe encoding behavior.
| File | Description |
|---|---|
template/libraries/jersey3/api.mustache |
Adds generated validation and Javadocs. |
template/libraries/jersey3/api_doc.mustache |
Documents path-parameter restrictions. |
sdk/src/test/java/com/fingerprint/v4/api/PathParameterTest.java |
Tests path encoding and dot-segment rejection. |
sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java |
Applies validation in generated SDK methods. |
docs/FingerprintApi.md |
Updates public API documentation. |
.changeset/reject-dot-segment-path-parameters.md |
Records the patch-level behavior change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
An ID given to `getEvent`, `updateEvent` or `deleteVisitorData` is percent-encoded, so slashes cannot inject extra path segments. A value that is not a valid identifier is now rejected before a request is sent. The check lives in the api.mustache template and is applied to every path parameter on regeneration. The thrown message stays generic, since it can surface to end users. INTER-2503
Orkuncakilkaya
force-pushed
the
inter-2503-path-encoding
branch
from
September 22, 2026 22:38
3792cc8 to
964e73b
Compare
Orkuncakilkaya
marked this pull request as ready for review
September 22, 2026 22:43
Orkuncakilkaya
requested review from
erayaydin,
ilfa,
mcnulty-fp and
necipallef
as code owners
September 22, 2026 22:43
mcnulty-fp
previously approved these changes
Sep 23, 2026
mcnulty-fp
left a comment
Contributor
There was a problem hiding this comment.
LGTM with a few nit picks.
Co-authored-by: Dan McNulty <212590662+mcnulty-fp@users.noreply.github.com>
Co-authored-by: Dan McNulty <212590662+mcnulty-fp@users.noreply.github.com>
The path parameter guard threw ApiException(String), which leaves the status code at its default 0, while the missing-required-parameter guard in the same method throws ApiException(400, ...). Both are client-side parameter validation, so both now report 400. Also drops the isPathParam note from the optional parameter table in api_doc.mustache: a path parameter is always required, so that branch could never render. Generated docs are unchanged.
mcnulty-fp
requested changes
Sep 24, 2026
mcnulty-fp
left a comment
Contributor
There was a problem hiding this comment.
One more small change then this should be good to go. Thanks!
Co-authored-by: Dan McNulty <212590662+mcnulty-fp@users.noreply.github.com>
Applies the exception constructor change from b73f22f to the generated code and drops the matching status code assertion from PathParameterTest.
Contributor
🚀 Following releases will be created using changesets from this PR:java-sdk@8.7.1Patch Changes
|
mcnulty-fp
approved these changes
Sep 24, 2026
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.
No description provided.