0
Laravel 5.3プロジェクトでSwaggerを取得するために「〜3.0」をインストールしました。 1つの鉱山で入力したapi_key値と比較しないでください。swagger security Laravel
/**
* @SWG\SecurityScheme(
* securityDefinition="api_key",
* type="apiKey",
* in="header",
* name="api_key"
*)
*/
と私のUserControllerで上:
私は私のsecurity.php上でこれを持って
/**
* @SWG\Post(
* path="/add_user",
* tags={"user"},
* operationId="adduser",
* summary="Add a new user to the store",
* description="",
* produces={"application/xml", "application/json"},
* @SWG\Parameter(
* name="name",
* in="formData",
* type="string",
* description="Name of the user",
* required=true,
* ),
* @SWG\Parameter(
* name="lastname",
* in="formData",
* type="string",
* description="Lastname of the user",
* required=true,
* ),
* @SWG\Parameter(
* name="email",
* in="formData",
* type="string",
* description="Email of the user",
* required=true,
* ),
* @SWG\Parameter(
* name="password",
* in="formData",
* type="string",
* description="password of the user",
* required=true,
* ),
* @SWG\Parameter(
* name="website",
* in="formData",
* type="string",
* description="website of the user",
* required=true,
* ),
* @SWG\Parameter(
* name="platform",
* in="formData",
* type="string",
* description="website of the user",
* required=true,
* ),
* @SWG\Response(
* response=405,
* description="Invalid input",
* ),
* security={
* {
* "api_key": {},
* }
* },
*)
*/
が、私はにAPI_KEY値を追加しない場合でも、私は、新しいユーザーを保存することができます私のURLまたは認証ダイアログ。私は何が欠けていますか?
@KhorneHolyありがとう、私はその部分を逃していた –
こんにちはジェラード、この質問に私をお勧めしますか? https://stackoverflow.com/questions/45839934/laravel-post-delete-put-routes-in-swagger – Arvind