Skip to content

Releases: crescat-io/saloon-sdk-generator

v1.4.2: Dependency Compatibility Update

17 Nov 20:02

Choose a tag to compare

What's Changed

This release removes the pinned nikic/php-parser dependency constraint, allowing better compatibility with other packages while maintaining full functionality.

Changed

  • Removed pinned nikic/php-parser dependency constraint to allow v5.x as transitive dependency
  • Upgraded nikic/php-parser from v4.19.4 to v5.6.2 (transitive dependency via PHPUnit)
  • Updated multiple dependencies to latest patch versions for improved compatibility

Credits

Installation

composer global require crescat-io/saloon-sdk-generator

Full Changelog: v1.4.1...v1.4.2

v1.4.1: Laravel 12 Support

06 Nov 11:47

Choose a tag to compare

[1.4.1] - 2025-11-06

Changed

  • Added Laravel 12 support to illuminate/http dependency constraint

v1.4.0: Test Generation Support

06 Nov 11:44

Choose a tag to compare

[1.4.0] - 2025-11-06

Added

  • Test Generation: New --pest flag to generate Pest PHP test suites for generated SDKs
  • PestTestGenerator: Automatically generates test files for each resource with proper setup and fixtures
  • ComposerGenerator: Generates composer.json file with proper dependencies and configuration
  • PostProcessor contract for extensible post-processing of generated code
  • Test stubs for Pest test generation (Pest.php, TestCase.php, resource tests)
  • Sample API specifications (Google Drive, Paddle Billing, Paddle OpenAPI)
  • Fallback to path-based naming when endpoint has no name in OpenAPI spec
  • Generated tests include proper constructor arguments, method parameters, and fixture names

Changed

  • composer.json is now always generated (not just when --pest is enabled)
  • Pinned nikic/php-parser to v4.x for compatibility
  • Improved endpoint naming fallback strategy

Fixed

  • Test generator parameter handling for path, body, query, and header parameters
  • Test generator properly respects ignored query and header parameters
  • Test suite configuration now properly excludes generated tests in tests/Output directory
  • ArchTest now properly included in test runs
  • Removed outdated TODO comment about duplicate DTOs (references work correctly)

Known Limitations

  • Test generator constructor argument handling for nullable parameters is not configurable
  • Exception handling in test generator silently returns null (no user feedback)
  • Request body type assumptions (JSON for POST/PATCH) are not configurable

v1.3.1: Dependency compatibility patch

05 Jul 12:46

Choose a tag to compare

What's Changed

This is a patch release that fixes dependency conflicts when installing the SDK generator globally.

Fixed

  • Updated dependency constraints to support Laravel 11 and newer termwind versions
  • Resolved global installation conflicts with illuminate/http and nunomaduro/termwind

Changed

  • illuminate/http version constraint updated from ^10.0 to ^10.0|^11.0
  • nunomaduro/termwind version constraint updated from ^1.15.1 to ^1.15.1|^2.0

Installation

You can now install the SDK generator globally without dependency conflicts:

composer global require crescat-io/saloon-sdk-generator

Full Changelog: v1.3.0...v1.3.1

v1.3.0

05 Jul 12:36

Choose a tag to compare

What's Changed

🚀 Major Improvements

  • Fixed OpenAPI $ref Resolution: Parameter and schema references from components section are now properly resolved, fixing issues #21 and #24
  • Configurable Header Filtering: Added support for filtering headers that Saloon manages automatically (Authorization, Content-Type, Accept, Accept-Language, User-Agent)
  • Nullable Parameters Enhancement: Resource methods now have default values for nullable parameters, improving developer experience

🐛 Bug Fixes

  • Fixed multi-authenticator implementation generating invalid PHP (PR #26 by @mmachatschek)
  • Fixed SecurityRequirements object handling in OpenApiParser
  • Fixed missing namespace use and method params in authenticators
  • Fixed DTO generation with nested references using FQN to prevent backslash prefix issues

✨ Features

  • Header parameter support for both OpenAPI and Postman parsers
  • ApiSpecification constructor now has default values for convenience
  • Added comprehensive test coverage for:
    • Deeply nested DTO references
    • Header filtering functionality
    • Nullable parameter default values

Upgrading

You might have to run the following to upgrade:

composer global require crescat-io/saloon-sdk-generator:^1.3.0 -W

Contributors

  • Thanks to @nikspyratos for the initial header support implementation in PR #10
  • Thanks to @mmachatschek for the nullable parameters fix in PR #27 and multi-authenticator fix in PR #26

Full Changelog: v1.2.0...v1.3.0

v1.2.0

05 Jan 21:30

Choose a tag to compare

What's Changed

  • DTO Generation: SDK Generator will now generate DTOs from openapi specs, the DTOs
  • Authenticator in Connector class, The SDK Generator will detect which authentication method that is used in the API and setup the scaffolding for Authentication in the Connector class, supports apiKey (in header, query), HTTP auth (basic, digest), Bearer Token, Header Token, and also support OAuth2 Authentication using Client Credentials and Authorization Code Grant (see the Saloon OAuth2 Docs for more info on how that works.
  • Bumped required PHP version up from ^8.1 to ^8.2

Upgrading

You might have to run the following to upgrade:

composer global require crescat-io/saloon-sdk-generator:^1.2.0 -W

New Contributors

Full Changelog: v1.1.0...v1.2.0

v1.1.0

04 Oct 12:03

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.5...v1.1.0

v1.0.5

18 Sep 08:07

Choose a tag to compare

What's Changed

  • bugfix: Fix for when operation ID is null. by @bobbyshaw in #8

New Contributors

Full Changelog: v1.0.4...v1.0.5

v1.0.4

14 Sep 10:07

Choose a tag to compare

Changelog - v1.0.4 (2023-09-14)

This release introduces a ParserNotRegisteredException that will be throw if a requested parser type has not been registered, also we show a helpful error message when this occurs in the GenerateSdk command.

New

  • New build: Binary updated [Commit: d651b3a]

Changes

  • Parser Factory Class: Now gives a clear error if a parser type is missing. [Commit: d651b3a]
  • Error Message: If a parser of the requested type is not registered in the Parser factory, show a useful error message in the command line.

Full Changelog: v1.0.3...v1.0.4

v1.0.3

11 Sep 09:08

Choose a tag to compare

Changelog - v1.0.3 (2023-09-11)

New

  • New Build: Binary updated. [Commit: 9364198]

Changes

  • In MethodGeneratorHelper: In generateArrayReturnMethod there's now the capability to specify whether an array should
    be wrapped in array_filter. This filters out null values so they aren't transmitted in the body/query. In addition,
    depending on the nullable attribute, type hints in the docblocks will either be "null | type" or just "type". This
    change addresses and fixes Issue #5. [Commit: 82db89a]
  • in OpenApiParser, replace the way "nullable" is parsed, previously it used "nullable", but it should use "required"
    instead, [Commit: c3c8b28]
  • Added the Crescat API as a samples and dependencies were updated. [Commit: 81988e8]
  • in NameHelper Prevent name collisions with reserved PHP keyword. [Commit: 54bdd87]

Full Changelog: v1.0.2...v1.0.3