Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ jobs:
run: mvn -B package --file pom.xml -Dmaven.test.skip
- name: Run integration tests with Maven
if: ${{ github.repository_owner == 'onfido' &&
(github.event_name == 'pull_request' || github.event_name == 'release') }}
(github.event_name == 'pull_request' ||
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch') }}
run: mvn test
env:
ONFIDO_API_TOKEN: ${{ secrets.ONFIDO_API_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "d66dc55",
"long_sha": "d66dc55aa73210fc789fcb93a3cba9d1d1f89a8a",
"version": "v6.0.0"
"short_sha": "4204f00",
"long_sha": "4204f00a2c7f0f5bd61da3b5442d8eb613418e9e",
"version": ""
},
"release": "v7.0.0"
}
47 changes: 47 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,53 @@ major versions of the client library.
It covers changes in core resources, other endpoints, and the OpenAPI generator,
ensuring a smooth transition between versions.

## Upgrading from 6.x to 7.x

### Core Resources

- **All API methods**: All API method calls now use request builder pattern with `.execute()`
- This change enables backward compatibility when new optional parameters are added
- Example migration:
```java
// Before (v6.x)
List<WorkflowRun> runs = api.listWorkflowRuns(applicantId, status, page, perPage);

// After (v7.x)
List<WorkflowRun> runs = api.listWorkflowRuns()
.applicantId(applicantId)
.status(status)
.page(page)
.perPage(perPage)
.execute();
```
- Documents
- Driving licence information properties removed from general `DocumentProperties`
and moved to new `DocumentPropertiesWithDrivingLicenceInformation` class
- Workflow Runs
- `createdAtGt` and `createdAtLt` parameters in `listWorkflowRuns` changed from
date-time format to date format (YYYY-MM-DD)

### Other Endpoints

- Reports
- Device Intelligence: Removed deprecated `breakdown` property and related
breakdown classes:
- `DeviceIntelligenceBreakdownProperties` removed
- `DeviceIntelligenceBreakdownPropertiesDevice` → `DeviceIntelligencePropertiesDevice`
- `DeviceIntelligenceBreakdownPropertiesGeolocation` → `DeviceIntelligencePropertiesGeolocation`
- `DeviceIntelligenceBreakdownPropertiesIp` → `DeviceIntelligencePropertiesIp`
- Identity Enhanced: Changed `totalNumberOfSources` and `numberOfMatches` from
number to string type

### Security

- SSL certificate validation: Removed support for self-signed certificates unless
explicitly configured via `setSslCaCert()`

### OpenAPI generator

- Version upgraded from `7.11.0` to `7.16.0`

## Upgrading from 5.x to 6.x

### Core Resources
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/onfido/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdown.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownDevice.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownDeviceBreakdown.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownProperties.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesDevice.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesGeolocation.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesIp.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceProperties.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesDevice.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesGeolocation.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesIp.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceReport.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.Document.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentBreakdown.CustomTypeAdapterFactory());
Expand Down
42 changes: 3 additions & 39 deletions src/main/java/com/onfido/model/DeviceIntelligenceBreakdown.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.onfido.model.DeviceIntelligenceBreakdownDevice;
import com.onfido.model.DeviceIntelligenceBreakdownProperties;
import java.io.IOException;
import java.util.Arrays;

Expand Down Expand Up @@ -59,12 +58,6 @@ public class DeviceIntelligenceBreakdown {
@javax.annotation.Nullable
private DeviceIntelligenceBreakdownDevice device;

public static final String SERIALIZED_NAME_PROPERTIES = "properties";
@Deprecated
@SerializedName(SERIALIZED_NAME_PROPERTIES)
@javax.annotation.Nullable
private DeviceIntelligenceBreakdownProperties properties;

public DeviceIntelligenceBreakdown() {
}

Expand All @@ -86,29 +79,6 @@ public void setDevice(@javax.annotation.Nullable DeviceIntelligenceBreakdownDevi
this.device = device;
}


@Deprecated
public DeviceIntelligenceBreakdown properties(@javax.annotation.Nullable DeviceIntelligenceBreakdownProperties properties) {
this.properties = properties;
return this;
}

/**
* Get properties
* @return properties
* @deprecated
*/
@Deprecated
@javax.annotation.Nullable
public DeviceIntelligenceBreakdownProperties getProperties() {
return properties;
}

@Deprecated
public void setProperties(@javax.annotation.Nullable DeviceIntelligenceBreakdownProperties properties) {
this.properties = properties;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -164,22 +134,20 @@ public boolean equals(Object o) {
return false;
}
DeviceIntelligenceBreakdown deviceIntelligenceBreakdown = (DeviceIntelligenceBreakdown) o;
return Objects.equals(this.device, deviceIntelligenceBreakdown.device) &&
Objects.equals(this.properties, deviceIntelligenceBreakdown.properties)&&
return Objects.equals(this.device, deviceIntelligenceBreakdown.device)&&
Objects.equals(this.additionalProperties, deviceIntelligenceBreakdown.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(device, properties, additionalProperties);
return Objects.hash(device, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeviceIntelligenceBreakdown {\n");
sb.append(" device: ").append(toIndentedString(device)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand All @@ -202,7 +170,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("device", "properties"));
openapiFields = new HashSet<String>(Arrays.asList("device"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand All @@ -225,10 +193,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) {
DeviceIntelligenceBreakdownDevice.validateJsonElement(jsonObj.get("device"));
}
// validate the optional field `properties`
if (jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) {
DeviceIntelligenceBreakdownProperties.validateJsonElement(jsonObj.get("properties"));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Loading