This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuthController extends Controller | |
{ | |
/** | |
* User Login | |
* | |
* @OA\Post( | |
* path="api/auth/login", | |
* tags={"Auth"}, | |
* @OA\RequestBody(ref="#/components/requestBodies/LoginRequest"), | |
* @OA\Response( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ... | |
* | |
* @OA\Response( | |
* response="UnauthorizedError", | |
* description="Unauthorized", | |
* @OA\JsonContent( | |
* ref="#/components/schemas/Error", | |
* example={"code": "unauthenticated", "message": "User hasn't signed in."} | |
* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ... | |
* | |
* @OA\Schema( | |
* schema="Error", | |
* @OA\Property(property="code", type="string", description="Error code", example="common.not-found"), | |
* @OA\Property(property="message", type="string", description="Error message", example="Resource not found."), | |
* ) | |
* @OA\Schema( | |
* schema="Success", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @OA\Parameter( | |
* parameter="AddressId", | |
* description="Address ID", | |
* in="path", | |
* name="id", | |
* @OA\Schema(type="integer"), | |
* required=true, | |
* example=1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddressController extends Controller | |
{ | |
/** | |
* Index | |
* | |
* @OA\Get( | |
* path="/api/address", | |
* tags={"Address"}, | |
* security={{ "token": {} }}, | |
* @OA\Response(response=401, ref="#/components/responses/UnauthorizedError"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
// ... | |
'securityDefinitions' => [ | |
'securitySchemes' => [ | |
'token' => [ | |
'type' => 'http', | |
'description' => 'Bearer token for user', | |
'scheme' => 'bearer', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @OA\Schema( | |
* schema="Address", | |
* @OA\Property(property="id", type="integer", description="Address ID", example=1), | |
* @OA\Property(property="type", type="string", enum={"home", "work", "other"}, description="Type", example="home"), | |
* @OA\Property(property="title", type="string", minLength=2, description="Title", example="Ev adresim"), | |
* @OA\Property(property="address", type="string", minLength=10, description="Address", example="Bahçeşehir 2. Kısım 12. Caddesi no: 12I İstanbul Başakşehir"), | |
* @OA\Property(property="address_recipe", type="string", minLength=2, description="Address recipe", example="erdal bakkal karşısı"), | |
* @OA\Property(property="lat_long", type="string", description="Coordinates, Format: LAT, LONG", example="41.08442, 28.67263"), | |
* @OA\Property(property="city", type="string", description="City", example="İstanbul"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @OA\RequestBody( | |
* request="LoginRequest", | |
* required=true, | |
* @OA\JsonContent( | |
* required={"email", "password"}, | |
* @OA\Property(property="email", type="string", description="E-mail address", example="john.doe@example.com"), | |
* @OA\Property(property="password", type="string", description="Password", example="123456"), | |
* ) | |
* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @OA\Info( | |
* title="Laravel OpenAPI Example", | |
* version="1.0" | |
* ) | |
* | |
*/ | |
class Controller extends BaseController | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub Dashboard Auto Expander | |
// @description This userscript clicks all 'expand' buttons on the dashboard | |
// @version 1.0 | |
// @author Eren Hatırnaz | |
// @homepageURL https://gist.github.com/erenhatirnaz/754a561cca7b4310b86269af5c812afa | |
// @grant none | |
// @match https://github.com/ | |
// ==/UserScript== |
NewerOlder