Releases: dedoc/scramble
v0.13.2
What's Changed
- Added support of variables used in validation rules by @chaikivskyi in #1005
- Fixed
isInstanceOfcould've returnednullfor template type. - Fixed infinite recursion for cases when
@mixinof the class alias is used on the same class 😵💫
New Contributors
- @chaikivskyi made their first contribution in #1005
Full Changelog: v0.13.1...v0.13.2
v0.13.1
What's Changed
- Expose more internal type inference related APIs by @romalytvynenko in #1006
Full Changelog: v0.13.0...v0.13.1
v0.13.0
While this release has no breaking changes itself, the resulting OpenAPI document may be more accurate for your specific application, and hence may be considered as the one containing breaking changes. Due to this, I've decided to mark this release as 0.13.x. It means that you'll need to explicitly update the version in composer.json if you rely on ^0.12.0 or earlier versions.
Full type inference
Starting from Laravel 11.x (and especially from 12.x), Laravel comes with great and accurate PHPDoc annotations. With Scramble supporting these types, you'll enjoy focusing more on the app codebase rather than writing type annotations.
use App\Models\Appointment;
Route::get('/appointments', function (Request $request) {
$items = Appointment::query()
->where('status', $request->string('status'))
->get();
return $items;
});In this case, Scramble can infer the type of $items: it is a collection of appointments, specifically: Illuminate\Database\Eloquent\Collection<int, App\Models\Appointment>!
This gives nice documentation just by analyzing the source, without any additional annotations.
Closure-based routes support
Previously, Scramble only supported controller-based routes. Now, the routes defined using closures also get their share of love and are documented automatically.
Closure-based routes support all the attributes (for manual parameters, headers, responses, etc.) that are supported by controller-based methods.
What's Changed
- Add closure routes support by @romalytvynenko in #971
- Infer null coalescing operator by @jrdnrc in #980
- Added analysis of types coming from PHPDoc annotations in vendor by @romalytvynenko in #988
- Support more integer types by @Neol3108 in #996
- Add
Request@usermethod support for better post-installation experience by @romalytvynenko in #1001
New Contributors
Full Changelog: v0.12.36...v0.13.0
v0.12.36
What's Changed
- Added config for flattening query object parameters
- Replace api path only if it appears at the beginning
- Improve
date_formatrule documentation - Added enum names extension property support
- Add support for wildcard array keys in validation rules
Full Changelog: v0.12.35...v0.12.36
v0.12.35
What's Changed
- Remove
MissingValuein combination with Carbon/ CarbonImmutable when transforming by @chrisvanlier2005 in #960 - Add
paginationInformationresource's method support by @romalytvynenko in #962 - Add support for transforming @var list by @chrisvanlier2005 in #961
- Pin
@stoplight/elementsto 8.4.2 to avoid tags duplication by @romalytvynenko in #964 - Add
unsetsupport and provide$paginatedtype topaginationInformationby @romalytvynenko in #968
Full Changelog: v0.12.34...v0.12.35
v0.12.34
What's Changed
- Patch for Stoplight Elements UI dark mode 🫠 by @romalytvynenko in #953
Full Changelog: v0.12.33...v0.12.34
v0.12.33
What's Changed
- Added
Rule::whensupport by @romalytvynenko in #951
Full Changelog: v0.12.32...v0.12.33
v0.12.32
What's Changed
- Add support
operationIdsupport viaEndpointattribute by @jrdnrc in #941 - Fix
throwstatements showing as unknown "string" type in match expressions by @finalgamer in #944 - Improve type template inference by @romalytvynenko in #948
- Fix
Rule::requiredIftreated asrequiredby @apasquini95 in #939
New Contributors
- @jrdnrc made their first contribution in #941
- @finalgamer made their first contribution in #944
- @apasquini95 made their first contribution in #939
Full Changelog: v0.12.31...v0.12.32
v0.12.31
What's Changed
- Improve API resources and resource collections inference and documentation by @romalytvynenko in #937
- Add ability to configure inference (internal) by @romalytvynenko in #940
Full Changelog: v0.12.30...v0.12.31
v0.12.30
What's Changed
- Add support for transforming inferred paginator types by @romalytvynenko in #931
- Add support for transforming response type with headers to schema and improve collection responses type to schema transformation by @romalytvynenko in #932
- Add support for
systemcolor theme by @macbookandrew in #923
New Contributors
- @macbookandrew made their first contribution in #923
Full Changelog: v0.12.29...v0.12.30