shalvah 2 years ago
parent
commit
04dfccc5ee

+ 11 - 2
CHANGELOG.md

@@ -12,11 +12,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 
 ### Removed
 
+# 4.2.0 (8 November 2022)
+### Added
+- Allow users customize endpoint URL normalization ([fe70df9e](https://github.com/knuckleswtf/scribe/commit/fe70df9ef07c9f1a21bdc4f06c59435ab24b2141))
+- Set operationId on endpoints in OpenAPI spec ([69aeec6](https://github.com/knuckleswtf/scribe/commit/69aeec6fe37d0946e104d676455aa91f32856599))
+
+### Fixed
+- Fixed bug in extracting URL "thing" ([#548](https://github.com/knuckleswtf/scribe/pull/548/))
+- Fix bug in normalizing URL ([d0e7e3](https://github.com/knuckleswtf/scribe/commit/d0e7e3a4b26031bfa24fc71cf88cacf2da61f921/))
+
 # 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))
+- Customizable "Last updated at" label ([44996fe](https://github.com/knuckleswtf/scribe/commit/44996fe6f09b42648da19df97dd444d1aac8b003))
+- Turn subgroups into folders in Postman collection ([3152793](https://github.com/knuckleswtf/scribe/commit/3152793064afdf26a5de2c310bac73acc6581c48))
 
 # 4.0.0 (10 September 2022)
 ### Removed

+ 1 - 1
src/Scribe.php

@@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request;
 
 class Scribe
 {
-    public const VERSION = '4.1.0';
+    public const VERSION = '4.2.0';
 
     /**
      * Specify a callback that will be executed just before a response call is made

+ 2 - 2
src/Writing/OpenAPISpecWriter.php

@@ -19,7 +19,7 @@ class OpenAPISpecWriter
 {
     use ParamHelpers;
 
-    const VERSION = '3.0.3';
+    const SPEC_VERSION = '3.0.3';
 
     private DocumentationConfig $config;
 
@@ -46,7 +46,7 @@ class OpenAPISpecWriter
     public function generateSpecContent(array $groupedEndpoints): array
     {
         return array_merge([
-            'openapi' => self::VERSION,
+            'openapi' => self::SPEC_VERSION,
             'info' => [
                 'title' => $this->config->get('title') ?: config('app.name', ''),
                 'description' => $this->config->get('description', ''),

+ 2 - 2
src/Writing/PostmanCollectionWriter.php

@@ -15,7 +15,7 @@ class PostmanCollectionWriter
      * Postman collection schema version
      * https://schema.getpostman.com/json/collection/v2.1.0/collection.json
      */
-    const VERSION = '2.1.0';
+    const SPEC_VERSION = '2.1.0';
 
     protected DocumentationConfig $config;
 
@@ -48,7 +48,7 @@ class PostmanCollectionWriter
                 'name' => $this->config->get('title') ?: config('app.name'),
                 '_postman_id' => Uuid::uuid4()->toString(),
                 'description' => $this->config->get('description', ''),
-                'schema' => "https://schema.getpostman.com/json/collection/v" . self::VERSION . "/collection.json",
+                'schema' => "https://schema.getpostman.com/json/collection/v" . self::SPEC_VERSION . "/collection.json",
             ],
             'item' => array_values(array_map(function (array $group) {
                 return [

+ 1 - 1
tests/Unit/OpenAPISpecWriterTest.php

@@ -33,7 +33,7 @@ class OpenAPISpecWriterTest extends TestCase
 
         $results = $this->generate($groups);
 
-        $this->assertEquals(OpenAPISpecWriter::VERSION, $results['openapi']);
+        $this->assertEquals(OpenAPISpecWriter::SPEC_VERSION, $results['openapi']);
         $this->assertEquals($this->config['title'], $results['info']['title']);
         $this->assertEquals($this->config['description'], $results['info']['description']);
         $this->assertNotEmpty($results['info']['version']);