Releases: crescat-io/saloon-sdk-generator
v1.3.1: Dependency compatibility patch
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
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
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
- @HelgeSverre made their first contribution in #18
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's Changed
- Upgrade | Saloon v3 by @Sammyjo20 in #11
New Contributors
- @Sammyjo20 made their first contribution in #11
Full Changelog: v1.0.5...v1.1.0
v1.0.5
What's Changed
- bugfix: Fix for when operation ID is null. by @bobbyshaw in #8
New Contributors
- @bobbyshaw made their first contribution in #8
Full Changelog: v1.0.4...v1.0.5
v1.0.4
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
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
v1.0.2
Changelog - v1.0.2 (2023-08-19)
New
- Added Altinn's sample postman collection, which is a problematic spec to deal with since the name field is simply a duplicate of a long verbose url path, which causes request class name collisions.
Changes
- Improved PostmanCollectionParser to handle object lists in responses, simply typehints a nullable array for now (no way to derive the name, will simply be called "items" for now).
- Fixed method name generation, should be camelCase instead of PascalCase.
- Add a "todo" comment to duplicated method names, change suffix from random string to a counter (1,2,3 etc).
Full Changelog: v1.0.1...v1.0.2
v1.0.1
v1.0.0
Tagging a release the composer global require command finds a "version", instead of having to specify dev-master.