Skip to content

[SPIKE option C] Flatten Event; additive /edge (INTER-2457) - #50

Closed
JuroUhlar wants to merge 5 commits into
mainfrom
spike/INTER-2457-option-c
Closed

JuroUhlar wants to merge 5 commits into
mainfrom
spike/INTER-2457-option-c

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

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().

  • Event still has getIdentification() / getSource(): EventSource. Empty ctor + fluent setters.
  • Additive analyzeRequestForAutomationIntelligence(EdgeRequest): EventEdge.
  • scripts/sync.sh now downloads fingerprint-server-api-v4-normalized.yaml (this repo already generated from the normalized file; sync was pointed at union v4.yaml).

Known: Event property order

Huge Event.java diff is getter order in the file. No all-args constructor, so call sites are unchanged.

INTER-2457 option C. Event stays a single model; EventEdge is additive for POST /edge.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /edge endpoint client method analyzeRequestForAutomationIntelligence(EdgeRequest) returning EventEdge.
  • Introduced new models EdgeRequest, EdgeRequestHeadersInner, and EventEdge and updated webhook mock payload to include source.
  • Updated generated spec artifacts and documentation (including switching scripts/sync.sh to download fingerprint-server-api-v4-normalized.yaml) and reordered/expanded Event fields/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/EventEdge return types, but this overload returns Event and EventDevice is 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/EventEdge return types, but getEventWithHttpInfo returns ApiResponse<Event> and EventDevice does 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 getEvent returns EventDevice/EventEdge, but the generated SDK method returns Event and there is no EventDevice model. 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.

Comment thread sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java Outdated
Comment thread res/fingerprint-server-api.yaml Outdated
Comment thread docs/FingerprintApi.md
Region.ASIA
*/
FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE);
EdgeRequest edgeRequest = new EdgeRequest(); // EdgeRequest |
Comment thread sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java Outdated
Comment thread docs/EdgeRequest.md Outdated
@JuroUhlar

Copy link
Copy Markdown
Contributor Author

@copilot review

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

@JuroUhlar

Copy link
Copy Markdown
Contributor Author

This was a prototype done as part of a spike. Closing now, still usable as a reference during the production implementation.

@JuroUhlar JuroUhlar closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants