Skip to content

Releases: dedoc/scramble

v0.13.2

30 Oct 14:17

Choose a tag to compare

What's Changed

  • Added support of variables used in validation rules by @chaikivskyi in #1005
  • Fixed isInstanceOf could've returned null for template type.
  • Fixed infinite recursion for cases when @mixin of the class alias is used on the same class 😵‍💫

New Contributors

Full Changelog: v0.13.1...v0.13.2

v0.13.1

26 Oct 12:11
1cf25c2

Choose a tag to compare

What's Changed

Full Changelog: v0.13.0...v0.13.1

v0.13.0

24 Oct 07:32

Choose a tag to compare

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

New Contributors

Full Changelog: v0.12.36...v0.13.0

v0.12.36

20 Oct 08:07

Choose a tag to compare

What's Changed

  • Added config for flattening query object parameters
  • Replace api path only if it appears at the beginning
  • Improve date_format rule 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

24 Sep 07:32

Choose a tag to compare

What's Changed

Full Changelog: v0.12.34...v0.12.35

v0.12.34

09 Sep 14:37
fdedbaa

Choose a tag to compare

What's Changed

Full Changelog: v0.12.33...v0.12.34

v0.12.33

09 Sep 10:03
4331215

Choose a tag to compare

What's Changed

Full Changelog: v0.12.32...v0.12.33

v0.12.32

08 Sep 10:28

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.12.31...v0.12.32

v0.12.31

24 Aug 11:38
ff8fd42

Choose a tag to compare

What's Changed

Full Changelog: v0.12.30...v0.12.31

v0.12.30

14 Aug 13:21
2138ec1

Choose a tag to compare

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 system color theme by @macbookandrew in #923

New Contributors

Full Changelog: v0.12.29...v0.12.30