Skip to content

Handle unknown spouse sex values - #72

Merged
LinFor merged 1 commit into
LinFor:masterfrom
Weegley:fix/unknown-spouse-sex
Jul 22, 2026
Merged

Handle unknown spouse sex values#72
LinFor merged 1 commit into
LinFor:masterfrom
Weegley:fix/unknown-spouse-sex

Conversation

@Weegley

@Weegley Weegley commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Handle unexpected UNKNOWN values in PersonResponse.spouses[].sex.

The Kinopoisk API can return "UNKNOWN" even though the generated enum only contains MALE and FEMALE. This currently causes deserialization of the entire person response to fail.

Changes

  • Add a dedicated converter for PersonResponse_spousesSex.
  • Preserve normal handling of MALE and FEMALE.
  • Map unsupported values to an internal fallback enum value.
  • Add a regression test for "UNKNOWN".

Testing

  • All 13 automated tests pass.

@LinFor
LinFor merged commit 6ab8025 into LinFor:master Jul 22, 2026
1 check passed
@Weegley
Weegley deleted the fix/unknown-spouse-sex branch July 22, 2026 20:44
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