Skip to content

DEVEXP-710: Implement Models and Apis for "Available Numbers"#44

Merged
matsk-sinch merged 8 commits intov2.0from
DEVEXP-710_Available_Numbers
Feb 6, 2025
Merged

DEVEXP-710: Implement Models and Apis for "Available Numbers"#44
matsk-sinch merged 8 commits intov2.0from
DEVEXP-710_Available_Numbers

Conversation

@matsk-sinch
Copy link
Contributor

Development:

  • Implemented Pydantic models for API responses.
  • Added Pydantic models for query parameters.

Enhancements to Input and Output Handling:

  • Added functionality to convert unknown fields from snake_case to camelCase and vice versa when handling extra fields in requests and responses.
  • Improved handling for related request and response models, including:
    • Optional parameters support.
    • Management of unexpected parameters in server responses.
    • Processing of nested data structures with Pydantic to ensure proper validation
    • Handling of datetime fields.
    • Used TypedDict for dictionary-like parameter handling to improve DX

Testing:

  • Developed unit tests for all models.
  • Created unit tests for API endpoints.

Development:
 - Implemented Pydantic models for API responses.
 - Added Pydantic models for query parameters.

Enhancements to Input and Output Handling:
 - Added functionality to convert unknown fields from snake_case to camelCase and vice versa when handling extra fields in requests and responses.
 - Improved handling for related request and response models, including:
   - Optional parameters support.
   - Management of unexpected parameters in server responses.
   - Processing of nested data structures with Pydantic to ensure proper validation
   - Handling of datetime fields.
   - Used TypedDict for dictionary-like parameter handling to improve DX

Testing:
 - Developed unit tests for all models.
 - Created unit tests for API endpoints.

Signed-off-by: Jessica Matsuoka <jessica.akemi.matsuoka@sinch.com>
- Refactor models to remove redundancy
- Mapping approach for VoiceConfiguration to dynamically select the correct model

Signed-off-by: Jessica Matsuoka <jessica.akemi.matsuoka@sinch.com>
@matsk-sinch matsk-sinch force-pushed the DEVEXP-710_Available_Numbers branch from 93a71a7 to 8281d46 Compare February 4, 2025 15:49
Copy link
Contributor

@asein-sinch asein-sinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in this PR looks solid. There are points regarding the DX and the type hints that I would like to revisit, but the current version and its test coverage are already very good. Keep up the good work! 🌟

@matsk-sinch matsk-sinch merged commit 04945ed into v2.0 Feb 6, 2025
4 checks passed
@matsk-sinch matsk-sinch deleted the DEVEXP-710_Available_Numbers branch February 6, 2025 09:47
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.

3 participants