Skip to content

Update CI for OpenAPI and regenerate SDK#11

Merged
rhythmatician merged 26 commits intomasterfrom
typecasting
Jun 7, 2025
Merged

Update CI for OpenAPI and regenerate SDK#11
rhythmatician merged 26 commits intomasterfrom
typecasting

Conversation

@rhythmatician
Copy link
Collaborator

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.

Copilot AI review requested due to automatic review settings June 7, 2025 14:30

This comment was marked as outdated.

…on and integrate into SDK regeneration process
…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.
refactor: add missing pass statements in exception classes for clarity
@rhythmatician rhythmatician enabled auto-merge (squash) June 7, 2025 16:43
@rhythmatician rhythmatician requested a review from Copilot June 7, 2025 16:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_get4 is 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_params function 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 to false may lead to invalid client code. Revert to true or ensure injection logic correctly declares path params as required.
            "required": false,

@rhythmatician rhythmatician disabled auto-merge June 7, 2025 18:50
@rhythmatician rhythmatician merged commit 3c9e59d into master Jun 7, 2025
5 checks passed
@rhythmatician rhythmatician deleted the typecasting branch June 7, 2025 18:50
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.

2 participants