Update CI for OpenAPI and regenerate SDK#11
Merged
rhythmatician merged 26 commits intomasterfrom Jun 7, 2025
Merged
Conversation
…ndling and missing path parameter injection
…correct operation IDs
…on and integrate into SDK regeneration process
…gger_spec.py for OpenAPI issues
… and clean up install_requires formatting
…and adding missing comma in install_requires
- Created `exceptions.py` to define custom exception classes for the SDK, including `OpenApiException`, `ApiException`, and specific exceptions for HTTP status codes. - Added `ApiResponse` class in `api_response.py` to standardize API response handling. - Updated `__init__.py` files to import new exception classes and the `ApiResponse` class. - Modified `regenerate_sdk.py` to generate the `exceptions.py` file automatically during SDK regeneration.
This reverts commit 69651fd.
refactor: add missing pass statements in exception classes for clarity
…adding API imports
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR switches SDK generation from Swagger Codegen to OpenAPI Generator, updates the CI to validate the OpenAPI spec, and bumps Python support and dependencies.
- Regenerate SDK using OpenAPI Generator with Pydantic models and enhanced post-processing
- Patch the OpenAPI spec (operationId cleanup, missing path params injection)
- Update CI workflow: drop Python 3.8, validate spec, and fix Codecov config
Reviewed Changes
Copilot reviewed 266 out of 266 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/qualer_sdk/api/... | Regenerated all API client modules with OpenAPI Generator, pydantic validation, and new method signatures |
| regenerate_sdk.py | Updated script to patch spec, ensure unique operationIds, inject path params, and run OpenAPI Generator |
| spec.json | Patched spec to clean up operationIds and declared empty parameters arrays for validation |
| .github/workflows/ci.yml | CI: removed Python 3.8, added validate step for spec, and corrected Codecov files input |
| setup.py | Bumped python_requires to >=3.9 and added pydantic to install requirements |
| pyproject.toml | Aligned requires-python and dependencies with updated setup.py |
Comments suppressed due to low confidence (3)
src/qualer_sdk/api/employee_preference_api.py:181
- [nitpick] The method name
get_get4is unclear and unintuitive. Consider using a more descriptive name (e.g.,get_preferences_by_element_page) or customizing the operationId in the spec to produce a meaningful method name.
def get_get4(
regenerate_sdk.py:92
- [nitpick] The new
inject_missing_path_paramsfunction isn't covered by any tests. Consider adding unit tests for edge cases (e.g., nested paths, existing parameters) to ensure reliability when the spec evolves.
def inject_missing_path_params(spec):
spec.json:1810
- Path parameters must always be
required: true. Changing this tofalsemay lead to invalid client code. Revert totrueor ensure injection logic correctly declares path params as required.
"required": false,
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.
Correct the Codecov action configuration, switch from Swagger to OpenAPI for SDK generation, and add a validation step for the OpenAPI specification in the CI workflow.