Enhance Qualer SDK with new features and fixes#21
Merged
rhythmatician merged 13 commits intomasterfrom Jul 1, 2025
Merged
Conversation
…y asset_id parameter
…y client_company_id parameter
…y service_order_id parameter
…y service_order_item_id parameter
…support for various fields
…andle known OpenAPI generator issues
…OpenAPI generator issues
…uipment, product, service order payment, vendor company, and maintenance plan IDs
Contributor
There was a problem hiding this comment.
Pull Request Overview
Enhance the Qualer SDK by replacing an outdated clean-up test, adding a parameterized integration test suite, and improving model nullability and enum handling.
- Removed the obsolete
test_regenerate_sdk_clean.py. - Introduced
tests/test_endpoints_integration.pywith parameterized integration tests that skip when the API key is unset. - Streamlined
test_all_get_endpoints.pyto simplify client initialization. - Updated SDK models to support nullable date/time fields, switch enums to
IntEnum, and robustly parse nullable values. - Extended
spec.jsonwithx-nullableflags and correct integer enum formats.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_regenerate_sdk_clean.py | Entirely removed outdated clean-up tests. |
| tests/test_endpoints_integration.py | Added comprehensive, parameterized GET endpoint tests. |
| tests/test_all_get_endpoints.py | Simplified AuthenticatedClient initialization and logs. |
| src/qualer_sdk/models/… | Added None support to datetime fields; converted enums to integer-based types; updated parsing logic. |
| spec.json | Marked fields as x-nullable; changed string enums to integer enums. |
Comments suppressed due to low confidence (3)
src/qualer_sdk/models/qualer_api_models_report_datasets_to_measurement_field_response_batch_type.py:4
- [nitpick] Enum members are now named generically (
VALUE_0,VALUE_1,VALUE_2), losing semantic clarity. Consider using names derived fromx-enumNames(e.g.,UNSET,AS_FOUND,AS_LEFT) to preserve readability for API consumers.
class QualerApiModelsReportDatasetsToMeasurementFieldResponseBatchType(IntEnum):
tests/test_all_get_endpoints.py:179
- AuthenticatedClient is now called with only the API token, but earlier code and other tests expect both a base_url and token. Update this call to match the client constructor signature (e.g.,
AuthenticatedClient(base_url, token=api_token)).
client = AuthenticatedClient(api_token)
tests/test_endpoints_integration.py:836
- Providing a default value here overrides the
sample_client_company_idfixture. Remove the=57071default so pytest will inject the fixture correctly.
def test_client_company_id_endpoint_response_parsing(
src/qualer_sdk/models/qualer_api_models_service_orders_from_update_payment_status_model.py
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce parameterized integration tests for various SDK endpoints, improve handling of nullable fields and enum types, and streamline the AuthenticatedClient initialization. Remove redundant test files and ensure integration tests skip if the API key is not set.