Skip to content

Commit 4641384

Browse files
Merge pull request #9 from InfyOmLabs/next-major
Next major
2 parents 6515ae3 + 95be011 commit 4641384

17 files changed

+129
-123
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Created by .ignore support plugin (hsz.mobi)
2-
.idea
2+
.idea
3+
composer.lock
4+
vendor

composer.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,20 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.5.9"
18+
"php": ">=5.5.9",
19+
"illuminate/support": "^6.0|^7.0|^8.0|^9.0"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"InfyOm\\SwaggerGenerator\\": "src/"
24+
}
25+
},
26+
"extra": {
27+
"laravel": {
28+
"providers": [
29+
"\\InfyOm\\SwaggerGenerator\\SwaggerGeneratorServiceProvider"
30+
]
31+
}
1932
},
2033
"funding": [
2134
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace InfyOm\SwaggerGenerator;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class SwaggerGeneratorServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Bootstrap the application services.
11+
*
12+
* @return void
13+
*/
14+
public function boot()
15+
{
16+
$this->loadViewsFrom(__DIR__.'/../views', 'swagger-generator');
17+
}
18+
19+
/**
20+
* Register the application services.
21+
*
22+
* @return void
23+
*/
24+
public function register()
25+
{
26+
}
27+
}

templates/controller_docs/controller.stub

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/controller_docs/store.stub

Lines changed: 0 additions & 45 deletions
This file was deleted.

templates/model_docs/model.stub

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/model_docs/parameter.stub

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/model_docs/property.stub

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**
2+
* Class {{ $config->modelNames->name }}Controller
3+
*/

templates/controller_docs/destroy.stub renamed to views/controller/destroy.blade.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
/**
2-
* @param int $id
3-
* @return Response
4-
*
52
* @OA\Delete(
6-
* path="/$MODEL_NAME_PLURAL_DASHED$/{id}",
7-
* summary="delete$MODEL_NAME$",
8-
* tags={"$MODEL_NAME$"},
9-
* description="Delete $MODEL_NAME$",
3+
* path="/{{ $config->modelNames->dashedPlural }}/{id}",
4+
* summary="delete{{ $config->modelNames->name }}",
5+
* tags={"{{ $config->modelNames->name }}"},
6+
* description="Delete {{ $config->modelNames->name }}",
107
* @OA\Parameter(
118
* name="id",
12-
* description="id of $MODEL_NAME$",
9+
* description="id of {{ $config->modelNames->name }}",
1310
* @OA\Schema(
1411
* type="integer"
1512
* ),
@@ -19,7 +16,7 @@
1916
* @OA\Response(
2017
* response=200,
2118
* description="successful operation",
22-
* @OA\Schema(
19+
* @OA\JsonContent(
2320
* type="object",
2421
* @OA\Property(
2522
* property="success",

0 commit comments

Comments
 (0)