Releases: dedoc/scramble
v0.8.2
What's Changed
- Fixed
Scope@getType
returning unexpectednull
by @romalytvynenko in #167
Full Changelog: v0.8.1...v0.8.2
v0.8.1
What's Changed
- Fixed exception when some of timestamps columns were
null
by @romalytvynenko in #165
Full Changelog: v0.8.0...v0.8.1
v0.8.0
What's Changed
🚨 Breaking changes 🚨
- Minimum PHP version is changed from 7.4 to 8.1. 96.4% of all the installs are coming from 8.1 and upper, so it's time to make this bump.
- Extensions API changes - internal type inference system got a huge rework, so I needed to update the extensions API to reflect that.
Added
- Lazy type inference for more accurate return types analysis by @romalytvynenko in #138
- Added support of UUID model keys by @romalytvynenko in #122
- Added
confirmed
rule support by @romalytvynenko in #124 - Add
operationId
support by @romalytvynenko and @HelgeSverre in #153
Changes
- Manually documented string unions become enum of a string in docs by @romalytvynenko in #137
- Sort operations and schemas alphabetically by @romalytvynenko in #152
Fixes
- Fixed spread operator not being properly analyzed when inferring a type for an array by @romalytvynenko in #123
Full Changelog: v0.7.2...v0.8.0
v0.7.2
What's Changed
- Added Laravel 10 support by @AlexSabur in #109
New Contributors
- @AlexSabur made their first contribution in #109
Full Changelog: v0.7.1...v0.7.2
v0.7.1
What's Changed
- Specify how env auth works by @tontonsb in #101
- Access to docs in
local
env only by default and usingviewApiDocs
gate in other environments by @tontonsb in #102 - Added articles by @timschwartz in #105
- Fixed error when
declare(strict_types=1);
was used by @romalytvynenko in #107
New Contributors
- @tontonsb made their first contribution in #101
- @timschwartz made their first contribution in #105
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's Changed
- Added server variables support, added multiple servers support by @romalytvynenko in #76
- Added an ability to document request body params (in validation rules): allowed overriding resulting type, adding description, and example by @romalytvynenko in #88
- Added abort helpers support (
abort
,abort_if
,abort_unless
) by @romalytvynenko in #94 - Improved support of other
JsonResource
s in the resource class, added support of 3rd argument inwhen
andwhenLoaded
by @romalytvynenko in #87 - Fixed an issue when references couldn't be marked as
null
able by @romalytvynenko in #74 - Fixed fatal error when an array item was manually documented without
@var
by @romalytvynenko in #75 - Fixed exception caused by incorrect class const fetch on variables and other expressions handling by @romalytvynenko in #86
- Improve array validation rule and falsy examples support by @romalytvynenko in #89
- Fixed an access to
exceptions
property on possibly nullable object by @romalytvynenko in #95 - Fix missing
phpDoc
attributes on resolved type attached byPhpDocHandler
when they're attached to pending type by @romalytvynenko in #96 - Fixed an exception when
doctrine/dbal
is not installed by @romalytvynenko in #99
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
- Added support of responsable exceptions as responses (403, 422, 404) by @romalytvynenko in #65
- Added resource collections support by @romalytvynenko in #64
- Added support for
true
andfalse
expressions by @romalytvynenko in #58 - Added literals support to PHPDoc types by @romalytvynenko in #59
- Fixed an error that happened when combining responses with empty body and the same status by @romalytvynenko in #60
- Fixed flawed path param aliasing to the var name by @romalytvynenko in #63
Full Changelog: v0.5.0...v0.6.0
v0.5.0
🫣 Breaking change
Applicable if you've published Scramble's config or relied on the default route resolver behavior (which resolved routes by looking if a route uses api
middleware). In most cases you shouldn't really be affected by the change unless you modified API base URL.
In 0.4.0
I've introduced api_base_url
config that allowed configuring and modifying API base URL. By default it was url('/api')
. Sadly enough, using url
in config file caused php artisan serve
to fail with the following error:
Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illuminate\Http\Request, null given,
called in /***/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line
67
To fix the issue I decided to go away from the idea of using url
helper in config and instead, and introduced api_path
config. So now this part of the config is much simpler and looks like 'api_path' => 'api'
.
Also, the default behavior of the default routes resolver changed as well. Previously it took all the routes that were using api
middleware. From now on, by default all the routes which URL starts with api/
(scramble.api_path
) will be used.
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
- Added models support (both for schema and responses) by @romalytvynenko in #22
- Added manual response type hints support to describe responses in docs by @romalytvynenko in #33
- Added ability to customize API base URL, version, and description by @romalytvynenko in #41
- Added ability to disable security on a route by @romalytvynenko in #43
- Fixed an error happening when
$table
in model's class is not a string (but array) by @romalytvynenko in #42 - Fixed a case when function return type annotation caused a loss of the available details about the actual return type by @romalytvynenko in #39
Full Changelog: v0.3.0...v0.4.0
v0.3.0
What's Changed
- Added Enums support by @romalytvynenko in #21
- Added
uuid
validation rule support by @romalytvynenko in #28 - Added manual
Illuminate
responses constructor support,make
on the resource by @romalytvynenko in #29 - Not using closure based routes for docs when routes are cached by @romalytvynenko in #30
- Improved
whenLoaded
support by @romalytvynenko in #32 - Fix circular references in resources by @romalytvynenko in #32
- Fix Stoplight typo by @peterbrinck in #20
New Contributors
- @peterbrinck made their first contribution in #20
Full Changelog: v0.2.0...v0.3.0