SDK-2738: .NET - Expose IDV breakdown "process" property - dotnet#550
SDK-2738: .NET - Expose IDV breakdown "process" property - dotnet#550mehmet-yoti wants to merge 1 commit into
Conversation
🤖 Claude Code ReviewCode Review FindingsSummaryThis change adds a CriticalNone MajorNone MinorNone Nit
What's Done Well
OverallApproved — ready to merge. The nits are optional and do not block. |
There was a problem hiding this comment.
Pull request overview
This pull request updates the DocScan session retrieval models to expose the IDV breakdown "process" field (previously present in API responses but not surfaced by the .NET SDK), making it accessible to SDK consumers via BreakdownResponse.Process.
Changes:
- Added
BreakdownResponse.Processwith Newtonsoft.Json mapping for"process". - Extended existing breakdown parsing assertions to include
process. - Added unit tests validating deserialization for
"AUTOMATED","EXPERT_REVIEW", and missingprocess.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Yoti.Auth/DocScan/Session/Retrieve/BreakdownResponse.cs | Adds Process property mapped to the "process" JSON field so SDK consumers can read the breakdown handling mode. |
| test/Yoti.Auth.Tests/DocScan/Session/Retrieve/Check/CheckResponseTests.cs | Adds/updates tests to confirm process is correctly deserialized and included in existing breakdown assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Exposes the
processproperty from the IDV (Identity Verification) breakdown API response in the .NET SDK. Theprocessfield indicates how a particular sub-check was handled (e.g.,AUTOMATEDorEXPERT_REVIEW) and was previously returned by the backend but silently dropped during deserialization. This change makes it accessible to SDK consumers viaBreakdownResponse.Process.Changes
src/Yoti.Auth/DocScan/Session/Retrieve/BreakdownResponse.cs— AddedProcesspublic property with[JsonProperty("process")]deserialization mapping, following the same pattern as existingSubCheck,Result, andDetailsproperties.test/Yoti.Auth.Tests/DocScan/Session/Retrieve/Check/CheckResponseTests.cs— Added three new unit tests covering:CheckBreakdownResponseProcessIsAutomated— verifies"AUTOMATED"is correctly deserialized.CheckBreakdownResponseProcessIsExpertReview— verifies"EXPERT_REVIEW"is correctly deserialized.CheckBreakdownResponseProcessIsNullWhenAbsent— verifiesProcessisnullwhen the field is absent from the JSON payload.GetBreakdownResponse()andAssertBreakdownResponseValuesCorrect()to includeprocessin existing round-trip assertions.QA Test Steps
websdk-auto/SDK-2738-dotnet-expose-idv-breakdown-process-propertyand restore NuGet packages (dotnet restore).dotnet test(or runCheckResponseTestsspecifically) and confirm all tests pass, including the three newCheckBreakdownResponseProcess*tests.AUTOMATED: Simulate aBreakdownResponseJSON payload containing"process": "AUTOMATED"and assertresponse.Process == "AUTOMATED". Covered byCheckBreakdownResponseProcessIsAutomated.EXPERT_REVIEW: Simulate a payload containing"process": "EXPERT_REVIEW"and assertresponse.Process == "EXPERT_REVIEW". Covered byCheckBreakdownResponseProcessIsExpertReview.processkey (older API responses) and assertresponse.Process == null. Covered byCheckBreakdownResponseProcessIsNullWhenAbsent.CheckBreakdownResponseIsParsedand all other existingCheckResponseTeststo confirm no regressions were introduced inSubCheck,Result, andDetailsdeserialization.GET /sessions/{sessionId}from the DocScan API and traversesession.Checks[*].Report.Breakdown[*].Processto confirm the value is populated as expected from a live response.Notes
Processproperty is read-only (private set) and JSON-only, consistent with the rest of theBreakdownResponsemodel — there is no public setter and the field cannot be set programmatically."AUTOMATED"and"EXPERT_REVIEW", but the property is typed asstringto handle any future values the backend may introduce without requiring an SDK update.BreakdownResponseis deserialized directly from raw JSON by Newtonsoft.Json.Related Jira: SDK-2738
Auto-generated by n8n + Claude CLI