Skip to content

Implement model classes for API responses #4

@Bombardier-C-Kram

Description

@Bombardier-C-Kram

Currently, API responses are assumed to be correct but are not instantiated into model classes. This gap leads to type risks and makes it difficult to validate or manage response data effectively. To improve robustness and maintainability, model classes should be created for all API responses, and incoming data should be parsed into these models.

Proposed solution:

  • Define model classes for all relevant API responses.
  • Implement conversion/parsing logic to instantiate these models from raw API response data.
  • Update all code paths that use API responses to utilize these model classes.
  • Add unit tests to verify that response data is correctly mapped into the models and that errors are handled gracefully.

Code context:

Benefits:

  • Improved type safety and code reliability.
  • Easier validation and management of API data.
  • Better maintainability and extensibility for future API changes.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions