Skip to content

Commit

Permalink
Release 24.2 (#72)
Browse files Browse the repository at this point in the history
* Update github checkout version from v3 to v4

* Update version to 24.2.0

* Add 'types' field to recognition tests
  • Loading branch information
Denis-Averin authored Feb 29, 2024
1 parent 9a3afb9 commit 60f55a2
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check badges in README.md
run: ./scripts/check-badges.bash "README.md"
2 changes: 1 addition & 1 deletion .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Freleases.aspose.cloud%2Fjava%2Frepo%2Fcom%2Faspose%2Faspose-barcode-cloud%2Fmaven-metadata.xml)](https://releases.aspose.cloud/java/repo/com/aspose/aspose-barcode-cloud/)

- API version: 3.0
- SDK version: 24.1.1
- SDK version: 24.2.0

## Demo applications

Expand All @@ -28,7 +28,7 @@ Building the API client library requires:

## Prerequisites

To use Aspose.BarCode Cloud SDK for Java you need to register an account with [Aspose Cloud](https://www.aspose.cloud) and lookup/create Client Id and Client Secret at [Cloud Dashboard](https://dashboard.aspose.cloud/applications). There is free quota available. For more details, see [Aspose Cloud Pricing](https://purchase.aspose.cloud/pricing).
To use Aspose.BarCode Cloud SDK for Java you need to register an account with [Aspose Cloud](https://www.aspose.cloud) and lookup/create Client Id and Client Secret at [Cloud Dashboard](https://dashboard.aspose.cloud/applications). There is free quota available. For more details, see [Aspose Cloud Pricing](https://purchase.aspose.cloud/).

## Installation

Expand Down Expand Up @@ -68,7 +68,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-barcode-cloud</artifactId>
<version>24.1.1</version>
<version>24.2.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -83,7 +83,7 @@ mvn clean package

Then manually install the following JARs:

- `target/aspose-barcode-cloud-24.1.1.jar`
- `target/aspose-barcode-cloud-24.2.0.jar`
- `target/lib/*.jar`

## 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>aspose-barcode-cloud</artifactId>
<packaging>jar</packaging>
<name>aspose-barcode-cloud</name>
<version>24.1.1</version>
<version>24.2.0</version>
<url>https://www.aspose.cloud</url>
<description>Aspose.BarCode Cloud SDK for Java</description>
<scm>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/aspose/barcode/cloud/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/** ApiClient. */
public class ApiClient {
public final String apiVersion = "v3.0";
public final String clientVersion = "24.1.1";
public final String clientVersion = "24.2.0";

private String baseUrl = "https://api.aspose.cloud";
private String tokenUrl = baseUrl + "/connect/token";
Expand Down Expand Up @@ -110,7 +110,7 @@ protected ApiClient() {
json = new JSON();

// Set default User-Agent.
setUserAgent("Swagger-Codegen/24.1.1/java");
setUserAgent("Swagger-Codegen/24.2.0/java");

addDefaultHeader("x-aspose-client", "java sdk");
addDefaultHeader("x-aspose-client-version", clientVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/** API tests for BarcodeApi */
Expand Down Expand Up @@ -57,7 +58,7 @@ public void getBarcodeRecognizeTest() throws ApiException {
uploadTestFile(testFileName);

GetBarcodeRecognizeRequest request = new GetBarcodeRecognizeRequest(testFileName);
request.type = DecodeBarcodeType.CODE11.getValue();
request.types = Collections.singletonList(DecodeBarcodeType.CODE11);
request.checksumValidation = ChecksumValidation.OFF.toString();
request.preset = PresetType.HIGHPERFORMANCE.toString();
request.storage = testStorageName;
Expand All @@ -69,7 +70,7 @@ public void getBarcodeRecognizeTest() throws ApiException {
assertFalse(response.getBarcodes().isEmpty());

BarcodeResponse barcode = response.getBarcodes().get(0);
assertEquals(request.type, barcode.getType());
assertEquals("Code11", barcode.getType());
assertEquals("1234567812", barcode.getBarcodeValue());

List<RegionPoint> region = barcode.getRegion();
Expand Down Expand Up @@ -132,6 +133,7 @@ public void postBarcodeRecognizeFromUrlOrContentTest() throws ApiException {
new PostBarcodeRecognizeFromUrlOrContentRequest();
request.checksumValidation = ChecksumValidation.OFF.toString();
request.preset = PresetType.HIGHPERFORMANCE.toString();
request.types = Collections.singletonList(DecodeBarcodeType.CODE11);

Path currentRelativePath = Paths.get("");
String currentPath = currentRelativePath.toAbsolutePath().toString();
Expand Down Expand Up @@ -216,10 +218,11 @@ public void putBarcodeRecognizeFromBodyTest() throws ApiException {

ReaderParams readerParams = new ReaderParams();
readerParams.setChecksumValidation(ChecksumValidation.OFF);
readerParams.setTypes(Collections.singletonList(DecodeBarcodeType.CODE11));
readerParams.setPreset(PresetType.HIGHPERFORMANCE);

PutBarcodeRecognizeFromBodyRequest request =
new PutBarcodeRecognizeFromBodyRequest(testFileName, readerParams);
request.type = DecodeBarcodeType.CODE11.getValue();
request.storage = testStorageName;
request.folder = remoteTempFolder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import com.aspose.barcode.cloud.ApiException;
import com.aspose.barcode.cloud.api.BarcodeApi;
import com.aspose.barcode.cloud.model.ChecksumValidation;
import com.aspose.barcode.cloud.model.PresetType;
import com.aspose.barcode.cloud.requests.PostBarcodeRecognizeFromUrlOrContentRequest;

import org.junit.BeforeClass;
Expand All @@ -29,8 +27,6 @@ public static void oneTimeSetUp() {
public void RecognizeWithTimeoutShouldThrowTimeout() {
PostBarcodeRecognizeFromUrlOrContentRequest request =
new PostBarcodeRecognizeFromUrlOrContentRequest();
request.checksumValidation = ChecksumValidation.OFF.toString();
request.preset = PresetType.HIGHPERFORMANCE.toString();

Path currentRelativePath = Paths.get("");
String currentPath = currentRelativePath.toAbsolutePath().toString();
Expand Down

0 comments on commit 60f55a2

Please sign in to comment.