SDK-2787: .NET - Add support for retrieving the extraction_image_ids field from the IDV pages - dotnet#552
Conversation
…e_ids field from the IDV pages [dotnet]
🤖 Claude Code ReviewCode Review FindingsThe substantive change for SDK-2787 is a single new property on CriticalNone MajorNone Minor
Nit
What's done well: JSON property name Overall: Approved with comments — the feature is correct. Before merging, consider |
There was a problem hiding this comment.
Pull request overview
Adds support in the Doc Scan retrieval models for deserializing the extraction_image_ids field on IDV page responses, with accompanying unit tests. The remainder of the PR is largely formatting-only (tab-to-spaces / whitespace normalization) across source, test, and example projects.
Changes:
- Add
PageResponse.ExtractionImageIdsmapped toextraction_image_idsin JSON. - Add unit tests validating
extraction_image_idsparsing and empty-list default behavior when absent/empty. - Normalize whitespace/indentation across many files (no intended behavioral changes).
Reviewed changes
Copilot reviewed 3 out of 85 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Yoti.Auth.Tests/YotiClientEngineTests.cs | Whitespace/indentation normalization only. |
| test/Yoti.Auth.Tests/TestTools/ShareSession.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/TestData/IdentityProfiles.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/ShareUrl/Policy/DynamicPolicyBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/ShareUrl/DynamicScenarioBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DocScan/Session/Retrieve/GetSessionResultTests.cs | Whitespace/indentation normalization only. |
| test/Yoti.Auth.Tests/DocScan/Session/Retrieve/Check/CheckResponseTests.cs | Adds unit tests for PageResponse.ExtractionImageIds. |
| test/Yoti.Auth.Tests/DocScan/Session/Create/SessionSpecificationBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DocScan/Session/Create/NotificationConfigTests.cs | Formatting cleanup (spacing in initializers). |
| test/Yoti.Auth.Tests/DocScan/Session/Create/Check/RequestedWatchlistScreeningCheckBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DocScan/DocScanClientTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DigitalIdentityClientTests.cs | Formatting cleanup only. |
| test/Yoti.Auth.Tests/DigitalIdentityClientEngineTests.cs | Whitespace/indentation normalization only. |
| test/Yoti.Auth.Tests/DigitalIdentity/ShareSessionRequestBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DigitalIdentity/RequirementNotMetDetails.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DigitalIdentity/QrRequestBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/DigitalIdentity/Policy/DynamicPolicyBuilderTests.cs | Removes trailing whitespace only. |
| test/Yoti.Auth.Tests/CryptoEngineTests.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/Web/RequestBuilder.cs | Formatting cleanup only. |
| src/Yoti.Auth/ShareUrl/Policy/WantedAttributeBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/ShareUrl/Policy/DynamicPolicyBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/ShareUrl/Policy/DynamicPolicy.cs | Fixes spacing in class declaration + whitespace cleanup. |
| src/Yoti.Auth/GlobalSuppressions.cs | Splits combined suppression attributes into separate lines (formatting); highlights duplicated suppression entry. |
| src/Yoti.Auth/Exceptions/YotiProfileException.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Resource/LivenessResourceResponse.cs | Trailing whitespace cleanup only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/PageResponse.cs | Adds ExtractionImageIds property mapped to extraction_image_ids. |
| src/Yoti.Auth/DocScan/Session/Retrieve/IdentityProfile/FailureReasonResponse.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/GetSessionResult.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummaryReportBaseCheckResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/WatchlistScreeningConfig.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/WatchlistAdvancedCaSearchConfigResponseYotiAccount.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/WatchlistAdvancedCaSearchConfigResponseCustomAccount.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/WatchlistAdvancedCaSearchConfigResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/TypeListSourcesResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/SearchProfileSourcesResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/ReportResponseWithSummary.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/RawResults.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/ISearchConfig.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/FuzzyMatchingStrategyResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/ExactMatchingStrategyResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/CaSourcesResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/WatchlistSummary/CaMatchingStrategyResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/Check/ProfileCheckResponse.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Retrieve/AdvancedIdentityProfile/FailureReasonResponse.cs | Formatting cleanup only. |
| src/Yoti.Auth/DocScan/Session/Create/SessionSpecificationBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Create/SessionSpecification.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Create/SdkConfigBuilder.cs | Trailing whitespace cleanup only. |
| src/Yoti.Auth/DocScan/Session/Create/NotificationConfigBuilder.cs | Trailing whitespace cleanup only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/RequestedWatchlistScreeningCheckBuilder.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/RequestedWatchlistAdvancedCaCheckBuilder.YotiAccount.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/RequestedWatchlistAdvancedCaCheckBuilder.CustomAccount.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/RequestedWatchlistAdvancedCaCheckBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/RequestedFaceComparisonCheckBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedWatchlistAdvancedCaConfigYotiAccount.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedWatchlistAdvancedCaConfigCustomAccount.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedTypeListSources.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedSearchProfileSources.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedFuzzyMatchingStrategy.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedCaSources.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/Session/Create/Check/Advanced/RequestedCaMatchingStrategy.cs | Whitespace/indentation normalization only. |
| src/Yoti.Auth/DocScan/DocScanService.cs | Formatting cleanup only. |
| src/Yoti.Auth/DigitalIdentityClientEngine.cs | Formatting cleanup only. |
| src/Yoti.Auth/DigitalIdentityClient.cs | Formatting cleanup only. |
| src/Yoti.Auth/DigitalIdentity/ShareSessionResult.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/ShareSessionRequest.cs | Formatting cleanup only. |
| src/Yoti.Auth/DigitalIdentity/QrRequestBuilder.cs | Formatting cleanup only. |
| src/Yoti.Auth/DigitalIdentity/Policy/WantedAttributeBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/Policy/PolicyBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/Policy/Policy.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/Policy/NotificationBuilder.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/Policy/Notification.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/Policy/AdvancedIdentityProfile.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/ErrorReason.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/ErrorDetails.cs | Removes trailing whitespace only. |
| src/Yoti.Auth/DigitalIdentity/DigitalIdentityService.cs | Formatting cleanup only. |
| src/Yoti.Auth/CryptoEngine.cs | Formatting cleanup only. |
| src/Examples/Profile/CoreExample/Controllers/HomeController.cs | Formatting cleanup only. |
| src/Examples/DocScan/DocScanExample/Models/DisplayHelper.cs | Whitespace/indentation normalization only. |
| src/Examples/DocScan/DocScanExample/Controllers/IdentityProfileController.cs | Removes trailing whitespace only. |
| src/Examples/DocScan/DocScanExample/Controllers/HomeController.cs | Removes trailing whitespace only. |
| src/Examples/DocScan/DocScanExample/Controllers/DbsController.cs | Removes trailing whitespace only. |
| src/Examples/DigitalIdentity/DigitalIdentity/Startup.cs | Removes trailing whitespace only. |
| src/Examples/DigitalIdentity/DigitalIdentity/Controllers/SuccessController.cs | Removes trailing whitespace only. |
| src/Examples/DigitalIdentity/DigitalIdentity/Controllers/HomeController.cs | Removes trailing whitespace only. |
| src/Examples/DigitalIdentity/DigitalIdentity/Controllers/AdvancedIdentityShareController.cs | Removes trailing whitespace only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [JsonProperty(PropertyName = "extraction_image_ids")] | ||
| public List<string> ExtractionImageIds { get; private set; } = new List<string>(); |
| [assembly: SuppressMessage("Usage", "CA2237:Mark ISerializable types with serializable", Justification = "[Serializable] not available in 'netstandard' target framework", Scope = "type", Target = "~T:Yoti.Auth.Exceptions.ExtraDataException")] | ||
| [assembly: SuppressMessage("Style", "IDE0066:Convert switch statement to expression", Justification = "Other switch cases can all be represented more concisely by the default case", Scope = "member", Target = "~M:Yoti.Auth.Web.Response.CreateExceptionFromStatusCode``1(System.Net.Http.HttpResponseMessage)")] |
Now I have everything I need. The core change is a one-property addition to
PageResponse.cs, with the rest of the diff being whitespace normalization (tab-to-spaces) across many files bundled in the same commit.Summary
Adds support for deserializing the
extraction_image_idsfield returned in IDV page responses from the Yoti Doc Scan API. ThePageResponsemodel gains a newExtractionImageIdsproperty (List<string>) that maps to theextraction_image_idsJSON field, defaulting to an empty list when the field is absent. The commit also includes a broad whitespace normalization sweep (tab-to-spaces) across many source and test files.Changes
src/Yoti.Auth/DocScan/Session/Retrieve/PageResponse.cs— AddedExtractionImageIdsproperty (List<string>, JSON keyextraction_image_ids), initialized to an empty list to avoid null-reference issues when the field is omitted by the API.test/Yoti.Auth.Tests/DocScan/Session/Retrieve/Check/CheckResponseTests.cs— Added four new unit tests covering:extraction_image_ids: [])src/,test/, andexamples/to align with the project's style convention. No functional changes in these files.QA Test Steps
Setup
websdk-auto/SDK-2787-dotnet-add-support-for-retrieving-the-extraction-image-ids-field-from-the-idv-pages.dotnet build.dotnet test.Unit test verification
4. In the test output, confirm these four new tests pass in
CheckResponseTests:CheckPageResponseExtractionImageIdsParsedWithSingleIdCheckPageResponseExtractionImageIdsParsedWithMultipleIdsCheckPageResponseExtractionImageIdsDefaultsToEmptyListWhenEmptyArrayCheckPageResponseExtractionImageIdsDefaultsToEmptyListWhenFieldAbsentHappy path — field present
5. Create a Doc Scan session that results in an IDV page resource containing an
extraction_image_idsarray (requires a live/sandbox environment that returns this field).6. Call
GetSessionand navigate toResources → IdDocumentResource → Pages[n].ExtractionImageIds.7. Confirm the list contains the expected image ID strings (UUIDs).
Edge case — field absent
8. Call
GetSessionfor a session whose page resources do not yet includeextraction_image_ids(e.g., an in-progress session).9. Confirm
PageResponse.ExtractionImageIdsis a non-null empty list rather than null.Regression checks
10. Confirm existing
PageResponseproperties (CaptureMethod,Media,Frames) are still populated correctly after deserialization.11. Run the full test suite and confirm no pre-existing tests were broken by the whitespace normalization changes.
Notes
ExtractionImageIdsis deliberately initialized tonew List<string>()so callers can safely iterate it without a null check, regardless of whether the API populates the field.private set(populated only via JSON deserialization), consistent with other read-only response properties in the model.git diff -w development...HEADto see only the functional change.PageResponse.Related Jira: SDK-2787
Auto-generated by n8n + Claude CLI