This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
-
-
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.
Signed-off-by: Lloric Mayuga Garcia <[email protected]>
- Loading branch information
Showing
98 changed files
with
579 additions
and
286 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Auth; | ||
|
||
use App\Repositories\Auth\User\UserRepository; | ||
|
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* Created by PhpStorm. | ||
* User: Lloric Mayuga Garcia <[email protected]> | ||
|
@@ -14,7 +16,6 @@ | |
|
||
class GenerateDocumentationCommand extends Command | ||
{ | ||
|
||
protected const APIDOCS_FILENAME = 'apidoc.json'; | ||
|
||
protected array $docInputs = [ | ||
|
@@ -28,14 +29,14 @@ class GenerateDocumentationCommand extends Command | |
* | ||
* @var string | ||
*/ | ||
protected $signature = "apidocs {--vrbs : Verbose of apidoc}"; | ||
protected $signature = 'apidocs {--vrbs : Verbose of apidoc}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = "Generate API Blueprint Documentation."; | ||
protected $description = 'Generate API Blueprint Documentation.'; | ||
|
||
public function __construct() | ||
{ | ||
|
@@ -49,16 +50,13 @@ public function __construct() | |
]; | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
*/ | ||
/** Execute the console command. */ | ||
public function handle() | ||
{ | ||
$this->info('Generating API Blueprint Documentation ...'); | ||
|
||
$path = $this->config['output'].$this->config['url'].'/generated-markdown'; | ||
if (!file_exists($path)) { | ||
if ( ! file_exists($path)) { | ||
app('files')->makeDirectory($path, $mode = 0777, true, true); | ||
} | ||
|
||
|
@@ -80,7 +78,7 @@ private function generateHeader($path, $fileName) | |
$replacer('{{api.domain.dev}}', config('app.url')); | ||
$replacer( | ||
'{{accept-header}}', | ||
"application/json" | ||
'application/json' | ||
); | ||
$replacer('{{rate-limit-expires}}', config('setting.api.throttle.expires')); | ||
$replacer('{{rate-limit-attempts}}', config('setting.api.throttle.limit')); | ||
|
@@ -139,7 +137,7 @@ private function generateAPIDocsTask() | |
// execute the command | ||
$process->run(); | ||
|
||
if (!$process->isSuccessful()) { | ||
if ( ! $process->isSuccessful()) { | ||
throw new ProcessFailedException($process); | ||
} | ||
// $this->info('Result: ' . $process->getOutput()); | ||
|
@@ -150,4 +148,4 @@ private function getJsonConfigurationPath() | |
$template = str_replace(base_path(), '', $this->config['documentFilePath']); | ||
return substr($template, 1, strlen($template) - 1).'config/'; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
|
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Transformers\BaseTransformer; | ||
|
@@ -8,24 +10,23 @@ | |
|
||
class Controller extends BaseController | ||
{ | ||
|
||
/** | ||
* @OA\Info( | ||
* title=SWAGGER_LUME_TITLE, | ||
* description="RESTful API template made from lumen", | ||
* version="1.0", | ||
* @OA\Contact( | ||
* email="[email protected]", | ||
* name="Lloric Mayuga Garcia" | ||
* ), | ||
* @OA\License( | ||
* name="MIT", | ||
* url="https://opensource.org/licenses/MIT" | ||
* ) | ||
* title=SWAGGER_LUME_TITLE, | ||
* description="RESTful API template made from lumen", | ||
* version="1.0", | ||
* @OA\Contact( | ||
* email="[email protected]", | ||
* name="Lloric Mayuga Garcia" | ||
* ), | ||
* @OA\License( | ||
* name="MIT", | ||
* url="https://opensource.org/licenses/MIT" | ||
* ) | ||
* ) | ||
* @OA\Server( | ||
* url=SWAGGER_LUME_CONST_HOST, | ||
* description="API Server" | ||
* url=SWAGGER_LUME_CONST_HOST, | ||
* description="API Server" | ||
* ) | ||
* @OA\Post( | ||
* path="/oauth/token", | ||
|
@@ -56,16 +57,16 @@ class Controller extends BaseController | |
* type="string" | ||
* ), | ||
* example={ | ||
* "grant_type": "password", | ||
* "client_id": "2", | ||
* "client_secret": "BZnwQmjc0LEi40jVKoW2ICX2LC1K4mG0NKfWBl8Z", | ||
* "username": "[email protected]", | ||
* "password": "secret" | ||
* } | ||
* "grant_type" : "password", | ||
* "client_id" : "2", | ||
* "client_secret" : "BZnwQmjc0LEi40jVKoW2ICX2LC1K4mG0NKfWBl8Z", | ||
* "username" : "[email protected]", | ||
* "password" : "secret" | ||
* } | ||
* ) | ||
* ) | ||
* ), | ||
* @OA\Response( | ||
* @OA\Response( | ||
* response="200", | ||
* description="ok", | ||
* content={ | ||
|
@@ -94,10 +95,10 @@ class Controller extends BaseController | |
* description="Token type" | ||
* ), | ||
* example={ | ||
* "token_type": "bearer", | ||
* "expires_in": 3600, | ||
* "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJ...", | ||
* "refresh_token": "def50200b10ed22a1dab8bb0d18..." | ||
* "token_type" : "bearer", | ||
* "expires_in" : 3600, | ||
* "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJ...", | ||
* "refresh_token" : "def50200b10ed22a1dab8bb0d18..." | ||
* } | ||
* ) | ||
* ) | ||
|
@@ -123,16 +124,15 @@ class Controller extends BaseController | |
* ) | ||
* | ||
* @OA\Schema( | ||
* schema="Error", | ||
* required={"message"}, | ||
* @OA\Property( | ||
* property="message", | ||
* type="string" | ||
* ) | ||
* ), | ||
* schema="Error", | ||
* required={"message"}, | ||
* @OA\Property( | ||
* property="message", | ||
* type="string" | ||
* ) | ||
* ), | ||
*/ | ||
|
||
|
||
/** | ||
* @param $data | ||
* @param \App\Transformers\BaseTransformer $transformer | ||
|
Oops, something went wrong.