getbrevo / brevo-php

A fully-featured PHP API client to interact with Brevo.
https://developers.brevo.com/
MIT License
51 stars 23 forks source link

Update SDK generator to OpenAPI Generator #47

Open lordofweb opened 1 day ago

lordofweb commented 1 day ago

Description

This PR proposes a major update of the SDK generator by migrating from swagger-codegen to OpenAPI Generator, while maintaining compatibility with the existing SDK structure.

Main changes:

Technical benefits:

  1. Generated code modernization

    • Full PHP 8.1 support
    • Better strict type handling
    • Cleaner and better documented code
  2. Improved maintenance

    • Centralized configuration in config-openapi-generator.yml
    • Custom templates for better generated code control
    • Easier to update with future API versions
  3. Best practices

    • Use of latest OpenAPI features
    • Improved documentation
    • Updated unit tests

How to test

To generate the SDK with the new configuration:

openapi-generator generate --skip-validate-spec -c config-openapi-generator.yml

Migration notes

Checklist

sonarcloud[bot] commented 1 day ago

Quality Gate Failed Quality Gate failed

Failed conditions
67.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud