Skip to content

Commit

Permalink
fix(api): remove the type attribute on body POST and switched it in s…
Browse files Browse the repository at this point in the history
…chema (#33)

The object type is related to the body content and not the body itself.
Doing it so will allow people to send request using Swagger UI.
  • Loading branch information
warlof authored Jun 3, 2019
1 parent 9b93eaf commit 885ab4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/Http/Controllers/Api/v2/RoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ public function getDetail($role_id)
* {"ApiKeyAuth": {}}
* },
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"title"},
* type="object",
* @SWG\Property(
* type="string",
* property="title",
Expand Down Expand Up @@ -365,11 +365,12 @@ public function postNew(Request $request)
* in="path"
* ),
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"title"},
* type="object",
* @SWG\Property(
* type="string",
* property="title",
Expand Down Expand Up @@ -430,12 +431,12 @@ public function putRename(RenameRole $request, $role_id)
* {"ApiKeyAuth": {}}
* },
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"role_id", "character_id"},
* type="object",
* @SWG\Property(
* type="integer",
* minimum=1,
Expand Down Expand Up @@ -492,12 +493,12 @@ public function postAddCharacterAffiliation(Request $request)
* {"ApiKeyAuth": {}}
* },
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"role_id", "corporation_id"},
* type="object",
* @SWG\Property(
* type="integer",
* minimum=1,
Expand Down Expand Up @@ -587,11 +588,12 @@ public function deleteRole($role_id)
* {"ApiKeyAuth": {}}
* },
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"group_id", "role_id"},
* type="object",
* @SWG\Property(
* type="integer",
* minimum=1,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Api/v2/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ public function getConfiguredScopes()
* {"ApiKeyAuth": {}}
* },
* @SWG\Parameter(
* type="object",
* name="body",
* in="body",
* required=true,
* @SWG\Schema(
* required={"user_id", "name", "character_owner_hash", "refresh_token", "scopes"},
* type="object",
* @SWG\Property(
* type="integer",
* format="int64",
Expand Down

0 comments on commit 885ab4d

Please sign in to comment.