-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from RonasIT/config-logic-update
Config logic update
- Loading branch information
Showing
11 changed files
with
168 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,10 @@ | |
*/ | ||
'description' => 'auto-doc::swagger-description', | ||
'version' => '0.0.0', | ||
'title' => 'Name of Your Application', | ||
'title' => env('APP_NAME', 'Name of Your Application'), | ||
'termsOfService' => '', | ||
'contact' => [ | ||
'email' => '[email protected]' | ||
'email' => null | ||
], | ||
'license' => [ | ||
'name' => '', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace RonasIT\Support\AutoDoc\Exceptions; | ||
|
||
use Exception; | ||
|
||
class EmptyContactEmailException extends Exception | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct('Please fill the `contact.email` field in the app-doc.php config file.'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ class TestCase extends BaseTest | |
{ | ||
protected $globalExportMode = false; | ||
|
||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
||
config(['auto-doc.contact.email' => '[email protected]']); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
parent::tearDown(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"title": "Name of Your Application", | ||
"termsOfService": "", | ||
"contact": { | ||
"email": "[email protected]" | ||
"email": null | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/fixtures/SwaggerServiceTest/tmp_data_request_with_empty_data_and_info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"swagger": "2.0", | ||
"host": "localhost", | ||
"basePath": "\/", | ||
"schemes": [], | ||
"paths": [], | ||
"definitions": [] | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/fixtures/SwaggerServiceTest/tmp_data_request_with_empty_data_jwt.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"swagger": "2.0", | ||
"host": "localhost", | ||
"basePath": "\/", | ||
"schemes": [], | ||
"paths": [], | ||
"definitions": [], | ||
"info": { | ||
"description": "This is automatically collected documentation", | ||
"version": "0.0.0", | ||
"title": "Name of Your Application", | ||
"termsOfService": "", | ||
"contact": { | ||
"email": null | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"jwt": { | ||
"type": "apiKey", | ||
"name": "authorization", | ||
"in": "header" | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/fixtures/SwaggerServiceTest/tmp_data_request_with_empty_data_laravel.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"swagger": "2.0", | ||
"host": "localhost", | ||
"basePath": "\/", | ||
"schemes": [], | ||
"paths": [], | ||
"definitions": [], | ||
"info": { | ||
"description": "This is automatically collected documentation", | ||
"version": "0.0.0", | ||
"title": "Name of Your Application", | ||
"termsOfService": "", | ||
"contact": { | ||
"email": null | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"laravel": { | ||
"type": "apiKey", | ||
"name": "Cookie", | ||
"in": "header" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters