Skip to content

Fix API response field alignment and add CI improvements - #2

Merged
liamlenholm merged 11 commits into
mainfrom
fix/api-response-field-alignment
Apr 26, 2026
Merged

liamlenholm merged 11 commits into
mainfrom
fix/api-response-field-alignment

Conversation

@liamlenholm

Copy link
Copy Markdown
Owner

Summary

  • Fix model definitions to match the actual API wire format (enrichment models, frozen pydantic models, webhook headers)
  • Export new enrichment and data models
  • Add mypy type checking, build verification, and PyPI publish workflow to CI

Changes

Fixes

  • Align enrichment models with .NET wire format
  • Freeze all pydantic models for immutability
  • Remove phantom WebhookHeader.EVENT member

CI/CD

  • Add typecheck job (mypy)
  • Add build job with artifact upload
  • Add PyPI trusted publish workflow on GitHub releases

Tests

  • Pin webhook signature scheme

The event type lives in the request body (WebhookPayload.event),
not in an HTTP header. Removes the never-sent EVENT enum member
and its HEADER_EVENT alias.
Add _csharp_camel alias generator matching System.Text.Json's
CamelCase policy. Fix PersonDetaljer_* aliases (server sends
lowercase d). Add missing IpData and IpOverallRisk fields.
Add TestSignatureScheme verifying the Stripe-style sha256= prefix
and that bare hex digests are rejected.
@liamlenholm
liamlenholm merged commit 118c484 into main Apr 26, 2026
6 checks passed
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.

1 participant