Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimal Java to 11 and dependencies #47

Closed
wants to merge 15 commits into from
2 changes: 1 addition & 1 deletion .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8', '11', '17', '21' ]
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
appId: ${{ vars.APP_ID }}
language: java
language-version: '8'
java-version: '8'
language-version: '11'
java-version: '11'
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Java ${{ matrix.Java }}
strategy:
matrix:
java: [ '8', '11', '17', '21' ]
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion docs/BotdDetectionResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Stores bot detection result

| Name | Value |
|---- | ----- |
| NOTDETECTED | "notDetected" |
| NOT_DETECTED | "notDetected" |
| GOOD | "good" |
| BAD | "bad" |

Expand Down
2 changes: 1 addition & 1 deletion docs/BotdResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Contains all the information from Bot Detection product
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**ip** | **String** | IP address of the requesting browser or bot. | |
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible | |
|**time** | **OffsetDateTime** | Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible | |
|**url** | **String** | Page URL from which identification request was sent. | |
|**userAgent** | **String** | | |
|**requestId** | **String** | | |
Expand Down
10 changes: 5 additions & 5 deletions docs/Common403ErrorResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

| Name | Value |
|---- | ----- |
| TOKENREQUIRED | "TokenRequired" |
| TOKENNOTFOUND | "TokenNotFound" |
| SUBSCRIPTIONNOTACTIVE | "SubscriptionNotActive" |
| WRONGREGION | "WrongRegion" |
| FEATURENOTENABLED | "FeatureNotEnabled" |
| TOKEN_REQUIRED | "TokenRequired" |
| TOKEN_NOT_FOUND | "TokenNotFound" |
| SUBSCRIPTION_NOT_ACTIVE | "SubscriptionNotActive" |
| WRONG_REGION | "WrongRegion" |
| FEATURE_NOT_ENABLED | "FeatureNotEnabled" |



2 changes: 1 addition & 1 deletion docs/ErrorCommon429ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

| Name | Value |
|---- | ----- |
| TOOMANYREQUESTS | "TooManyRequests" |
| TOO_MANY_REQUESTS | "TooManyRequests" |



2 changes: 1 addition & 1 deletion docs/ErrorEvent404ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

| Name | Value |
|---- | ----- |
| REQUESTNOTFOUND | "RequestNotFound" |
| REQUEST_NOT_FOUND | "RequestNotFound" |



2 changes: 1 addition & 1 deletion docs/ErrorVisitsDelete400ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

| Name | Value |
|---- | ----- |
| REQUESTCANNOTBEPARSED | "RequestCannotBeParsed" |
| REQUEST_CANNOT_BE_PARSED | "RequestCannotBeParsed" |



2 changes: 1 addition & 1 deletion docs/ErrorVisitsDelete404ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

| Name | Value |
|---- | ----- |
| VISITORNOTFOUND | "VisitorNotFound" |
| VISITOR_NOT_FOUND | "VisitorNotFound" |



2 changes: 1 addition & 1 deletion docs/FactoryResetResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. | |
|**time** | **OffsetDateTime** | Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. | |
|**timestamp** | **Long** | Same value as it's in the `time` field but represented in timestamp format. | |


Expand Down
2 changes: 1 addition & 1 deletion docs/ProductError.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

| Name | Value |
|---- | ----- |
| TOOMANYREQUESTS | "TooManyRequests" |
| TOO_MANY_REQUESTS | "TooManyRequests" |
| FAILED | "Failed" |


Expand Down
2 changes: 1 addition & 1 deletion docs/ProductsResponseIdentificationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|**ip** | **String** | | |
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time expressed according to ISO 8601 in UTC format. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **String** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
Expand Down
2 changes: 1 addition & 1 deletion docs/ResponseVisits.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|**ip** | **String** | | |
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time expressed according to ISO 8601 in UTC format. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **String** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
Expand Down
4 changes: 2 additions & 2 deletions docs/SeenAt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**global** | [**OffsetDateTime**](OffsetDateTime.md) | | |
|**subscription** | [**OffsetDateTime**](OffsetDateTime.md) | | |
|**global** | **OffsetDateTime** | | |
|**subscription** | **OffsetDateTime** | | |



2 changes: 1 addition & 1 deletion docs/Visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|**ip** | **String** | | |
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time expressed according to ISO 8601 in UTC format. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **String** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
Expand Down
2 changes: 1 addition & 1 deletion docs/WebhookVisit.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
|**ip** | **String** | | |
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | [**OffsetDateTime**](OffsetDateTime.md) | Time expressed according to ISO 8601 in UTC format. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **String** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
Expand Down
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
jackson = "2.17.2"
jackson-databind-nullable = "0.2.6"
jersey = "2.43"
jsr305 = "3.0.2"
jakarta-annotation-api = "2.0.0"
jersey = "3.1.7"
junit = "5.10.2"
mockito = "3.12.4"
openapi = "6.2.0"
swagger-annotations = "1.6.14"
openapi = "7.7.0"
swagger-annotations = "2.2.22"

[libraries]
jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson" }
jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson" }
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "jackson-databind-nullable" }
jackson-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "jackson" }
jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
jakarta-annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version.ref = "jakarta-annotation-api" }
jersey-apache-connector = { module = "org.glassfish.jersey.connectors:jersey-apache-connector", version.ref = "jersey" }
jersey-client = { module = "org.glassfish.jersey.core:jersey-client", version.ref = "jersey" }
jersey-hk2 = { module = "org.glassfish.jersey.inject:jersey-hk2", version.ref = "jersey" }
Expand All @@ -23,7 +23,7 @@ jersey-media-json = { module = "org.glassfish.jersey.media:jersey-media-json-jac
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
swagger-annotations = { module = "io.swagger:swagger-annotations", version.ref = "swagger-annotations" }
swagger-annotations = { module = "io.swagger.core.v3:swagger-annotations", version.ref = "swagger-annotations" }

[plugins]
openapi-generator = { id = "org.openapi.generator", version.ref = "openapi" }
2 changes: 1 addition & 1 deletion scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ echo "VERSION: $VERSION"

sed -i "s/projectVersion: .*/projectVersion: $VERSION/g" gradle.properties
sed -i "s/^VERSION=.*/VERSION='$VERSION'/g" ./scripts/generate.sh
./gradlew openApiGenerate copyDocs removeWrongDocumentationLinks jar test
./gradlew build test
4 changes: 2 additions & 2 deletions sdk/sdk.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ publishing {

dependencies {
implementation(libs.swagger.annotations)
implementation(libs.jsr305)
api(libs.jersey.client)
api(libs.jersey.hk2)
api(libs.jersey.media.json)
Expand All @@ -40,6 +39,7 @@ dependencies {
api(libs.jackson.databind)
api(libs.jackson.databind.nullable)
api(libs.jackson.jsr310)
api(libs.jakarta.annotation.api)
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(libs.mockito)
Expand All @@ -63,7 +63,7 @@ openApiGenerate {
apiPackage.set("com.fingerprint.api")
modelPackage.set("com.fingerprint.model")
invokerPackage.set("com.fingerprint.sdk")
library.set("jersey2")
library.set("jersey3")
templateDir.set("$rootDir/template")

gitHost.set("github.com")
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/main/java/com/fingerprint/api/FingerprintApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.fingerprint.sdk.Pair;
import com.fingerprint.sdk.Region;

import javax.ws.rs.core.GenericType;
import jakarta.ws.rs.core.GenericType;

import com.fingerprint.model.ErrorCommon403Response;
import com.fingerprint.model.ErrorCommon429Response;
Expand All @@ -24,7 +24,7 @@
import java.util.List;
import java.util.Map;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class FingerprintApi {
public static final String INTEGRATION_INFO = "fingerprint-pro-server-java-sdk/5.1.1";
private ApiClient apiClient;
Expand Down
37 changes: 11 additions & 26 deletions sdk/src/main/java/com/fingerprint/model/ASN.java
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
/*
* Fingerprint Pro Server API
* Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.
*
* The version of the OpenAPI document: 3
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package com.fingerprint.model;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fingerprint.sdk.JSON;

import io.swagger.v3.oas.annotations.media.Schema;

/**
* ASN
*/


@JsonPropertyOrder({
ASN.JSON_PROPERTY_ASN,
ASN.JSON_PROPERTY_NETWORK,
ASN.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ASN {
public static final String JSON_PROPERTY_ASN = "asn";
private String asn;
Expand All @@ -59,8 +44,8 @@ public ASN asn(String asn) {
* Get asn
* @return asn
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "7922", required = true, value = "")
@jakarta.annotation.Nonnull
@Schema(example = "7922", required = true, description = "")
@JsonProperty(JSON_PROPERTY_ASN)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -85,8 +70,8 @@ public ASN network(String network) {
* Get network
* @return network
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "73.136.0.0/13", required = true, value = "")
@jakarta.annotation.Nonnull
@Schema(example = "73.136.0.0/13", required = true, description = "")
@JsonProperty(JSON_PROPERTY_NETWORK)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -111,8 +96,8 @@ public ASN name(String name) {
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "COMCAST-7922", value = "")
@jakarta.annotation.Nullable
@Schema(example = "COMCAST-7922", description = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import jakarta.ws.rs.core.GenericType;

import com.fasterxml.jackson.annotation.JsonValue;

/**
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public abstract class AbstractOpenApiSchema {

// store the actual instance of the schema/object
Expand All @@ -46,7 +46,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, GenericType<?>> getSchemas();

/**
* Get the actual instance
Expand Down
Loading
Loading