Skip to content

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

Draft
JuroUhlar wants to merge 3 commits into
mainfrom
INTER-2457/schema-review-prototype
Draft

JuroUhlar wants to merge 3 commits into
mainfrom
INTER-2457/schema-review-prototype

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 | schema from openapi#494 @ 78d51f2

Why

To check that the flattened Event that openapi#494 builds for .NET changes nothing for SDK users, at compile time or at runtime.

Things to note

  • No breaking change. The generated diff between the baseline and the 78d51f2 sync is one XML doc comment in Event.cs and docs/models/Event.md. The Event( constructor, all properties, EventSource and its JSON converter, and FingerprintApi are byte-identical. dotnet build is clean (0 errors), and all 91 tests pass, including 2 new ones that also pass on the baseline.
  • Schema-level diff is only Event.description and EnvironmentId moving earlier under components/schemas. Since the generator takes property order from Event.properties (unchanged), the positional constructor (the dotnet-sdk#201 risk) did not move.
  • Pre-existing drift in the baseline commit: the repo was missing 5 examples from v3.9.0 (400_edge_ip_required, 400_edge_unknown_field, 400_request_read_timeout, 413_payload_too_large, get_event_with_edge_200), and webhook_event.json in the 78d51f2 build is a richer example than the v3.9.0 release. No test reads webhook_event.json.

Change outline

Commits:

  1. 48d8fc8 baseline: sync of the published v3.9.0 normalized schema and examples (schema and generated code unchanged, examples added)
  2. 80b1ce9 sync of the 78d51f2 schema and examples, regenerated with generate.sh
  3. e2e4e94 tests

Constructor of Event, before and after (identical):

public Event(string eventId, long timestamp, Option<EventSource?> source = default,
    Option<IncrementalIdentificationStatus?> incrementalIdentificationStatus = default,
    Option<string> linkedId = default, Option<string> environmentId = default,
    Option<bool?> suspect = default, Option<SDK> sdk = default, ... , Option<List<LabelsInner>> labels = default)

The only generated change (Event.cs):

-/// Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals ...
+/// Contains results from Fingerprint Identification and all active Smart Signals, or from the Automation Intelligence API. Check `source` ...

New tests in FingerprintApiTests.cs:

  • GetEventWithoutSourceAsyncTest: get_event_200.json with source removed deserializes into Event, Source is null and not set, Identification is present.
  • GetEdgeEventAsyncTest: get_event_with_edge_200.json (source: edge, no identification) deserializes into Event with Source == EventSource.Edge and Identification == null.

Files:

docs/models/Event.md
res/fingerprint-server-api.yaml
src/Fingerprint.ServerSdk/Model/Event.cs
src/Fingerprint.ServerSdk.Test/
  Api/FingerprintApiTests.cs
  mocks/{errors,events,webhook}/*.json

…ine)

Reproduces the sync workflow against the currently published
fingerprint-server-api-v4-normalized.yaml. Schema and generated code are
unchanged; only examples that were missing from the repo are added.
Schema from fingerprint-server-api-v4-normalized.yaml built at
fingerprintjs/openapi@78d51f2, filtered to the .NET SDK scopes, then
regenerated with generate.sh.
@changeset-bot

changeset-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e2e4e94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@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.

@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