Skip to content

Test, build and code quality improvements#6

Merged
mcnulty-fp merged 14 commits into
docs/INTER-1819-public-updatesfrom
test/INTER-1819-improvements
Feb 27, 2026
Merged

Test, build and code quality improvements#6
mcnulty-fp merged 14 commits into
docs/INTER-1819-public-updatesfrom
test/INTER-1819-improvements

Conversation

@mcnulty-fp

Copy link
Copy Markdown
Contributor
  • Updates after synchronizing with the latest schema
  • Add test coverage for Java 25
  • Configure Gradle to target Java 11 so using newer language features will cause compilation errors
  • Refactor Java setup in workflows to rely on existing Java installations in ubuntu-latest. Gradle will find these installations and be able to use them when configured to do so
  • Turn on all the warnings supported by the Java compiler and fail the build on warnings
  • Fix warnings
  • Add ruleset evaluation tests and example code
  • Fix compilation errors in the FingerprintApi.md examples

- Update the `JSON` template to remove the package-private unused
  `getDiscriminatorPropertyName`.
- Update Gradle config to specify `-Xlint:all -Werror` to the Java
  compiler.
- Fix warnings in Sealed.java related to serialVersionUID
- Fix warnings and general issues in FingerprintApiTest.java
- Update the gradle config for the examples to only allow use
  of Java 11 features. This was previously already done for the
  sdk module.
- Update FunctionalTests to include an example/test for evaluating an
  event against a ruleset.
- Update sync script to pull down ruleset examples
- Update FingerprintApiTest to use the same `ObjectMapper` that the
  SDK uses to deserialize data to avoid discrepancies in configuration.
- Add ruleset test cases to FingerprintApiTest
- Fix issue found in template where the `type` value was not being
  set on the deserialized EventRuleAction.
- Apply doc updates from the schema
- Update handling for `tags` properties in the `Event` and
  `EventUpdate` to assume the `tags` default to an empty
  map.
- Disable the `this-escape` warning for the `ApiClient` constructor.
  Fixing this warning would require significant changes to the
  `ApiClient` class and could precipitate unnecessary breaking
  changes to SDK users that are leveraging the client customization
  hooks to setup their own HTTP client in the Jersey configuration.
- Rework the Gradle build to allow the Java compiler and launcher
  version to be specified with a command line property. This allows
  Gradle 8 to use Java 25 without using it for execution (which it
  doesn't support).
- Add logging to the Gradle build to log what Java version is used
  to confirm the correct version of Java is used for compiling and
  running tests.
- Add `--stacktrace` flag to gradlew builds to improve logs when
  builds fail.
- Configure openapi-generator with `enumUnknownDefaultCase` option. This
  adds an unused enum value to the template data/hash that can be
  used to substitute a placeholder value for all enums.
- Update templates to add a `UNSUPPORTED_VALUE_SDK_UPGRADE_REQUIRED`
  value that is used when deserializing an enum value that is
  unknown to the SDK. This allows events with new enum values to
  be deserialized without failing deserialization.
- Add unit tests to confirm enum value deserialization is forward
  compatible
Comment thread docs/EventUpdate.md
|------------ | ------------- | ------------- | -------------|
|**linkedId** | **String** | Linked Id value to assign to the existing event | [optional] |
|**tags** | **Object** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] |
|**tags** | **Map<String, Object>** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] |

@ilfa ilfa Feb 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another place with html symbols instead of utf

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think < and > still need to use HTML escapes because some HTML tags are allowed in Markdown. I don't think this particular case has issues if it is not escaped (i.e. Map<String, Object>), but if it were instead List<String>, the <String> isn't rendered because the parser thinks that an HTML tag.

So, rather than try to identify the cases where there is a single generic type parameter in a data type, I opted to leave the data types escaped

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

This PR synchronizes the Java SDK/templates with the latest API schema, expands CI test coverage to additional Java versions (incl. Java 25), and tightens build quality gates (toolchains + warnings-as-errors). It also adds/updates mocks and tests around ruleset evaluation and fixes package/import paths in generated documentation examples.

Changes:

  • Update OpenAPI schema + regenerate models/docs (notably tags typing and documentation links) and fix example imports.
  • Add ruleset evaluation mocks/tests and expand search/getEvent test cases.
  • Configure Gradle toolchains and CI matrices (Java 11/17/21/25) and enforce compiler warnings as errors.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
template/libraries/jersey3/oneof_model.mustache Make discriminator property visible during Jackson polymorphic deserialization.
template/libraries/jersey3/api_doc.mustache Fix documentation snippet imports/package paths.
template/libraries/jersey3/apiException.mustache Add jersey3 ApiException template (new).
template/libraries/jersey3/JSON.mustache Add JSON/Jackson configuration template (new).
template/libraries/jersey3/ApiClient.mustache Add full jersey3 ApiClient template (new).
sdk/src/test/resources/mocks/events/get_event_ruleset_200.json Add mock event response including rule_action.
sdk/src/test/resources/mocks/errors/400_ruleset_not_found.json Add mock error payload for ruleset-not-found.
sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java Refactor tests to use shared SDK JSON mapper + add ruleset tests and more search params coverage.
sdk/src/main/java/com/fingerprint/v4/sdk/JSON.java Remove unused discriminator helper method.
sdk/src/main/java/com/fingerprint/v4/sdk/ApiException.java Improve serialization compatibility (serialVersionUID + transient headers).
sdk/src/main/java/com/fingerprint/v4/sdk/ApiClient.java Suppress this-escape warning for constructor.
sdk/src/main/java/com/fingerprint/v4/model/SearchEventsBot.java Fix docstring to reference bot field (not botd.bot).
sdk/src/main/java/com/fingerprint/v4/model/EventUpdate.java Change tags from Object to Map<String,Object> and adjust JSON annotations/helpers.
sdk/src/main/java/com/fingerprint/v4/model/EventRuleAction.java Make discriminator visible for rule action polymorphism.
sdk/src/main/java/com/fingerprint/v4/model/Event.java Change tags from Object to Map<String,Object> and update doc links.
sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java Update documentation links and parameter docs to new docs domain/anchors.
sdk/src/main/java/com/fingerprint/v4/Sealed.java Add serialVersionUIDs to exceptions.
sdk/sdk.gradle.kts Switch to Gradle toolchains with configurable Java version property.
scripts/sync.sh Ensure new mocks are synced from examples list.
res/fingerprint-server-api.yaml Update schema docs links and set additionalProperties: true for tags.
examples/src/main/java/com/fingerprint/example/FunctionalTests.java Add ruleset evaluation example code + explicit imports.
examples/examples.gradle.kts Configure toolchain and JavaExec launcher via toolchains.
docs/SearchEventsBot.md Align docs text with bot field naming.
docs/FingerprintApi.md Fix imports and update docs links/anchors in examples.
docs/EventUpdate.md Update tags type to Map<String,Object>.
docs/Event.md Update tags type and doc links.
build.gradle.kts Enforce Java 11 --release, enable all lint warnings, and fail build on warnings; print toolchain info.
.github/workflows/test.yml Expand Java matrix and remove setup-java reliance.
.github/workflows/functional.yml Expand Java matrix and pass toolchain version property to Gradle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yml Outdated
Comment thread template/libraries/jersey3/ApiClient.mustache
Comment thread template/libraries/jersey3/ApiClient.mustache
Comment thread template/libraries/jersey3/apiException.mustache
Comment thread sdk/src/main/java/com/fingerprint/v4/model/EventUpdate.java
Comment thread sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java Outdated
Comment thread sdk/src/main/java/com/fingerprint/v4/Sealed.java
mcnulty-fp and others added 2 commits February 27, 2026 08:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Base automatically changed from style/INTER-1443-fix-imports to docs/INTER-1819-public-updates February 27, 2026 14:27
…alues

fix: make enum value deserialization forward compatible
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

java-sdk@8.0.0-rc.1

Patch Changes

  • Change root package from com.fingerprint to com.fingerprint.v4 (7ba8295)

@mcnulty-fp
mcnulty-fp requested a review from ilfa February 27, 2026 14:29
@mcnulty-fp
mcnulty-fp merged commit 5cb6e12 into docs/INTER-1819-public-updates Feb 27, 2026
14 of 15 checks passed
@mcnulty-fp
mcnulty-fp deleted the test/INTER-1819-improvements branch February 27, 2026 15:39
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.

3 participants