feat: migrate to APIv4#1
Conversation
…best from our and openapi-codegen
…ests for API v4 methods
…ests for API v4 methods
…re not removed initially
…rator-ignore` visible for generator
- Some Java tools copy the test resources to the bin directory. This .gitignore covers the case where that happens during local development.
- `build` runs all the same tasks `test` and more. This will ensure issues don't mistakenly get missed by the PR checks.
- Separate update of the gradle version from the generation script - Update the changeset scripts to use the new update-gradle-version script - Update changeset-publish script to just invoke changeset publish. There should be no changes to source files to sync with the gradle config in that step. - Update generate.sh to only generate the code and docs from the schema without attempting to build it. This ensures that compilation failures introduced by a schema change don't block the automatic creation of a PR with the changes. - Update sync.sh to only download the latest and not immediately try to generate the updates. - Fix dependencies for post-generation copy gradle tasks to address gradle warning about implicit dependencies
- Replace references to old repository/artifact ID with `java-sdk` - Update artifact ID and group ID to align with repository name. This ensures that a local Maven/Gradle installation will match the Maven coordinates used with jitpack. - Fix manual jar instructions to use correct location for the jar built by gradle
- Fix a circular dependency in the gradle build by consolidating the copy tasks after generation into a single task
- Sync OpenAPI schema to pull in `ruleset_id` and `rule_action` and generate code changes. - Updates to tests for changes to use some new `enum` values that used to be strings - Add `oneOf` templates to customize handling for `oneOf` construct
There was a problem hiding this comment.
Pull request overview
Migrates the Java SDK (generated artifacts + build/publish tooling) to Fingerprint Server API v4 by updating the OpenAPI generator version and regenerating models/docs accordingly.
Changes:
- Regenerated SDK models/docs for APIv4 and removed legacy v3/v3.1 model wrappers (e.g.,
Product*,EventsGetResponse, etc.). - Updated sealing/unsealing flow and examples to use the new
Eventmodel. - Updated Gradle publishing coordinates + generation tasks and refreshed sync/generate scripts for the v4 schema/examples.
Reviewed changes
Copilot reviewed 239 out of 392 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/main/java/com/fingerprint/model/ProductVirtualMachine.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductVelocity.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductVPN.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductTor.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductTampering.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductSuspectScore.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductRootApps.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductRemoteControl.java | Removes deprecated legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductProxy.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductProximity.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductPrivacySettings.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductMitMAttack.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductLocationSpoofing.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductJailbroken.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductIncognito.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductIdentification.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductIPInfo.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductIPBlocklist.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductHighActivity.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductFrida.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductFactoryReset.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductEmulator.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductDeveloperTools.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductClonedApp.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ProductBotd.java | Removes legacy v3 product wrapper model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/PrivacySettings.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/MitMAttack.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/LocationSpoofing.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/Jailbroken.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/Incognito.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/IdentificationSeenAt.java | Removes legacy v3 time model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/IPInfoDataCenter.java | Removes legacy v3 ASN/datacenter sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/IPInfoASN.java | Removes legacy v3 ASN sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/IPInfo.java | Updates IP info model and annotations to v4-generated shape/conventions. |
| sdk/src/main/java/com/fingerprint/model/IPBlocklistDetails.java | Removes legacy v3 blocklist details model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/IPBlocklist.java | Removes legacy v3 blocklist model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/HighActivity.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/GeolocationSubdivision.java | Removes legacy v3 geolocation sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/GeolocationCountry.java | Removes legacy v3 geolocation sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/GeolocationContinent.java | Removes legacy v3 geolocation sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/GeolocationCity.java | Removes legacy v3 geolocation sub-model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/Frida.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/FactoryReset.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/EventsGetResponse.java | Removes legacy v3 event response container model replaced by v4 Event. |
| sdk/src/main/java/com/fingerprint/model/ErrorResponse.java | Updates error response model to v4-generated conventions. |
| sdk/src/main/java/com/fingerprint/model/ErrorPlainResponse.java | Removes legacy v3 plain error response model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/Error.java | Updates error model to v4-generated conventions. |
| sdk/src/main/java/com/fingerprint/model/Emulator.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/DeveloperTools.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/ClonedApp.java | Removes legacy v3 smart signal model no longer present in v4 generation. |
| sdk/src/main/java/com/fingerprint/model/BotdBotResult.java | Removes v3 botd enum replaced by v4 BotResult. |
| sdk/src/main/java/com/fingerprint/model/BotdBot.java | Removes v3 botd model replaced by v4 equivalents. |
| sdk/src/main/java/com/fingerprint/model/BotResult.java | Adds v4-generated bot detection enum. |
| sdk/src/main/java/com/fingerprint/Sealed.java | Switches unsealing to v4 Event model and updates validation check. |
| sdk/sdk.gradle.kts | Updates publishing coordinates, OpenAPI generator options, and generation/copy task wiring for v4. |
| scripts/update-gradle-version.sh | Adds script to sync Gradle version from package.json. |
| scripts/sync.sh | Updates schema URL and example list for v4 resources. |
| scripts/generate.sh | Simplifies generation script to run clean + OpenAPI generation. |
| package.json | Renames package to java-sdk to match new coordinates. |
| gradle/libs.versions.toml | Bumps OpenAPI generator version to 7.16.0. |
| examples/src/main/java/com/fingerprint/example/WebhookSignatureSample.java | Adjusts sample error handling/exit behavior. |
| examples/src/main/java/com/fingerprint/example/SealedResults.java | Updates example to use v4 Event model. |
| docs/WebhookVirtualMachine.md | Removes outdated v3 webhook model doc. |
| docs/WebhookVelocity.md | Removes outdated v3 webhook model doc. |
| docs/WebhookVPN.md | Removes outdated v3 webhook model doc. |
| docs/WebhookTor.md | Removes outdated v3 webhook model doc. |
| docs/WebhookTampering.md | Removes outdated v3 webhook model doc. |
| docs/WebhookSuspectScore.md | Removes outdated v3 webhook model doc. |
| docs/WebhookSupplementaryIDs.md | Removes outdated v3 webhook model doc. |
| docs/WebhookRootApps.md | Removes outdated v3 webhook model doc. |
| docs/WebhookRemoteControl.md | Removes outdated v3 webhook model doc. |
| docs/WebhookProxy.md | Removes outdated v3 webhook model doc. |
| docs/WebhookProximity.md | Removes outdated v3 webhook model doc. |
| docs/WebhookPrivacySettings.md | Removes outdated v3 webhook model doc. |
| docs/WebhookMitMAttack.md | Removes outdated v3 webhook model doc. |
| docs/WebhookLocationSpoofing.md | Removes outdated v3 webhook model doc. |
| docs/WebhookJailbroken.md | Removes outdated v3 webhook model doc. |
| docs/WebhookIPInfo.md | Removes outdated v3 webhook model doc. |
| docs/WebhookIPBlocklist.md | Removes outdated v3 webhook model doc. |
| docs/WebhookHighActivity.md | Removes outdated v3 webhook model doc. |
| docs/WebhookFrida.md | Removes outdated v3 webhook model doc. |
| docs/WebhookFactoryReset.md | Removes outdated v3 webhook model doc. |
| docs/WebhookEmulator.md | Removes outdated v3 webhook model doc. |
| docs/WebhookDeveloperTools.md | Removes outdated v3 webhook model doc. |
| docs/WebhookClonedApp.md | Removes outdated v3 webhook model doc. |
| docs/WebGlExtensions.md | Adds v4-generated model doc for WebGL extensions hashes. |
| docs/WebGlBasics.md | Adds v4-generated model doc for basic WebGL strings. |
| docs/VpnMethods.md | Updates VPN methods doc naming/fields for v4. |
| docs/VpnConfidence.md | Adds v4-generated VPN confidence enum doc (new casing/file name). |
| docs/VisitorsGetResponse.md | Removes outdated v3 visitors response doc. |
| docs/Visit.md | Removes outdated v3 visit doc. |
| docs/VirtualMachine.md | Removes outdated v3 virtual machine doc. |
| docs/VelocityIntervals.md | Removes outdated v3 velocity intervals doc. |
| docs/VelocityData.md | Updates velocity data doc to v4 interval fields. |
| docs/Velocity.md | Updates velocity doc text/optionality for v4. |
| docs/VPNConfidence.md | Removes old-cased duplicate VPN confidence doc. |
| docs/VPN.md | Removes outdated v3 VPN model doc. |
| docs/TouchSupport.md | Adds v4-generated touch support model doc. |
| docs/Tor.md | Removes outdated v3 Tor model doc. |
| docs/TamperingDetails.md | Adds v4-generated tampering details model doc. |
| docs/Tampering.md | Removes outdated v3 tampering model doc. |
| docs/SuspectScore.md | Removes outdated v3 suspect score model doc. |
| docs/SupplementaryIDHighRecall.md | Adds v4-generated supplementary ID (high recall) doc. |
| docs/SupplementaryID.md | Removes outdated v3 supplementary ID doc. |
| docs/SearchEventsVpnConfidence.md | Adds v4-generated search filter enum doc. |
| docs/SearchEventsSdkPlatform.md | Adds v4-generated search filter enum doc. |
| docs/SearchEventsResponseEventsInner.md | Removes outdated v3 search response inner doc. |
| docs/SearchEventsResponse.md | Removes outdated v3 search response doc. |
| docs/SearchEventsBot.md | Adds v4-generated search filter enum doc. |
| docs/SDK.md | Updates SDK doc to use enum platform + integrations list in v4. |
| docs/RuleActionType.md | Adds v4-generated rule action type enum doc. |
| docs/RuleActionHeaderField.md | Adds v4-generated rule action header field doc. |
| docs/RootApps.md | Removes outdated v3 root apps doc. |
| docs/RequestHeaderModifications.md | Adds v4-generated request header modifications doc. |
| docs/RemoteControl.md | Removes outdated v3 remote control doc. |
| docs/RelatedVisitorsResponse.md | Removes outdated v3 related visitors response doc. |
| docs/RelatedVisitor.md | Removes outdated v3 related visitor doc. |
| docs/RawDeviceAttributes.md | Adds v4-generated curated raw attributes model doc. |
| docs/RawDeviceAttributeError.md | Removes outdated v3 raw attribute error doc. |
| docs/RawDeviceAttribute.md | Removes outdated v3 raw attribute doc. |
| docs/ProxyDetails.md | Updates proxy details doc fields/types for v4. |
| docs/ProxyConfidence.md | Updates proxy confidence doc formatting for v4. |
| docs/Proxy.md | Removes outdated v3 proxy model doc. |
| docs/Proximity.md | Updates proximity doc escaping/formatting for v4. |
| docs/Products.md | Removes outdated v3 products container doc. |
| docs/ProductVirtualMachine.md | Removes outdated v3 product wrapper doc. |
| docs/ProductVelocity.md | Removes outdated v3 product wrapper doc. |
| docs/ProductVPN.md | Removes outdated v3 product wrapper doc. |
| docs/ProductTor.md | Removes outdated v3 product wrapper doc. |
| docs/ProductTampering.md | Removes outdated v3 product wrapper doc. |
| docs/ProductSuspectScore.md | Removes outdated v3 product wrapper doc. |
| docs/ProductRootApps.md | Removes outdated v3 product wrapper doc. |
| docs/ProductRemoteControl.md | Removes outdated v3 product wrapper doc. |
| docs/ProductRawDeviceAttributes.md | Removes outdated v3 product wrapper doc. |
| docs/ProductProxy.md | Removes outdated v3 product wrapper doc. |
| docs/ProductProximity.md | Removes outdated v3 product wrapper doc. |
| docs/ProductPrivacySettings.md | Removes outdated v3 product wrapper doc. |
| docs/ProductMitMAttack.md | Removes outdated v3 product wrapper doc. |
| docs/ProductLocationSpoofing.md | Removes outdated v3 product wrapper doc. |
| docs/ProductJailbroken.md | Removes outdated v3 product wrapper doc. |
| docs/ProductIncognito.md | Removes outdated v3 product wrapper doc. |
| docs/ProductIdentification.md | Removes outdated v3 product wrapper doc. |
| docs/ProductIPInfo.md | Removes outdated v3 product wrapper doc. |
| docs/ProductIPBlocklist.md | Removes outdated v3 product wrapper doc. |
| docs/ProductHighActivity.md | Removes outdated v3 product wrapper doc. |
| docs/ProductFrida.md | Removes outdated v3 product wrapper doc. |
| docs/ProductFactoryReset.md | Removes outdated v3 product wrapper doc. |
| docs/ProductEmulator.md | Removes outdated v3 product wrapper doc. |
| docs/ProductDeveloperTools.md | Removes outdated v3 product wrapper doc. |
| docs/ProductClonedApp.md | Removes outdated v3 product wrapper doc. |
| docs/ProductBotd.md | Removes outdated v3 product wrapper doc. |
| docs/PrivacySettings.md | Removes outdated v3 privacy settings doc. |
| docs/PluginsInnerMimeTypesInner.md | Fixes/updates generated doc header/fields for plugin MIME types. |
| docs/PluginsInner.md | Adds v4-generated browser plugin model doc. |
| docs/MitMAttack.md | Removes outdated v3 MitM attack doc. |
| docs/LocationSpoofing.md | Removes outdated v3 location spoofing doc. |
| docs/Jailbroken.md | Removes outdated v3 jailbroken doc. |
| docs/IntegrationSubintegration.md | Adds v4-generated integration subintegration doc. |
| docs/Integration.md | Adds v4-generated integration model doc. |
| docs/Incognito.md | Removes outdated v3 incognito doc. |
| docs/IdentificationSeenAt.md | Removes outdated v3 identification seen-at doc. |
| docs/IdentificationConfidence.md | Updates confidence doc field naming (revision → version). |
| docs/Identification.md | Updates identification doc to v4 visitor/time fields. |
| docs/IPInfoV6.md | Updates IP info v6 doc to v4 inline ASN/datacenter fields. |
| docs/IPInfoV4.md | Updates IP info v4 doc to v4 inline ASN/datacenter fields. |
| docs/IPInfoDataCenter.md | Removes outdated v3 datacenter sub-model doc. |
| docs/IPInfoASN.md | Removes outdated v3 ASN sub-model doc. |
| docs/IPBlocklist.md | Removes outdated v3 IP blocklist model doc. |
| docs/IPBlockList.md | Updates/renames IP block list doc content for v4. |
| docs/HighActivity.md | Removes outdated v3 high activity doc. |
| docs/GeolocationSubdivisionsInner.md | Updates geolocation subdivisions doc naming for v4. |
| docs/Geolocation.md | Updates geolocation doc fields for v4 flattened names. |
| docs/Frida.md | Removes outdated v3 Frida doc. |
| docs/FontPreferences.md | Adds v4-generated font preferences model doc. |
| docs/FactoryReset.md | Removes outdated v3 factory reset doc. |
| docs/EventsUpdateRequest.md | Removes outdated v3 update request doc replaced by v4 EventUpdate. |
| docs/EventsGetResponse.md | Removes outdated v3 events get response doc replaced by v4 Event. |
| docs/EventUpdate.md | Adds v4-generated event update request model doc. |
| docs/EventSearch.md | Adds v4-generated event search response model doc. |
| docs/EventRuleActionBlock.md | Adds v4-generated rules engine action doc (block). |
| docs/EventRuleActionAllow.md | Adds v4-generated rules engine action doc (allow). |
| docs/EventRuleAction.md | Adds v4-generated oneOf rule action doc. |
| docs/ErrorPlainResponse.md | Removes outdated v3 plain error response doc. |
| docs/Error.md | Updates error doc type reference formatting for v4. |
| docs/Emulator.md | Removes outdated v3 emulator doc. |
| docs/Emoji.md | Adds v4-generated emoji bounding box model doc. |
| docs/DeveloperTools.md | Removes outdated v3 developer tools doc. |
| docs/DeprecatedGeolocation.md | Removes deprecated v3 geolocation doc (not present in v4 surface). |
| docs/ClonedApp.md | Removes outdated v3 cloned app doc. |
| docs/Canvas.md | Adds v4-generated canvas fingerprint model doc. |
| docs/BrowserDetails.md | Removes userAgent from browser details doc per v4 changes. |
| docs/Botd.md | Removes outdated v3 botd doc replaced by v4 equivalents. |
| docs/BotResult.md | Updates bot result enum doc (casing/values) for v4. |
| docs/BotInfo.md | Adds v4-generated extended bot information model doc. |
| contributing.md | Updates contributor guidance for generation/build to align with new structure. |
| changeset-version.sh | Updates versioning script to avoid regenerating on version bump. |
| changeset-publish.sh | Updates publish script to rely on changeset publishing only. |
| .openapi-generator-ignore | Updates ignore rules for generated artifacts. |
| .github/workflows/test.yml | Runs ./gradlew build in CI (covers tests + build steps). |
| .changeset/weak-eagles-deliver.md | Adds major changeset entry for the v4 migration. |
| .changeset/config.json | Updates changesets repo link to new repository name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ookup` This config options appear to not be doing anything so they can just be removed to simplify the build config.
|
Just a FYI: I think the template consistency workflow/check will continue to fail until the repo is made public. |
A previous commit mistakenly removed the generation step from this script. This commit re-adds it but keeps the version bump separate from generation so the generate.sh script can continue to be used locally without the version bump.
This template is not used because only select files are copied from the generated project.
- Update the templates to use the unescaped version of a few variables to ensure that the generated .md files don't use unnecessary escape sequences.
- Updated the pojo_doc.mustache template to use the `isEnumRef` variable to identify the case where an enum is referenced (and a link makes sense). Before this change links where only rendered when the `isModel` variable was true, which is false for the case where the variable references an enum. - Update a few doc .md files where the links to enums were missing.
- Add and update the pojo template to use the unescaped version of the description of the models and the getter.
- Remove the explicit dependency of `copyGeneratedArtifacts` on `openApiGenerate`. Running `openApiGenerate` will also run `copyGeneratedArtifacts` (because it is finalizedBy `copyGeneratedArtifacts`) but running `copyGeneratedArtifacts` will no longer run `openApiGenerate`. This is acceptable because `copyGeneratedArtifacts` will not be run individually by any automation.
- Update curl download script to use `--create-dirs` to allow mocks directory to be rebuilt with the sync script.
- This change allows the Test Runner for Java plugin in VS Code to be able launch these tests.
- Add a unit test to cover the case where the sealed event is empty
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 238 out of 392 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "java-sdk": "7.10.0" | ||
| }, | ||
| "changesets": [ | ||
| "weak-eagles-deliver" |
There was a problem hiding this comment.
It looks strange, like prerelease already happened with these changesets
There was a problem hiding this comment.
Good call. Perhaps 236c103 is the way to approach this? WDYT?
There was a problem hiding this comment.
We discussed and resolved this in a call. Should be fixed with 0be1870
🚀 Following releases will be created using changesets from this PR:java-sdk@8.0.0-rc.0Major Changes
|
The first PR in a sequence to migrate to APIv4.
The SDK is generated from the latest v4 API schema, the SDK code and tests compile, and the unit and functional tests are passing.