Skip to content

INTER-2457: [schema review prototype] flat Event from openapi#494 - #294

Draft
JuroUhlar wants to merge 3 commits into
mainfrom
INTER-2457/spike-flat-event
Draft

JuroUhlar wants to merge 3 commits into
mainfrom
INTER-2457/spike-flat-event

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Note

Schema review prototype, do not merge. This is to test the schema Event split (EventDevice | EventEdge) as part of reviewing koala#18895.

INTER-2457 | koala#18895 | searchEvents order fix: koala#18934 | schema from openapi#494 @ 78d51f2

Why

This checks that the PHP SDK, which moves from fingerprint-server-api-v4.yaml (now the union) to the new flattened fingerprint-server-api-v4-flat.yaml, regenerates with no breaking change from the Event split.

Things to note

  • Not breaking from the Event split. Event is still one class, source is still an optional ?EventSource with the same getter and setter, and no classes, serializers or validators change. 931 tests pass and php-cs-fixer is clean.
  • A separate, older bug, fixed in koala#18934: any automated sync swaps the last two searchEvents arguments back to active_call, source. Commit 1a0e542e on main fixed the order by hand-editing res/fingerprint-server-api.yaml, but koala and the published schema still have active_call first. koala#18934 moves source back above active_call in koala's schema. This is visible in the baseline commit, and #494 doesn't cause it.
  • The baseline commit also brings in 6 mocks from the published v3.9.0 examples that main didn't have.

Change outline

Commits, so the Event change can be reviewed on its own:

432d756  baseline: sync of the published v3.9.0 v4 schema   ← what any sync does today
1d17e6d  flat schema from openapi#494                       ← the Event split
4dfcd7c  tests: edge event, event without `source`

1d17e6d against the baseline:

  src/Model/Event.php
-   * Contains results from Fingerprint Identification and all active Smart Signals. …
+   * Contains results from Fingerprint Identification and all active Smart Signals, or from the Automation Intelligence API. Check `source` … Events stored before `source` was added don't have it; treat them as `device`. …
    public function getSource(): ?EventSource      // unchanged
  res/fingerprint-server-api.yaml                  // same description, EnvironmentId earlier among components
  test/mocks/webhook/webhook_event.json            // newer example from koala via openapi#493

Baseline searchEvents swap (the separate bug, fixed in koala#18934):

- …, ?bool $simulator = null, ?array $source = null, ?bool $active_call = null): EventSearch
+ …, ?bool $simulator = null, ?bool $active_call = null, ?array $source = null): EventSearch

New tests (test/Api/FingerprintApiTest.php):

getEvent with edge payload       → source = edge, no Identification
getEvent with legacy payload     → source = null, device fields intact

@github-actions

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.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 Coverage increased by 97.53%

Code Coverage Report

Coverage Report

St. Category Percentage Covered / Total
🟢 Statements 97.53% 3669 / 3762
🟢 Functions 98.45% 1464 / 1487
Files Coverage
St. File Methods Statements Total Coverage

@JuroUhlar JuroUhlar changed the title [SPIKE] INTER-2457: flat Event from openapi#494 [schema review prototype] INTER-2457: flat Event from openapi#494 Oct 15, 2026
@JuroUhlar JuroUhlar changed the title [schema review prototype] INTER-2457: flat Event from openapi#494 INTER-2457: [schema review prototype] flat Event from openapi#494 Oct 16, 2026

This branch has not been deployed

No deployments
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.

1 participant