Procházet zdrojové kódy

Fix title inference

shalvah před 4 roky
rodič
revize
76df3ca41d

+ 1 - 1
src/Writing/OpenAPISpecWriter.php

@@ -45,7 +45,7 @@ class OpenAPISpecWriter
         return array_merge([
             'openapi' => self::VERSION,
             'info' => [
-                'title' => $this->config->get('title') ?: config('app.name', '') . ' API',
+                'title' => $this->config->get('title') ?: config('app.name', ''),
                 'description' => $this->config->get('description', ''),
                 'version' => '1.0.0',
             ],

+ 1 - 1
src/Writing/PostmanCollectionWriter.php

@@ -42,7 +42,7 @@ class PostmanCollectionWriter
                 ],
             ],
             'info' => [
-                'name' => $this->config->get('title') ?: config('app.name') . ' API',
+                '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",

+ 1 - 1
src/Writing/Writer.php

@@ -120,7 +120,7 @@ class Writer
         $settings = [
             'languages' => $this->config->get('example_languages'),
             'logo' => $this->config->get('logo'),
-            'title' => $this->config->get('title', config('app.name', '') . ' API Documentation'),
+            'title' => $this->config->get('title') ?: config('app.name', '') . ' Documentation',
             'auth' => $this->config->get('auth'),
             'interactive' => $this->config->get('interactive', true)
         ];