чванец с laravel паспортом не работает - PullRequest
2 голосов
/ 12 февраля 2020

Я хочу подключить чванство с laravel паспортом. Мой файл конфигурации swagger

'passport' => [ // Unique name of security
            'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
            'description' => 'Laravel passport oauth2 security.',
            'in' => 'header',
            'scheme' => 'https',
            'flows' => [
                "password" => [
                    "authorizationUrl" => config('app.url') . '/oauth/authorize',
                    "tokenUrl" => config('app.url') . '/oauth/token',
                    "refreshUrl" => config('app.url') . '/token/refresh',
                    "scopes" => []
                ],
            ],
        ],

В laravel контроллере, где я использую аннотации

/**
     * @OA\Post(
     *     path="/beauty/list-customer-service-bookings",
     *     tags={"beauty_customer_bookings"},
     *     summary="List Customer Bookings.",
     *     operationId="Beauty_Customer_Bookings",
     *     security={{"passport": {}}},
     * @OA\SecurityScheme(
     *    securityScheme="https",
     *    type="oauth2",
     *    in="header",
     *    name="api_key"
     * ),
     *
     *     @OA\Parameter(
     *         name="customer_id",
     *         in="query",
     *         description="customer id",
     *         required=true,
     *         @OA\Schema(
     *             type="integer",
     *             default="482"
     *         )
     *     ),
     *     @OA\Response(
     *         response=422,
     *         description="validation errors."
     *     ),
     *     @OA\Response(
     *          response="200",
     *          description="Customer Bookings."
     *     ),
     *     @OA\Response(
     *          response="401",
     *          description="auth failed."
     *     ),
     *     @OA\Response(
     *          response="404",
     *          description="Page not found."
     *     ),
     * )
     */

Он не отправляет заголовки, как должно. Я делаю что-то неправильно или чего-то не хватает? Мне нужно решение это но в Laravel с чванством OA 3

...