Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK generator to OpenAPI Generator #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lordofweb
Copy link

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:

  • Migration from swagger-codegen to OpenAPI Generator
  • PHP 8.1 support
  • Addition of OpenAPI Generator configuration file (config-openapi-generator.yml)
  • Creation of custom templates to maintain consistency with previously generated code
  • Update of API models and endpoints

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

  • General SDK structure remains the same to maintain compatibility
  • Namespaces and file organization are preserved
  • Configuration is now more flexible and documented

Checklist

  • OpenAPI Generator configuration set up
  • Custom templates created
  • PHP 8.1 support added
  • Documentation updated
  • Existing code structure preserved

Introduced configuration for PHP client generation using OpenAPI Generator.
Updated .gitignore to include .idea directory and created necessary templates and configurations for code generation.
Copy link

sonarcloud bot commented Nov 24, 2024

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