-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working with API documentaion . Now its moved optional
- Loading branch information
1 parent
d971382
commit 79eb4b1
Showing
22 changed files
with
207 additions
and
189 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,19 @@ | ||
/** | ||
* Delete an existing @@modelName@@ | ||
* | ||
* @Delete("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("id", description="The primary key of @@modelName@@",type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
* "status": 200, | ||
* "message": "@@modelName@@ successfully deleted" | ||
* }), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}), | ||
* @Response(500, body={"message": "Error occurred while deleting @@modelName@@"}) | ||
* }) | ||
*/ | ||
|
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 @@ | ||
/** | ||
* List of @@modelName@@ | ||
* | ||
* @Get("/") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("page", description="The page of results to view.", type="integer", default=1) | ||
* }) | ||
* @Response(200, body={ | ||
"data": {{@@apiResponse@@}} | ||
}) | ||
*/ |
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,17 @@ | ||
/** | ||
* Show details about a @@modelName@@ | ||
* | ||
* @Get("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("id", description="The primary key of @@modelName@@",type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
* "data": {@@apiResponse@@} | ||
* }), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ | ||
|
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,14 @@ | ||
/** | ||
* Create a @@modelName@@ | ||
* | ||
* | ||
* @Post("/store") | ||
* | ||
* @Versions({"v1"}) | ||
* @Transaction({ | ||
* @Request(@@apiRequest@@), | ||
* @Response(200, body=@@apiResponse@@), | ||
* @Response(500, body={"message": "Error occurred while saving @@modelName@@"}) | ||
* }) | ||
*/ | ||
|
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,15 @@ | ||
/** | ||
* Update a existing @@modelName@@ | ||
* | ||
* @Put("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("id", description="The primary key of @@modelName@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Request(@@apiRequest@@), | ||
* @Response(200, body=@@apiResponse@@), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ |
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
19 changes: 19 additions & 0 deletions
19
resources/templates/controller/api/parent/docs/destroy.txt
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,19 @@ | ||
/** | ||
* Delete an existing @@modelName@@ | ||
* | ||
* @Delete("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true), | ||
* @Parameter("id", description="The primary key of @@modelName@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
* "status": 200, | ||
* "message": "@@modelName@@ successfully deleted" | ||
* }), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}), | ||
* @Response(500, body={"message": "Error occurred while deleting @@modelName@@"}) | ||
* }) | ||
*/ |
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,14 @@ | ||
/** | ||
* List of @@modelName@@ | ||
* | ||
* @Get("/") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true), | ||
* @Parameter("page", description="The page of results to view.", type="integer", default=1) | ||
* }) | ||
* @Response(200, body={ | ||
"data": {} | ||
}) | ||
*/ |
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,17 @@ | ||
/** | ||
* Show details about a @@modelName@@ | ||
* | ||
* @Get("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true), | ||
* @Parameter("id", description="The primary key of @@modelName@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
"data": {} | ||
}), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ |
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,16 @@ | ||
/** | ||
* Create a @@modelName@@ | ||
* | ||
* | ||
* @Post("/store") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Request(@@apiRequest@@), | ||
* @Response(200, body=@@apiResponse@@), | ||
* @Response(500, body={"message": "Error occurred while saving @@modelName@@"}) | ||
* }) | ||
*/ |
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,16 @@ | ||
/** | ||
* Update a existing @@modelName@@ | ||
* | ||
* @Put("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true), | ||
* @Parameter("id", description="The primary key of @@modelName@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Request(@@apiRequest@@), | ||
* @Response(200, body=@@apiResponse@@), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ |
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,22 +1,5 @@ | ||
/** | ||
* Show details about a @@modelName@@ | ||
* | ||
* @Get("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("@@parentModelNameParam@@", description="The primary key of @@parentModelNameParam@@", type="integer", required=true), | ||
* @Parameter("id", description="The primary key of @@modelName@@", type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
"data": {} | ||
}), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ | ||
public function show(@@requestClass@@ $request, $@@parentModelNameParam@@, $@@modelNameParam@@) | ||
@@documentation@@ | ||
public function show(@@requestClass@@ $request, $@@parentModelNameParam@@, @@modelName@@ $@@modelNameParam@@) | ||
{ | ||
$@@modelNameParam@@ = @@modelName@@::findOrFail($@@modelNameParam@@); | ||
return $this->response->item($@@modelNameParam@@, new @@transformer@@()); | ||
} |
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,21 +1,5 @@ | ||
/** | ||
* Show details about a @@modelName@@ | ||
* | ||
* @Get("/{id}") | ||
* | ||
* @Versions({"v1"}) | ||
* @Parameters({ | ||
* @Parameter("id", description="The primary key of @@modelName@@",type="integer", required=true) | ||
* }) | ||
* @Transaction({ | ||
* @Response(200, body={ | ||
* "data": {@@apiResponse@@} | ||
* }), | ||
* @Response(404, body={"message": "No query results for model [@@fullmodelName@@]."}) | ||
* }) | ||
*/ | ||
public function show(@@requestClass@@ $request, $@@modelNameParam@@) | ||
@@documentation@@ | ||
public function show(@@requestClass@@ $request, @@modelName@@ $@@modelNameParam@@) | ||
{ | ||
$@@modelNameParam@@ = @@modelName@@::findOrFail($@@modelNameParam@@); | ||
return $this->response->item($@@modelNameParam@@, new @@transformer@@()); | ||
} |
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
Oops, something went wrong.