All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project aims to adhere to Semantic Versioning.
- Support dependency injection in FormRequests (84078358ce)
- Include
auth.extra_info
in OpenAPI security scheme (#727) - Support dynamic base URL (#723)
- Generate proper sample for array of objects (#720)
- Break in attributes due to enum support (4c49e81e0)
- Support for enums: you can now specify the allowed values of a parameter (#713)
- Exclude Authorization header from generated OpenAPI spec, per spec (#714)
- Improve endpointId generation (#700)
- Improve empty checks in OpenAPI spec generation (#712)
- Don't export auth.use_value to Postman (6a9d51b3a2)
- Make included package attributes extensible (#680)
- Ensure example code supports multipart/form-data without files (#685)
- Fix path traversal on Laravel 10 (#686)
- Properly support floats in docs UI (#693)
- Properly normalise URLs with multi-word Eloquent parameters (#670)
- Also show empty array query parameters in Postman (#691)
- Typehint interface in CustomTranslationsLoader for maximum compatibility (#679)
- Load translations on demand to get around false negative for
runningInConsole()
(963340f2) - Correctly set pagination data on collections in
#[ResponseFromApiResource]
(d53776bee)
- API resources: Infer model name from
@mixin
(f0ed9565) - New translation layer (#673)
- This fixes the problems with the recently introduced localization feature, by switching to a custom translation system. Users should delete the
en.json
file, if they had previously published it. See the docs for details.
- This fixes the problems with the recently introduced localization feature, by switching to a custom translation system. Users should delete the
- Support Laravel 10's optional
rules()
in Form Requests (#664) - Allow
@apiResource
without@apiResourceModel
(#662)
- Fix translations when locale is not EN and no strings are defined (8d2be2c6)
- Internationalization / Localization - You can now translate text in the Scribe-generated docs UI into your language, or just change the warning. To see the available strings to customise, run
php artisan vendor:publish --tag=scribe-translations
. #647
- (In the default theme) Menu items now open when you scroll down. #644
- Upgrader: Ignore
examples.models_source
(#636) - OpenAPI spec: Don't include forbidden headers (fixes #625) (56d589a48)
- Correctly support No-example in inline validators (fixes #637) (5fbe5fcab)
- FormRequest: Don't emit warning message if subfields are present in extra data (fixes #643) (112bba0ec)
- Remove`auth description randomisation (#639)
- Proper support for invokable rules and Laravel 10 validation rules changes (ea3418)
- Experimental: don't URL-encode Postman query parameters (closes #442) (df4d86fa1)
- Replace ":attribute" at the start of validation messages (closes #633) (ea122486d)
- Fix sorting of responses by status code (#623)
- Skip upgrade check if user hasn't published config yet (#628)
- Upgrader: Ignore
examples.models_source
(#631) - More robust replacement of
:attribute
in validation rule descriptions (closes #633) - Remove invalid JS file request (closes #634)
- Support for Laravel enum validation rule in inline validators (#616)
- Support for Laravel enum validation rule (#614)
- Support for Laravel Actions package (#606)
- Support nested query parameters in example requests - Bash (#603)
- Allow
Endpoint
attribute to be used at the class level (#602) - Support nested query parameters in example requests (#603)
- Pass
$default
parameter to URL normalizer callback (8fe91d86) - OpenAPI spec: set
properties
of objects nested in arrays (#600)
- Set HTTP method correctly for FormRequests (fixes #532, #585). (e8098714)
- Generate properties for nested objects in OpenAPI spec (#587)
default
theme: Show nested fields short names in UI, since we now indent. (dbe8492a)
- Don't error when nesting params for response fields (closes #578) (42df1b15)
- Support nested
MorphToMany
with pivot values (#575)
- Remove array setter when default param type to object (closes #573) (f0a3205)
- Use correct URL in response calls (ebadfcdc)
scribe:config:diff
command for easier debugging
- Don't escape slashes in response content (fdb8f4e5)
- Fix default theme CSS (#571)
- Fix content overflow (closes #567) (1fad3eb0)
- Styling improvements for the default theme; also show example with parameter description. (e9bd84fb)
- Description generation: pluralize/singularize values from Laravel's validator. (0b9473b5)
- Don't include status code in description (closes #561) (8a90c2d1)
- Remove mistaken example check (Fix #557) (ad4f808)
- Smarter example generation; Scribe now uses the parameter name as an added hint. (46e3bbc)
- Fixes and improvements for the
default
theme
- New theme (beta)! Try it out by setting
theme
in your config toelements
. (#559)
- Support #[ResponseField] on API resources (66492aa)
- Fix display of headings when append file has a H1 (4924499)
- Allow users customize endpoint URL normalization (fe70df9e)
- Set operationId on endpoints in OpenAPI spec (69aeec6)
- Set bearer token properly in Postman Collection (#529)
- Customizable "Last updated at" label (44996fe)
- Turn subgroups into folders in Postman collection (3152793)
- [Breaking Change] Sorting groups or endpoints via editing/renaming the Camel files is no longer supported. Use the
groups.order
config item instead.
- Support for specifying groups and endpoints order in config file (29ddcfc)
- Support for specifying example model sources (39ff208)
- Support for subgroups (7cf07738,2ebf40b). Some details in the Blade files were also adjusted for this.
- Nested response fields are now collapsed (00b09bb). Some details in the Blade files were also adjusted for this.
add_routes
now uses inline routes (no moreScribe\Controller
class)- Changed signature of Strategy ($routeRules is now optional,and there's now an instance var $endpointData, although it's not set by default)
- Parameter data from successive stages is now merged
- Support overriding docs for inherited methods (9735fdf)
- Multi-docs: Use correct routes in Laravel view (a41e717)
- Fix regression in parsing API resource tags that have a status code when generating response fields (#516)
- Don't crash if instantiation of method argument fails (#515)
- Support
"No-example"
asexample
value inbodyParameters()
and friends (#511)
- Support
@responseField
on Eloquent API resources (#505)
- Use correct folders when generating in multi-docs (ac47c67)
- URL parameter inference bugfixes and refactor (#497)
- Infer URL parameter name correctly when an interface is used for binding (#494)
- Don't send empty query parameter field if it's optional (#493)
- Infer URL parameter name correctly when
getRouteKeyName()
is set (#492)
- Include description in Postman collection for formdata body parameters (10faa500)
- Support for attributes in
@apiResource
(8b8bc6b0)
- Improved code blocks hiding (#486)
- Postman collection: replace multipart PUT/PATCH requests with POST &
_method
(#480)
- Fix logo image partially covered by sidebar (#481)
- Support for more inline validator forms (
$request->validate(...)
without assignment, and$this->validate($request, ...)
) (29940c2e)
- Fix incorrect public_path check on Lumen (64ad2f6e)
- Make output path for
laravel
type configurable (48b2b90)
- Add
--no-upgrade-check
CLI option (6950f4b)
- [Internal] Fix Faker deprecations (8093961)
- Add
assets_directory
config option forlaravel
type (#462)
- Update
GroupedEndpoint
classes to be easier to extend (#456)
- Support validation rules
accepted
andaccepted_if
(#438)
- fix(model factory chain): implode relation chains for bigger relations (#447)
- Don't crash on auto upgrade check fail (c4afdcd59d3fbe300679013877891a45d2e3782e)
Scribe::instantiateFormRequestUsing()
hook to allow customising FormRequest instantiation (3fb9872fa6fb84b0cfc1fdb6900f4d7008b7389c)
- Try loading an example URL parameter from the database (409)
- Load
BelongsTo
relations correctly. (#417) - Load relations correctly on factory-generated models. (#419)
@apiResourceAdditional
tag for setting extra attributes on API Resources (414)
- Print multiple fields in
required_if
(406)
- JS theme error (ce94c03966ebf97a20442b2a92dda3db9c6c52d5)
@apiResourceAdditional
tag for setting extra attributes on API Resources (414)
- Print multiple fields in
required_if
(406)
- JS theme error (ce94c03966ebf97a20442b2a92dda3db9c6c52d5)
- Include protocol in baseUrl for Postman collections (391)
- Fix bug where toggling the menu on mobile would jump to the top of the page (400)
custom
field forParameter
class (2abd751d64a2a38648b41d2b97054a16f156a3e0)
- Try It Out: Use correct input names for lists (375)
- Fixed error when copying custom theme assets files (379)
- Fix sidebar navigation bug (2abd751d64a2a38648b41d2b97054a16f156a3e0)
- Use HTTPS for external assets so they load on file:// URLs (388)
- Custom names for example languages, using the array key (382)
- Custom endpoint metadata attributes (381)
Reverted changes in 3.17.0, which broke the display of headings in the sidebar.
- Refactored sidebar and external JS to improve usability and performance (354)
- Support for nested relations in factories (364)
- Try it Out: show examples for empty array (4351be8567f98f7779422a3a5beaaf5f3ca53e00)
- Route docs properly in Lumen (b859f9ac7d2bac0b43b5358337565889593af6b7)
- Try it Out: entering an auth header value will auto-set it for all endpoints (3f9800924128536a4d8b8ea366be9573da758ad2)
- Example display in input (43f37502a3fdccdcc7799b8160c2d4921f4d75f1)
beforeGroup
andafterGroup
(98d5be7ade2a549e72b343b7f660b412188c30c8)
- Try It Out: Remove
required
input field validation (#3722637092d1c40060169cf22054a0145a0d2cec)
- Remove invalid characters from endpoint ID (#352)
- Add
afterGenerating()
hook (61a4821e103bad2bdd5068890c7ed2c90ba6cdee)
- Prefill examples without breaking BC (4fb2447182998835ba1ddcc10af12dfbe3a49f4b
- Fix for prefilling examples
- Try It Out: Prepopulate fields with examples (#324)
- Infer array type name properly (7457dccf19218a80e43e2fc7d5ec4c2c4b1816e3)
- Introduced
beforeResponseCall()
(25cbdc193f277c70d471a92b5019156c603255b7)
- Parse multiline validation comments properly (e3b7dbefc1cbb25ca773f7c74c84bbe8fe8740e5)
- Respect examples set on parent items for array/objects (closes #328) (12937e1ea148cb5bf162f4c8688f4c2816b679b0)
- Ignore user-specified values in upgrader (fixes #327) (75b592724a8639583b4d660033549c8645a61b2b)
- Shim
newLine()
method on Laravel 6 (fixes #320) (31087fc330ebb305b163d72fc68d0603687df8d2)
- Try It Out: Fixed default CSRF URL for Laravel Sanctum (#319)
- Scribe will now check for new config items automatically on each run (3d451f556da08e9f236ca45e373905e3dd8f76e7)
- Try It Out: Support CSRF tokens for Laravel Sanctum (#317)
- Throw error on missing response file (123e64b8203c55e359c76cd477dacb3e324846c4)
- Try It Out: Only set checked radio buttons in query (#312)
- Try It Out: Format booleans properly in query (#313)
- Support body params in GET requests🤷♀️ (#318)
- Unescape slashes in JSON (#304)
- Change
digits_between
generation to support longer numbers (#299) - OAS: Include group descriptions as tags (84e2c95ce3e086a9cfe41f42ae71852debe91504)
- OAS/Postman: Dont include response status code in description (a81d8785ed3f928f5c6a4dccc7f65968ede4987f)
- Fallback generated validation rules examples to null (204d3dbab8665c9478f2808cf0b2ac2329c608ea)
- Extract Upgrader to separate package (d17cd655b4f02e9701e47a4d328dfebfc1dd4610))
- Better error handling (factories, validation rule parsing) (#287, #288, a768c4733a3d397efdbac83067032a68abd66838, 0c4da381da7505afec6dd8e8ed082dcc4e1b7a3d)
- Allow installation of spatie/dto 3 #285
- Stop Validator::make parsing from crashing unnecessarily #281
- Encode Postman collection items correctly (fixes #278)(87b99bc717f541d6a4d2925fc7bc544958451d12,
- Use correct asset path (fixes #274)(00b77e4b144e13b579e5ad820ab79a1b42eac756,
- Sort group filenames numerically (fixes #273)(c77fed23f04ab1f13bb06bf5b099227ced46dbdc,
- Internal change: refactor RouteDocBlocker (knuckleswtf#272)
- Try It Out: Turn off autocomplete; make sure it works for array body; improve UI spacing (579f672b57ad0417a5563aee1621b84c3b4ff1f2, 2af8d8eacd661e0601b2d6f4dbc1766bf75e702a)
- Get URL parameter name from field bindings (https://github.com/knuckleswtf/scribe/commit/ce6be7ca68ed0e682258eca5bbeb2f7d84774714)
- Internal change: switch to using strategies to get "grouped endpoints" (knuckleswtf#263)
- Only use model key type for URL param type if it's the same as the route key name (knuckleswtf#265)
- Merge user-defined endpoints correctly. (https://github.com/knuckleswtf/scribe/commit/b7f8539b1bd5cd4d97496fa93803a3d7894889f6)
- Set nested file fields properly in Postman. (https://github.com/knuckleswtf/scribe/commit/39d53eac5db30c1d4b6b16cff836c1d3a3898f89)
- Support better examples based on the
where
clause in routes. (https://github.com/knuckleswtf/scribe/commit/cf2b53c16d405e655886b6225e9ebbf29a6621a8)
- Correctly generate params and description for explicit field bindings in routes (https://github.com/knuckleswtf/scribe/commit/b0b89195e6ce0333cf07573462fa9ec083d04f4d)
- Fix content-type header not showing (https://github.com/knuckleswtf/scribe/commit/d5a7b6d8be9f257df3146cd6026729232aa63f1e)
- Try It Out: Spoof HTTP method for PUT/PATCH requests (knuckleswtf#257)
- Try It Out: Add cancellable requests (https://github.com/knuckleswtf/scribe/commit/816e6fbd37ead033ca58bad048f38455622cb0b9)
- Try It Out: Restore sample request/response after cancel (https://github.com/knuckleswtf/scribe/commit/25aaabbea3a4b0482e510932cc095c8ce9495427)
- Try It Out: set FormData content-type properly (knuckleswtf#249)
- Set nested file parameters properly in examples (https://github.com/knuckleswtf/scribe/commit/6354b5592d1e042fe627894156ff17a684fce667)
- Don't depend on unavailable view service provider (knuckleswtf#254)
- Delete older versioned assets (https://github.com/knuckleswtf/scribe/commit/b02af7e21f89406ec33be2e6ca1c206df3733b1b)
- Generate proper OAS types for files and request body arrays (https://github.com/knuckleswtf/scribe/commit/8b51d839d213a1abe110e439281273b33facb344)
- Exclude more specific headers from sample responses (https://github.com/knuckleswtf/scribe/commit/5583b725d714090a198cf906115860626f537c09)
- Support simple key-value for response headers (https://github.com/knuckleswtf/scribe/commit/20afb7e10ca8c5616fd5b9ce1b5333739fdd2348)
- Throw helpful error if factory instantiation errors (https://github.com/knuckleswtf/scribe/commit/5eb0d72f9b2898702c14d28582195722c27f00d0)
- Support nullable and union responseField types (https://github.com/knuckleswtf/scribe/commit/2912ac2344b37e30599aa1004c90e146a6f76aaa)
- Fix OAS generation (https://github.com/knuckleswtf/scribe/commit/a5f51714eafe9b281cc1bbeb1b3186c03f4e3e61)
- Try It Out: Send body params in the right format (knuckleswtf#245)
- Use regular relative paths for assets if not using default static output path (https://github.com/knuckleswtf/scribe/commit/05aaba1877e9ca3dbf7a130dcbd12a2ba9438136)
- Properly cast status codes for API Resource and Transformer responses (knuckleswtf#235)
- Don't crash on unrecognized validation rule formats (https://github.com/knuckleswtf/scribe/commit/c86ea65e903a013f33dc660269d7fff5e2376490)