Skip to content

Latest commit

 

History

History
718 lines (536 loc) · 36.7 KB

CHANGELOG.md

File metadata and controls

718 lines (536 loc) · 36.7 KB

Changelog

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.

()

Fixed

Modified

Added

Removed

4.35.0 (26 March 2024)

Modified

  • Allow examples to be shown in response fields #825

Fixed

  • Try It Out: send numbers in JSON as float, not strings #830
  • Fix "No such file or directory" error #829
  • Fix translating rules with translation engines that don't return arrays #826

4.34.0 (15 March 2024)

Added

  • Laravel 11 compatibility #812

Modified

  • Instantiate some classes via service container for easier overriding. #822

4.33.0 (29 February 2024)

Fixed

  • List enums for array items in OpenAPI spec #818
  • UI fix for elements theme #815

4.32.0 (20 February 2024)

Support nikic/php-parser v5

4.31.0 (20 February 2024)

Last version with support for nikic/php-parser v4

4.29.0 (29 December 2023)

Added

  • More external UIs: Stoplight Elements #780
  • Support try_it_out and logo config options in rapi-doc external UI #780
  • Allow passing of custom HTML attributes to external UIs #780

Fixed

  • Fix config:diff command for tuple configs

4.28.0 (25 December 2023 🎄)

See the announcement post for more details.

Added

  • Support for external UIs: You can now use an external client-side UI such as Scalar. Details in the config reference.
  • Configurable strategies: You can now configure strategies individually, by using the tuple format. A tuple is an array with two elements; the first is the strategy class, and the second is the settings array. For instance, you can configure response calls to only be used on certain endpoints:
    'responses' => [
        Strategies\Responses\UseResponseAttributes::class,
        [
          Strategies\Responses\ResponseCalls::class,
          ['only' => ['GET *']],
        ]
    ],
  • Disable strategies per endpoint: All strategies (including custom strategies) now support the only and except settings, allowing you to specify the routes you want them to be applied to, or the opposite.
    'bodyParameters' => [
      [
        Strategies\BodyParameters\GetFromInlineValidator::class,
        ['except' => ['POST /special-endpoint']],
      ],
      [
        App\Docs\Strategies\SomeCoolStuff::class,
        ['only' => ['POST /cool-endpoint']],
      ],
    ],
  • Easily override returned values: The new override strategy (also a tuple) is a simple way to say "merge these values into the result of other strategies", without having to write a whole strategy. A common use case is for adding headers:
    'headers' => [
        Strategies\Responses\UseHeaderAttribute::class,
        [
          'override',
          [
            'Content-Type' => 'application/json'],
            'Accept' => 'application/json'],
        ]
    ],
  • Better route matching: Route matching now works with both method and URL. Previously, in you could only specify route name or URL. Now you can also specify "GET /path", "GET path", or "GET pa*".

4.27.0 (21 December 2023)

Modified

  • Allow Symfony v7

4.26.0 (21 November 2023)

Added

  • Support specifying Example: null in annotations (#755
  • Include database-generated values in models created via factoryCreate (#753

Fixed

  • Parsing of nested fields in validation rules (#749)
  • Enum values not displaying in nested objects (#740)
  • Enum values not getting written to HTML (#759)

4.25.0 (30 September 2023)

Added

  • Support wildcards in groups.order (top-level only) (#723)

4.24.0 (16 September 2023)

Added

  • Support dependency injection in FormRequests (84078358ce)
  • Include auth.extra_info in OpenAPI security scheme (#727)
  • Support dynamic base URL (#723)

Fixed

  • Generate proper sample for array of objects (#720)

4.23.1 (25 August 2023)

Fixed

  • Break in attributes due to enum support (4c49e81e0)

4.23.0 (24 August 2023)

Added

  • Support for enums: you can now specify the allowed values of a parameter (#713)

Modified

  • Exclude Authorization header from generated OpenAPI spec, per spec (#714)

Fixed

  • Improve endpointId generation (#700)
  • Improve empty checks in OpenAPI spec generation (#712)
  • Don't export auth.use_value to Postman (6a9d51b3a2)

4.22.0 (1 July 2023)

Added

  • Make included package attributes extensible (#680)

Fixed

  • 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)

4.21.2 (5 June 2023)

Fixed

  • Typehint interface in CustomTranslationsLoader for maximum compatibility (#679)

4.21.1 (3 June 2023)

Fixed

  • Load translations on demand to get around false negative for runningInConsole() (963340f2)
  • Correctly set pagination data on collections in #[ResponseFromApiResource] (d53776bee)

4.21.0 (29 May 2023)

Added

  • 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.

4.20.0 (28 May 2023)

Modified

  • Support Laravel 10's optional rules() in Form Requests (#664)
  • Allow @apiResource without @apiResourceModel (#662)

Fixed

  • Don't autoload in class_exists() check (#659)
  • Don't override description in enum rules (#667)

4.19.1 (5 May 2023)

Fixed

  • Fix translations when locale is not EN and no strings are defined (8d2be2c6)

4.19.0 (22 April 2023)

Added

  • 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

Fixed

  • (In the default theme) Menu items now open when you scroll down. #644

4.18.0 (8 April 2023)

Fixed

  • 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)

Modified

  • Remove`auth description randomisation (#639)

4.17.0 (19 March 2023)

Added

  • Proper support for invokable rules and Laravel 10 validation rules changes (ea3418)

Modified

  • Experimental: don't URL-encode Postman query parameters (closes #442) (df4d86fa1)
  • Replace ":attribute" at the start of validation messages (closes #633) (ea122486d)

4.16.1 (19 March 2023)

Fixed

  • 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)

4.16.0 (16 February 2023)

Added

  • Support for Laravel enum validation rule in inline validators (#616)

4.15.0 (14 February 2023)

Added

  • Support for Laravel enum validation rule (#614)

4.14.0 (07 February 2023)

Added

  • Support for Laravel 10 (#610)
  • Support extracting docs from custom validation rules (#611)

4.13.0 (22 January 2023)

Added

  • Support for Laravel Actions package (#606)
  • Support nested query parameters in example requests - Bash (#603)

4.12.0 (15 January 2023)

Added

  • Allow Endpoint attribute to be used at the class level (#602)
  • Support nested query parameters in example requests (#603)

4.11.0 (8 January 2023)

Added

  • Pass $default parameter to URL normalizer callback (8fe91d86)
  • OpenAPI spec: set properties of objects nested in arrays (#600)

4.10.1 (14 December 2022)

Fixed

  • Set HTTP method correctly for FormRequests (fixes #532, #585). (e8098714)

4.10.0 (14 December 2022)

Added

  • bootstrap hook (#576)
  • Support PHP 8 attributes in FormRequests. (e8098714)

Modified

  • Generate properties for nested objects in OpenAPI spec (#587)

4.9.0 (5 December 2022)

Modified

  • default theme: Show nested fields short names in UI, since we now indent. (dbe8492a)

Fixed

  • Don't error when nesting params for response fields (closes #578) (42df1b15)

4.8.0 (2 December 2022)

Added

  • Support nested MorphToMany with pivot values (#575)

Fixed

  • Remove array setter when default param type to object (closes #573) (f0a3205)

4.7.1 (28 November 2022)

Fixed

  • Use correct URL in response calls (ebadfcdc)

4.7.0 (28 November 2022)

Added

  • scribe:config:diff command for easier debugging

Modified

  • Don't escape slashes in response content (fdb8f4e5)

Fixed

  • Fix default theme CSS (#571)

4.6.1 (25 November 2022)

Fixed

  • Fix content overflow (closes #567) (1fad3eb0)

4.6.0 (18 November 2022)

Modified

  • Styling improvements for the default theme; also show example with parameter description. (e9bd84fb)
  • Description generation: pluralize/singularize values from Laravel's validator. (0b9473b5)

Fixed

  • Don't include status code in description (closes #561) (8a90c2d1)
  • Remove mistaken example check (Fix #557) (ad4f808)

4.5.0 (16 November 2022)

Modified

  • Smarter example generation; Scribe now uses the parameter name as an added hint. (46e3bbc)

4.4.0 (16 November 2022)

  • Fixes and improvements for the default theme

4.3.0 (15 November 2022)

Added

  • New theme (beta)! Try it out by setting theme in your config to elements. (#559)

4.2.2 (10 November 2022)

Fixed

  • Support #[ResponseField] on API resources (66492aa)

4.2.1 (9 November 2022)

Fixed

  • Fix display of headings when append file has a H1 (4924499)

4.2.0 (8 November 2022)

Added

  • Allow users customize endpoint URL normalization (fe70df9e)
  • Set operationId on endpoints in OpenAPI spec (69aeec6)

Fixed

  • Fixed bug in extracting URL "thing" (#548)
  • Fix bug in normalizing URL (d0e7e3)

4.1.0 (15 October 2022)

Added

  • Set bearer token properly in Postman Collection (#529)
  • Customizable "Last updated at" label (44996fe)
  • Turn subgroups into folders in Postman collection (3152793)

4.0.0 (10 September 2022)

Removed

  • [Breaking Change] Sorting groups or endpoints via editing/renaming the Camel files is no longer supported. Use the groups.order config item instead.

Added

  • 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 more Scribe\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)

3.37.2 (8 September 2022)

Fixed

  • Multi-docs: Use correct routes in Laravel view (a41e717)

3.37.1 (5 September 2022)

Fixed

  • 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)

3.37.0 (27 August 2022)

Added

  • Support "No-example" as example value in bodyParameters() and friends (#511)

3.36.0 (12 August 2022)

Added

  • Support @responseField on Eloquent API resources (#505)

3.35.0 (27 July 2022)

Modified

  • Use correct folders when generating in multi-docs (ac47c67)

3.34.0 (16 July 2022)

Modified

  • URL parameter inference bugfixes and refactor (#497)

3.33.2 (9 July 2022)

Fixed

  • Infer URL parameter name correctly when an interface is used for binding (#494)

3.33.1 (8 July 2022)

Fixed

  • Don't send empty query parameter field if it's optional (#493)
  • Infer URL parameter name correctly when getRouteKeyName() is set (#492)

3.33.0 (27 June 2022)

Added

  • Include description in Postman collection for formdata body parameters (10faa500)
  • Support for attributes in @apiResource (8b8bc6b0)

3.32.0 (23 June 2022)

Modified

  • Improved code blocks hiding (#486)

3.31.0 (16 June 2022)

Modified

  • Postman collection: replace multipart PUT/PATCH requests with POST & _method (#480)

Fixed

  • Fix logo image partially covered by sidebar (#481)

3.30.0 (11 June 2022)

Added

  • Support for more inline validator forms ($request->validate(...) without assignment, and $this->validate($request, ...)) (29940c2e)

Fixed

  • Fix incorrect public_path check on Lumen (64ad2f6e)

3.29.1 (22 May 2022)

Fixed

  • Make output path for laravel type configurable (48b2b90)

3.29.0 (22 May 2022)

Added

  • 🎉🎉 Support multiple docs with the --config flag (#472, cc6c95e)

3.28.0 (14 May 2022)

Added

  • Add --no-upgrade-check CLI option (6950f4b)

Modified

  • [Internal] Fix Faker deprecations (8093961)

3.27.0 (30 April 2022)

Modified

  • Add assets_directory config option for laravel type (#462)

3.26.0 (3 April 2022)

Modified

  • Update GroupedEndpoint classes to be easier to extend (#456)

3.25.0 (21 March 2022)

Added

  • Support validation rules accepted and accepted_if (#438)

Fixed

  • fix(model factory chain): implode relation chains for bigger relations (#447)

3.24.1 (7 March 2022)

Fixed

3.24.0 (21 February 2022)

Added

3.23.0 (31 January 2022)

Added

  • Try loading an example URL parameter from the database (409)

Fixed

  • Load BelongsTo relations correctly. (#417)
  • Load relations correctly on factory-generated models. (#419)

3.22.0 (26 January 2022)

Added

  • @apiResourceAdditional tag for setting extra attributes on API Resources (414)

Modified

  • Print multiple fields in required_if (406)

Fixed

3.22.0 (26 January 2022)

Added

  • @apiResourceAdditional tag for setting extra attributes on API Resources (414)

Modified

  • Print multiple fields in required_if (406)

Fixed

3.21.0 (Sunday, 2 January 2022)

Modified

  • Include protocol in baseUrl for Postman collections (391)

Fixed

  • Fix bug where toggling the menu on mobile would jump to the top of the page (400)

3.20.0 (Tuesday, 21 December 2021)

Added

Fixed

3.19.1 (Thursday, 9 December 2021)

Fixed

  • Use HTTPS for external assets so they load on file:// URLs (388)

3.19.0 (Sunday, 28 November 2021)

Added

  • Custom names for example languages, using the array key (382)
  • Custom endpoint metadata attributes (381)

Fixed

  • Corrected paths in afterGenerating hook (385)
  • Fix missing headings in sidebar (376)

3.18.0

Reverted changes in 3.17.0, which broke the display of headings in the sidebar.

3.17.0 (Sunday, 28 November 2021)

Modified

  • Refactored sidebar and external JS to improve usability and performance (354)

3.16.0 (Tuesday, 16 November 2021)

Added

  • Support for nested relations in factories (364)

Fixed

3.15.0 (Monday, 8 November 2021)

Added

3.14.1 (Tuesday, 2 November 2021)

Fixed

3.14.0 (Friday, 29 October 2021)

Added

Modified

Fixed

  • Remove invalid characters from endpoint ID (#352)

3.13.0 (Tuesday, 26 October 2021)

Added

Fixed

3.12.1 (Monday, 25 October 2021)

Fixed

  • Fix for prefilling examples

3.12.0 (Sunday, 24 October 2021)

Added

  • Try It Out: Prepopulate fields with examples (#324)

Fixed

  • Display form-encoded data properly in examples (#331)
  • Cast response status to int (#346)

3.11.1 (Thursday, 23 September 2021)

Modified

3.11.0 (Wednesday, 22 September 2021)

Added

Fixed

3.10.3 (Monday, 20 September 2021)

Fixed

3.10.2 (Friday, 10 September 2021)

Fixed

3.10.1 (Thursday, 9 September 2021)

Fixed

  • Try It Out: Fixed default CSRF URL for Laravel Sanctum (#319)

3.10.0 (Thursday, 9 September 2021)

Added

Modified

Fixed

  • 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)

3.9.1 (Thursday, 26 August 2021)

Modified

  • Unescape slashes in JSON (#304)

3.9.0 (Saturday, 21 August 2021)

Modified

3.8.0 (Wednesday, 28 July 2021)

Modified

Fixed

3.7.0 (Thursday, 22 July 2021)

Added

  • Allow installation of spatie/dto 3 #285

3.6.3 (Tuesday, 20 July 2021)

Fixed

  • Stop Validator::make parsing from crashing unnecessarily #281

3.6.2 (Saturday, 17 July 2021)

Fixed

3.6.1 (Friday, 16 July 2021)

Fixed

3.6.0 (Tuesday, 13 July 2021)

Fixed

3.5.2 (Monday, 12 July 2021)

Modified

3.5.1 (Tuesday, 6 July 2021)

Fixed

3.5.0 (Monday, 5 July 2021)

Modified

3.4.3 (Monday, 5 July 2021)

Modified

  • Internal change: switch to using strategies to get "grouped endpoints" (knuckleswtf#263)

3.4.2 (Monday, 5 July 2021)

Modified

  • Only use model key type for URL param type if it's the same as the route key name (knuckleswtf#265)

Fixed

3.4.1 (Friday, 2 July 2021)

Fixed

3.4.0 (Thursday, 1 July 2021)

Added

Fixed

3.3.2 (Wednesday, 30 June 2021)

Fixed

3.3.1 (Tuesday, 29 June 2021)

Fixed

3.3.0 (Friday, 25 June 2021)

Fixed

Modified

3.2.0 (Thursday, 24 June 2021)

Added

Modified

3.1.0 (Friday, 18 June 2021)

Added

Fixed

3.0.3 (Friday, 18 June 2021)

Fixed

3.0.2 (Friday, 11 June 2021)

Fixed

3.0.1 (Tuesday, 8 June 2021)

Fixed

3.0.0 (Monday, 7 June 2021)

Release announcement