Skip to content

🐛 search params must be typed to response - #441

Merged
ianardee merged 1 commit into
mainfrom
better-search
Sep 10, 2026
Merged

ianardee merged 1 commit into
mainfrom
better-search

Conversation

@ianardee

Copy link
Copy Markdown
Collaborator

Description

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.

🟡 Changes recommended

The typed BaseSearchParameters<TSearchResponse> change is a public API breaking change (needs compatibility strategy or release documentation alignment) and the new generic constraint should be adjusted.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR strengthens the V2 Search API by tying search-parameter types to their corresponding search-response types at compile time, and also standardizes test categorization by adding a common V1 test trait across many unit tests.

Changes:

  • Make BaseSearchParameters generic and update Client.SearchAsync / HTTP layer signatures to accept BaseSearchParameters<TSearchResponse>.
  • Update V2 search parameter classes (ModelSearchParameters, RagDocumentSearchParameters) to inherit from the typed base.
  • Add [Trait("Category","V1")] to many V1 unit tests, plus minor cleanup (unused usings, workflow name, doc comment).
File summaries
File Description
tests/Mindee.UnitTests/V1/Product/Us/PayrollCheckRegister/PayrollCheckRegisterV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Us/BankCheck/BankCheckV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Receipt/ReceiptV5Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Receipt/ReceiptV4Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Passport/PassportV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/MultiReceiptsDetector/MultiReceiptsDetectorV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/InvoiceSplitter/InvoiceSplitterV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Invoice/InvoiceV4Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/InternationalId/InternationalIdV2Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Generated/GeneratedV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/Payslip/PayslipV3Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/IdCard/IdCardV2Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/IdCard/IdCardV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/HealthCard/HealthCardV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/CarteGrise/CarteGriseV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/BankAccountDetails/BankAccountDetailsV2Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Fr/BankAccountDetails/BankAccountDetailsV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/FinancialDocument/FinancialDocumentV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/Cropper/CropperV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Product/BarcodeReader/BarcodeReaderV1Test.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Standard/DecimalFieldTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Standard/DateFieldTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/LocalResponseTest.cs Add V1 trait and rename category.
tests/Mindee.UnitTests/V1/Parsing/Common/OcrTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Common/FullTextOcrTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Common/ErrorTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Common/CropperTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Parsing/Common/AsyncPredictResponseTest.cs Add V1 test category trait.
tests/Mindee.UnitTests/V1/Http/MindeeApiTest.cs Remove unused using.
tests/Mindee.UnitTests/V1/ClientTest.cs Remove unused using.
tests/Mindee.IntegrationTests/V2/Search/ModelSearchTest.cs Let SearchAsync infer TSearchResponse from typed parameters.
src/Mindee/V2/Search/RagDocuments/RagDocumentSearchParameters.cs Type search params to RagDocumentSearchResponse and update XML docs.
src/Mindee/V2/Search/Models/ModelSearchParameters.cs Type search params to ModelSearchResponse and update XML docs.
src/Mindee/V2/Product/Extraction/RagDocuments/Params/RagDocumentUploadParameters.cs Remove empty XML <returns> tag.
src/Mindee/V2/Http/MindeeApiV2.cs Update search request signature to typed BaseSearchParameters<TSearchResponse>.
src/Mindee/V2/Http/HttpApiV2.cs Update abstract search request signature + XML docs for typed parameters.
src/Mindee/V2/ClientOptions/BaseSearchParameters.cs Make base search parameters generic and constrain to search response type.
src/Mindee/V2/Client.cs Update SearchAsync signature to accept typed search parameters.
.github/workflows/cron.yml Rename workflow display name.
Review details
  • Files reviewed: 38/39 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Mindee/V2/Client.cs
Comment thread src/Mindee/V2/ClientOptions/BaseSearchParameters.cs
@ianardee
ianardee merged commit c30eb85 into main Sep 10, 2026
29 checks passed
@ianardee
ianardee deleted the better-search branch September 10, 2026 17:46
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