Skip to content

Commit

Permalink
fix add search api for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Jul 17, 2024
1 parent ad04b34 commit 9729a83
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Commands/GenerateApiDocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GenerateApiDocs extends CommandInterface
{
protected $signature = 'Apis:gendocs';

protected $description = 'Generate l5-swagger docs (Admin & Shop).';
protected $description = 'Generate l5-swagger docs.';

public function getAppVer() {
return config("Apis.ver");
Expand Down
90 changes: 90 additions & 0 deletions src/Docs/V1/Admin/Controllers/Sales/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,96 @@ public function list()
{
}

/**
* @OA\Get(
* path="/api/v1/admin/sales/orders/search",
* operationId="SearchSalesOrders",
* tags={"Orders"},
* summary="Search admin order list",
* description="Returns order list, if you want to retrieve all orders at once pass pagination=0 otherwise ignore this parameter",
* security={ {"sanctum_admin": {} }},
*
* @OA\Parameter(
* name="email",
* description="Order Email",
* required=false,
* in="query",
*
* @OA\Schema(
* type="string"
* )
* ),
*
* @OA\Parameter(
* name="sort",
* description="Sort column",
* example="id",
* required=false,
* in="query",
*
* @OA\Schema(
* type="string"
* )
* ),
*
* @OA\Parameter(
* name="order",
* description="Sort order",
* required=false,
* in="query",
*
* @OA\Schema(
* type="string",
* enum={"desc", "asc"}
* )
* ),
*
* @OA\Parameter(
* name="page",
* description="Page number",
* required=false,
* in="query",
*
* @OA\Schema(
* type="integer"
* )
* ),
*
* @OA\Parameter(
* name="limit",
* description="Limit",
* in="query",
*
* @OA\Schema(
* type="integer"
* )
* ),
*
* @OA\Response(
* response=200,
* description="Successful operation",
*
* @OA\JsonContent(
*
* @OA\Property(
* property="data",
* type="array",
*
* @OA\Items(ref="#/components/schemas/Order")
* ),
*
* @OA\Property(
* property="meta",
* ref="#/components/schemas/Pagination"
* )
* )
* )
* )
*/
public function search()
{
}

/**
* @OA\Get(
* path="/api/v1/admin/sales/orders/{id}",
Expand Down

0 comments on commit 9729a83

Please sign in to comment.