Skip to content

Commit

Permalink
fix: swagger response structure fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitulgolakiya committed Jul 20, 2022
1 parent 90c0186 commit 95be011
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion views/controller/destroy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\Schema(
* @OA\JsonContent(
* type="object",
* @OA\Property(
* property="success",
Expand Down
4 changes: 2 additions & 2 deletions views/controller/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\Schema(
* @OA\JsonContent(
* type="object",
* @OA\Property(
* property="success",
Expand All @@ -16,7 +16,7 @@
* @OA\Property(
* property="data",
* type="array",
* @OA\Items(ref="#/definitions/{{ $config->modelNames->name }}")
* @OA\Items(ref="#/components/schemas/{{ $config->modelNames->name }}")
* ),
* @OA\Property(
* property="message",
Expand Down
4 changes: 2 additions & 2 deletions views/controller/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\Schema(
* @OA\JsonContent(
* type="object",
* @OA\Property(
* property="success",
* type="boolean"
* ),
* @OA\Property(
* property="data",
* ref="#/definitions/{{ $config->modelNames->name }}"
* ref="#/components/schemas/{{ $config->modelNames->name }}"
* ),
* @OA\Property(
* property="message",
Expand Down
17 changes: 3 additions & 14 deletions views/controller/store.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,20 @@
* description="Create {{ $config->modelNames->name }}",
* @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* required={""},
* @OA\Property(
* property="name",
* description="desc",
* type="string"
* )
* )
* )
* @OA\JsonContent(ref="#/components/schemas/{{ $config->modelNames->name }}")
* ),
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\Schema(
* @OA\JsonContent(
* type="object",
* @OA\Property(
* property="success",
* type="boolean"
* ),
* @OA\Property(
* property="data",
* ref="#/definitions/{{ $config->modelNames->name }}"
* ref="#/components/schemas/{{ $config->modelNames->name }}"
* ),
* @OA\Property(
* property="message",
Expand Down
17 changes: 3 additions & 14 deletions views/controller/update.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,20 @@
* ),
* @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* required={""},
* @OA\Property(
* property="name",
* description="desc",
* type="string"
* )
* )
* )
* @OA\JsonContent(ref="#/components/schemas/{{ $config->modelNames->name }}")
* ),
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\Schema(
* @OA\JsonContent(
* type="object",
* @OA\Property(
* property="success",
* type="boolean"
* ),
* @OA\Property(
* property="data",
* ref="#/definitions/{{ $config->modelNames->name }}"
* ref="#/components/schemas/{{ $config->modelNames->name }}"
* ),
* @OA\Property(
* property="message",
Expand Down

0 comments on commit 95be011

Please sign in to comment.