Skip to content

♻️ uniformize with other sdks#343

Merged
sebastianMindee merged 7 commits into
mainfrom
uniformize-with-other-sdks
Jul 10, 2026
Merged

♻️ uniformize with other sdks#343
sebastianMindee merged 7 commits into
mainfrom
uniformize-with-other-sdks

Conversation

@sebastianMindee

Copy link
Copy Markdown
Collaborator

Description

Note for Copilot: disregard the Requires a change to the official Guide documentation.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

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 aligns the Java SDK’s V2 behavior with other Mindee SDKs by tightening URL safety checks, improving numeric precision handling, introducing typed job statuses, and adding a convenience API for fetching inference results directly from a full inference URL.

Changes:

  • Introduces JobStatus enum and switches Job.status to a typed value (plus updates polling logic and tests accordingly).
  • Switches numeric SimpleField JSON parsing from Double to BigDecimal for precision preservation (and updates tests).
  • Adds getResultFromUrl() plus enhanced polling options (backoff + cancellation), and expands test coverage (unit + integration).

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/java/com/mindee/v2/product/ExtractionTest.java Updates assertions to reflect BigDecimal numeric storage.
src/test/java/com/mindee/v2/parsing/JobTest.java Updates job status assertions to use JobStatus.
src/test/java/com/mindee/v2/MindeeClientTest.java Adds unit tests for getResultFromUrl() and polling cancellation/backoff.
src/test/java/com/mindee/v2/MindeeClientIT.java Adds integration test validating getResultFromUrl() against a real job result URL.
src/test/java/com/mindee/v2/clientoptions/PollingOptionsTest.java Adds tests for new polling option fields and validation.
src/test/java/com/mindee/v1/MindeeClientTest.java Replaces fake/invalid URLs with example.com URLs in tests.
src/test/java/com/mindee/v1/http/MindeeHttpApiV1Test.java Updates expected URL payloads to use example.com.
src/test/java/com/mindee/input/URLInputSourceTest.java Adds tests for SSRF/loopback hardening in validateSecure().
src/main/java/com/mindee/v2/parsing/JobStatus.java Adds typed job status enum with Jackson serialization/deserialization.
src/main/java/com/mindee/v2/parsing/Job.java Changes job status type to JobStatus.
src/main/java/com/mindee/v2/parsing/inference/field/SimpleFieldDeserializer.java Deserializes numeric fields as BigDecimal via decimalValue().
src/main/java/com/mindee/v2/parsing/inference/field/SimpleField.java Updates numeric accessors to reflect BigDecimal backing storage.
src/main/java/com/mindee/v2/MindeeClient.java Adds getResultFromUrl() and introduces interruptible polling sleep with backoff/cancellation.
src/main/java/com/mindee/v2/http/MindeeHttpApiV2.java Implements reqGetResultFromUrl() HTTP call.
src/main/java/com/mindee/v2/http/MindeeApiV2.java Adds abstract reqGetResultFromUrl() contract.
src/main/java/com/mindee/v2/clientoptions/PollingOptions.java Adds backoff/cancel token options and validation.
src/main/java/com/mindee/input/URLInputSource.java Expands validateSecure() with SSRF/loopback address protections.
pom.xml Bumps tools.jackson.core:jackson-databind version property.

Comment thread src/main/java/com/mindee/v2/http/MindeeHttpApiV2.java
Comment thread src/main/java/com/mindee/v2/parsing/Job.java Outdated
Comment thread src/main/java/com/mindee/v2/parsing/inference/field/SimpleField.java Outdated
Comment thread src/main/java/com/mindee/v2/parsing/inference/field/SimpleField.java Outdated
Comment thread pom.xml Outdated
@sebastianMindee sebastianMindee force-pushed the uniformize-with-other-sdks branch from 9761b7a to 1398668 Compare July 10, 2026 16:02
@sebastianMindee sebastianMindee merged commit 50e7a1a into main Jul 10, 2026
14 checks passed
@sebastianMindee sebastianMindee deleted the uniformize-with-other-sdks branch July 10, 2026 16:08
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.

2 participants