Repository navigation
Conversation
INTER-2457 option C. Event stays a single model; EventEdge is additive for POST /edge.
There was a problem hiding this comment.
Pull request overview
SPIKE changes regenerating the Java SDK from the normalized Server API v4 OpenAPI spec to keep Event as a flattened class while adding the new Automation Intelligence /edge endpoint and related models/docs.
Changes:
- Added
/edgeendpoint client methodanalyzeRequestForAutomationIntelligence(EdgeRequest)returningEventEdge. - Introduced new models
EdgeRequest,EdgeRequestHeadersInner, andEventEdgeand updated webhook mock payload to includesource. - Updated generated spec artifacts and documentation (including switching
scripts/sync.shto downloadfingerprint-server-api-v4-normalized.yaml) and reordered/expandedEventfields/getters.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/test/resources/mocks/webhook/webhook_event.json | Adds source field to webhook mock event payload. |
| sdk/src/main/java/com/fingerprint/v4/model/EventEdge.java | New model for Automation Intelligence event response from /edge. |
| sdk/src/main/java/com/fingerprint/v4/model/Event.java | Updates Event description and reorders/adds properties related to edge metadata. |
| sdk/src/main/java/com/fingerprint/v4/model/EdgeRequestHeadersInner.java | New model representing a single forwarded HTTP header entry. |
| sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java | New model representing request metadata sent to /edge. |
| sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java | Adds /edge API method and updates some endpoint docs/links. |
| scripts/sync.sh | Sync now downloads the normalized v4 OpenAPI schema. |
| res/fingerprint-server-api.yaml | Regenerated OpenAPI spec with /edge and updated Event/links. |
| README.md | Adds /edge to API list and includes new models in documentation index. |
| docs/FingerprintApi.md | Documents /edge method and updates existing endpoint docs/links. |
| docs/EventEdge.md | New docs page for EventEdge. |
| docs/Event.md | Updates Event docs to reflect device vs edge source semantics and property order. |
| docs/EdgeRequestHeadersInner.md | New docs page for EdgeRequestHeadersInner. |
| docs/EdgeRequest.md | New docs page for EdgeRequest. |
Suppressed comments (4)
sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java:276
- Javadoc mentions
EventDevice/EventEdgereturn types, but this overload returnsEventandEventDeviceis not present in the codebase.
* Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`.
sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java:300
- Javadoc mentions
EventDevice/EventEdgereturn types, butgetEventWithHttpInforeturnsApiResponse<Event>andEventDevicedoes not exist here.
* Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`.
docs/FingerprintApi.md:223
- This documentation says
getEventreturnsEventDevice/EventEdge, but the generated SDK method returnsEventand there is noEventDevicemodel. The return-type guidance should match the SDK/spec.
Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`.
res/fingerprint-server-api.yaml:1304
- Typo in the schema description: "included, but with with their value" has a duplicated "with".
Headers that contain authentication or session data must still be
included, but with with their value set to an empty string. This
includes headers like `Authorization` and `Cookie`, but may contain
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Region.ASIA | ||
| */ | ||
| FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); | ||
| EdgeRequest edgeRequest = new EdgeRequest(); // EdgeRequest | |
|
@copilot review |
pnpm exec changesetto create a changeset. |
|
This was a prototype done as part of a spike. Closing now, still usable as a reference during the production implementation. |
SPIKE. Do not merge. Option C: Event stays a class. Generated from openapi#465. Not the earlier all-SDK union spike (#49), which turned Event into an interface without
getIdentification().Eventstill hasgetIdentification()/getSource(): EventSource. Empty ctor + fluent setters.analyzeRequestForAutomationIntelligence(EdgeRequest): EventEdge.scripts/sync.shnow downloadsfingerprint-server-api-v4-normalized.yaml(this repo already generated from the normalized file; sync was pointed at unionv4.yaml).Known: Event property order
Huge
Event.javadiff is getter order in the file. No all-args constructor, so call sites are unchanged.