Skip to content

Commit

Permalink
Merge pull request #134 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-java after onfido-openapi-spec update (d180edd)
  • Loading branch information
dvacca-onfido authored Nov 8, 2024
2 parents b931b9c + ff35972 commit 70be3ac
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 123 deletions.
8 changes: 4 additions & 4 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": "2998dd3",
"long_sha": "2998dd3ad2db49a33e0ecf9b41c7cf873909ef0b",
"version": "v4.0.0"
"short_sha": "d180edd",
"long_sha": "d180eddd168dd95bf84bf7c8fe9f8c7e3c0c5494",
"version": "v4.1.0"
},
"release": "v5.0.0"
"release": "v5.1.0"
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.onfido</groupId>
<artifactId>onfido-api-java</artifactId>
<version>5.0.0</version>
<version>5.1.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -59,7 +59,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.onfido:onfido-api-java:5.0.0"
implementation "com.onfido:onfido-api-java:5.1.0"
}
```

Expand All @@ -73,10 +73,10 @@ mvn clean package

Then manually install the following JARs:

- `target/onfido-api-java-5.0.0.jar`
- `target/onfido-api-java-5.1.0.jar`
- `target/lib/*.jar`

The latest version can be found at: https://search.maven.org/artifact/com.onfido/5.0.0
The latest version can be found at: https://search.maven.org/artifact/com.onfido/5.1.0

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>onfido-api-java</artifactId>
<packaging>jar</packaging>
<name>onfido-api-java</name>
<version>5.0.0</version>
<version>5.1.0</version>
<url>https://documentation.onfido.com</url>
<description>Official Java API client library for the Onfido API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("onfido-java/5.0.0");
setUserAgent("onfido-java/5.1.0");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
public class Configuration {
public static final String VERSION = "5.0.0";
public static final String VERSION = "5.1.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentODPReasons.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentProperties.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesAddressLines.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesBarcodeInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesBarcode.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesDocumentClassification.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesDocumentNumbersInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentPropertiesDrivingLicenceInformation.CustomTypeAdapterFactory());
Expand Down
32 changes: 7 additions & 25 deletions src/main/java/com/onfido/model/DocumentProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.onfido.model.DocumentPropertiesAddressLines;
import com.onfido.model.DocumentPropertiesBarcodeInner;
import com.onfido.model.DocumentPropertiesBarcode;
import com.onfido.model.DocumentPropertiesDocumentClassification;
import com.onfido.model.DocumentPropertiesDocumentNumbersInner;
import com.onfido.model.DocumentPropertiesDrivingLicenceInformation;
Expand Down Expand Up @@ -402,7 +402,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti

public static final String SERIALIZED_NAME_BARCODE = "barcode";
@SerializedName(SERIALIZED_NAME_BARCODE)
private List<DocumentPropertiesBarcodeInner> barcode = new ArrayList<>();
private DocumentPropertiesBarcode barcode;

public static final String SERIALIZED_NAME_NFC = "nfc";
@SerializedName(SERIALIZED_NAME_NFC)
Expand Down Expand Up @@ -1191,29 +1191,21 @@ public void setAddressLines(DocumentPropertiesAddressLines addressLines) {
}


public DocumentProperties barcode(List<DocumentPropertiesBarcodeInner> barcode) {
public DocumentProperties barcode(DocumentPropertiesBarcode barcode) {
this.barcode = barcode;
return this;
}

public DocumentProperties addBarcodeItem(DocumentPropertiesBarcodeInner barcodeItem) {
if (this.barcode == null) {
this.barcode = new ArrayList<>();
}
this.barcode.add(barcodeItem);
return this;
}

/**
* Get barcode
* @return barcode
*/
@javax.annotation.Nullable
public List<DocumentPropertiesBarcodeInner> getBarcode() {
public DocumentPropertiesBarcode getBarcode() {
return barcode;
}

public void setBarcode(List<DocumentPropertiesBarcodeInner> barcode) {
public void setBarcode(DocumentPropertiesBarcode barcode) {
this.barcode = barcode;
}

Expand Down Expand Up @@ -1668,19 +1660,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("address_lines") != null && !jsonObj.get("address_lines").isJsonNull()) {
DocumentPropertiesAddressLines.validateJsonElement(jsonObj.get("address_lines"));
}
// validate the optional field `barcode`
if (jsonObj.get("barcode") != null && !jsonObj.get("barcode").isJsonNull()) {
JsonArray jsonArraybarcode = jsonObj.getAsJsonArray("barcode");
if (jsonArraybarcode != null) {
// ensure the json data is an array
if (!jsonObj.get("barcode").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `barcode` to be an array in the JSON string but got `%s`", jsonObj.get("barcode").toString()));
}

// validate the optional field `barcode` (array)
for (int i = 0; i < jsonArraybarcode.size(); i++) {
DocumentPropertiesBarcodeInner.validateJsonElement(jsonArraybarcode.get(i));
};
}
DocumentPropertiesBarcode.validateJsonElement(jsonObj.get("barcode"));
}
// validate the optional field `nfc`
if (jsonObj.get("nfc") != null && !jsonObj.get("nfc").isJsonNull()) {
Expand Down
Loading

0 comments on commit 70be3ac

Please sign in to comment.