Skip to content

feat(core): refactor basemodels moving them to core#165

Open
marcos-sinch wants to merge 3 commits into
v2.1-nextfrom
feature/DEVEXP-1178-Python-Refactor-Base-Models
Open

feat(core): refactor basemodels moving them to core#165
marcos-sinch wants to merge 3 commits into
v2.1-nextfrom
feature/DEVEXP-1178-Python-Refactor-Base-Models

Conversation

@marcos-sinch

@marcos-sinch marcos-sinch commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Refactor base models into core

Consolidates the duplicated per-domain BaseModelConfiguration classes (SMS,
Numbers, Number Lookup, Conversation) into three shared base classes under
sinch.core.models.internal.

  • BaseConfigModel, SnakeCaseExtrasModel (camelCase→snake_case
    extras on validation), and CamelCaseDumpModel (snake_case→camelCase on dump
    when by_alias=True); each domain now aliases to the appropriate base.
  • The Numbers model_dump override is reimplemented as a Pydantic v2 wrap
    serializer, so the camelCase rewrite now applies to model_dump_json too.
  • No public behaviour change: all request serializers call model_dump(by_alias=True).
  • Tests for the case helpers, each base class, and composition behaviour.

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