-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
143 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
return [ | ||
'apps' => [ | ||
'api' => [ | ||
'title' => 'Apps API Documentation', | ||
], | ||
|
||
'routes' => [ | ||
/* | ||
* Route for accessing api documentation interface | ||
*/ | ||
'api' => 'api/apps/documentation', | ||
'docs' => storage_path('api-docs/apps'), | ||
'oauth2_callback' => 'api/apps/oauth2-callback', | ||
], | ||
'paths' => [ | ||
/* | ||
* Edit to include full URL in ui for assets | ||
*/ | ||
'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true), | ||
|
||
/* | ||
* File name of the generated json documentation file | ||
*/ | ||
'docs_json' => 'api-apps-docs.json', | ||
|
||
/* | ||
* File name of the generated YAML documentation file | ||
*/ | ||
'docs_yaml' => 'api-apps-docs.yaml', | ||
|
||
/* | ||
* Set this to `json` or `yaml` to determine which documentation file to use in UI | ||
*/ | ||
'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'), | ||
|
||
/* | ||
* Absolute paths to directory containing the swagger annotations are stored. | ||
*/ | ||
'annotations' => [ | ||
base_path('vendor/nexa-merchant/apps/src/Docs/V1/Apps'), | ||
//base_path('vendor/nexa-merchant/Upselling/src/Docs/V1/Upselling'), | ||
|
||
], | ||
|
||
], | ||
] | ||
]; |
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,59 @@ | ||
<?php | ||
|
||
namespace NexaMerchant\Apps\Http\Controllers\Api\V1\Apps\Controllers; | ||
|
||
class AppsController extends Controller | ||
{ | ||
/** | ||
* @OA\Post( | ||
* path="/api/v1/apps/publish", | ||
* summary="Publish an app", | ||
* description="Upload a zip file and publish the app", | ||
* operationId="publishApp", | ||
* tags={"Apps"}, | ||
* @OA\RequestBody( | ||
* required=true, | ||
* @OA\MediaType( | ||
* mediaType="multipart/form-data", | ||
* @OA\Schema( | ||
* @OA\Property( | ||
* property="file", | ||
* type="string", | ||
* format="binary", | ||
* description="Zip file to upload" | ||
* ), | ||
* @OA\Property( | ||
* property="name", | ||
* type="string", | ||
* description="Name of the app" | ||
* ), | ||
* @OA\Property( | ||
* property="version", | ||
* type="string", | ||
* description="Version of the app" | ||
* ), | ||
* @OA\Property( | ||
* property="token", | ||
* type="string", | ||
* description="Authentication token" | ||
* ), | ||
* required={"file", "name", "version", "token"} | ||
* ) | ||
* ) | ||
* ), | ||
* @OA\Response( | ||
* response=200, | ||
* description="App published successfully", | ||
* @OA\JsonContent( | ||
* @OA\Property(property="success", type="boolean"), | ||
* @OA\Property(property="message", type="string") | ||
* ) | ||
* ), | ||
* @OA\Response( | ||
* response=400, | ||
* description="Bad request" | ||
* ) | ||
* ) | ||
*/ | ||
public function public(){} | ||
} |
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,28 @@ | ||
<?php | ||
namespace NexaMerchant\Apps\Docs\Controllers\Api\V1\Apps\Controllers; | ||
|
||
/** | ||
* @OA\Info( | ||
* version="1.0.4", | ||
* title="NexaMerchant Admin Rest API Documentation", | ||
* description="NexaMerchant Admin Rest API Documentation", | ||
* | ||
* @OA\Contact( | ||
* email="nice.lizhi@gmail.com" | ||
* ) | ||
* ) | ||
* | ||
* @OA\Server( | ||
* url=APP_URL, | ||
* description="NexaMerchant Admin End Rest API" | ||
* ) | ||
* | ||
* @OA\Tag( | ||
* name="APPS", | ||
* description="APPS Endpoints of Admin User" | ||
* ) | ||
*/ | ||
|
||
class Controller | ||
{ | ||
} |
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