diff --git a/CHANGELOG.md b/CHANGELOG.md index f92e2769..3a784da4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Removed +# 4.1.0 (15 October 2022) +### Added +- Set bearer token properly in Postman Collection ([#529](https://github.com/knuckleswtf/scribe/pull/529/)) +- Customizable "Last updated at" label ([44996fe](https://github.com/knuckleswtf/scribe/commit/529/44996fe6f09b42648da19df97dd444d1aac8b003)) +- Turn subgroups into folders in Postman collection ([3152793](https://github.com/knuckleswtf/scribe/commit/529/3152793064afdf26a5de2c310bac73acc6581c48)) + # 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. diff --git a/src/Scribe.php b/src/Scribe.php index 786b2c6f..4f54ff8b 100644 --- a/src/Scribe.php +++ b/src/Scribe.php @@ -8,7 +8,7 @@ class Scribe { - public const VERSION = '4.0.0'; + public const VERSION = '4.1.0'; /** * Specify a callback that will be executed just before a response call is made diff --git a/src/Writing/HtmlWriter.php b/src/Writing/HtmlWriter.php index dc83131b..00151d0c 100644 --- a/src/Writing/HtmlWriter.php +++ b/src/Writing/HtmlWriter.php @@ -2,6 +2,7 @@ namespace Knuckles\Scribe\Writing; +use http\Exception\InvalidArgumentException; use Illuminate\Support\Facades\View; use Illuminate\Support\Str; use Knuckles\Camel\Output\OutputEndpointData; @@ -145,9 +146,10 @@ protected function getLastUpdated() $tokens = [ "date" => fn($format) => date($format), - "git" => fn($option) => match ($option) { + "git" => fn($format) => match ($format) { "short" => trim(shell_exec('git rev-parse --short HEAD')), "long" => trim(shell_exec('git rev-parse HEAD')), + default => throw new InvalidArgumentException("The `git` token only supports formats 'short' and 'long', but you specified $format"), }, ];