diff --git a/app/Http/Controllers/SideProjectController.php b/app/Http/Controllers/SideProjectController.php
index 5fe4eef..3b5d84f 100644
--- a/app/Http/Controllers/SideProjectController.php
+++ b/app/Http/Controllers/SideProjectController.php
@@ -8,9 +8,7 @@
use League\Fractal\Manager;
use League\Fractal\Resource\Item;
-/**
- * @group Side Projects
- */
+
class SideProjectController extends Controller
{
public function __construct()
@@ -18,27 +16,11 @@ public function __construct()
$this->middleware('auth')->only('store');
}
- /**
- * View all side projects
- *
- * This endpoint's response was gotten via a "response call"—
- * Scribe called our API in a test environment to get a sample response.
- */
public function index()
{
return SideProject::all();
}
- /**
- * Start a new side project
- *
- * _Even though we both know you'll never finish it._
- *
- * This endpoint's body parameters were automatically generated by Scribe
- * from the controller's code. Check out the source!
- *
- * @authenticated
- */
public function store(Request $request)
{
$validated = $request->validate([
@@ -57,47 +39,23 @@ public function store(Request $request)
return SideProject::create($validated);
}
- /**
- * View a side project
- *
- * This endpoint's response uses a Fractal transformer, so we tell Scribe that using an annotation,
- * and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
- *
- *
- *
- * @transformer App\Http\Transformers\SideProjectTransformer
- * @transformerModel App\Models\SideProject with=owner
- */
- public function show(SideProject $id)
+ public function show(SideProject $sideProject)
{
$fractal = new Manager();
$resource = new Item($sideProject, new SideProjectTransformer());
return $fractal->createData($resource)->toArray();
}
- /**
- * Update a side project
- *
- */
public function update(Request $request, SideProject $sideProject)
{
//
}
- /**
- * Delete a side project
- *
- */
public function destroy(SideProject $sideProject)
{
//
}
- /**
- * Finish a side project
- *
- * Hmmm.🤔
- */
public function finish(SideProject $sideProject)
{
//
diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php
index 5464a03..6710d7a 100644
--- a/app/Http/Controllers/UserController.php
+++ b/app/Http/Controllers/UserController.php
@@ -12,83 +12,35 @@
*/
class UserController extends Controller
{
- /**
- * View all users
- *
- * This endpoint uses a custom Scribe strategy that parses a
- * `@usesPagination` annotation to add some query parameters.
- *
- * The sample response is gotten by Scribe making a test API call (aka "response call").
- *
- * @usesPagination
- */
public function index()
{
return UserResource::collection(User::all());
}
- /**
- * Create a user
- *
- * This endpoint's body parameters are automatically generated from a FormRequest.
- */
public function store(CreateUserRequest $request)
{
/** @var User $user */
$user = User::create($request->validated());
$token = $user->createToken('default');
- return ['user' => $user, 'token' => $token->plainTextToken];
+ return response(['user' => $user, 'token' => $token->plainTextToken], 201);
}
- /**
- * Authenticate
- *
- * Get a new API token.
- *
- *
- *
- * @response {"token": "2|KLDoUXc68Ko0JaFDZoX9qYkUqWglwdGxQsvTGBCg"}
- * @responseField token The new API token. Valid forever.
- */
public function authenticate($id)
{
$token = User::findOrFail($id)->createToken('default');
return ['token' => $token->plainTextToken];
}
- /**
- * Fetch a user
- *
- * This endpoint's response uses an Eloquent API resource, so we tell Scribe that using an annotation,
- * and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
- *
- * @apiResource App\Http\Resources\UserResource
- * @apiResourceModel App\Models\User with=sideProjects
- * @responseFile 404 scenario="User not found" responses/not_found.json {"resource": "user"}
- */
public function show($id)
{
return new UserResource(User::findOrFail($id));
}
- /**
- * Update the specified resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @param int $id
- * @return \Illuminate\Http\Response
- */
public function update(Request $request, $id)
{
//
}
- /**
- * Remove the specified resource from storage.
- *
- * @param int $id
- * @return \Illuminate\Http\Response
- */
public function destroy($id)
{
//
diff --git a/app/Models/SideProject.php b/app/Models/SideProject.php
index 4492ae7..1ae9852 100644
--- a/app/Models/SideProject.php
+++ b/app/Models/SideProject.php
@@ -9,6 +9,13 @@ class SideProject extends Model
{
use HasFactory;
+ protected $fillable = [
+ 'name',
+ 'description',
+ 'due_at',
+ 'user_id',
+ ];
+
public function owner()
{
return $this->belongsTo(User::class, 'user_id');
diff --git a/composer.json b/composer.json
index b4e9613..dc38bd0 100644
--- a/composer.json
+++ b/composer.json
@@ -6,9 +6,11 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
+ "ajcastro/scribe-tdd": "dev-master",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
+ "knuckleswtf/scribe": "dev-master",
"laravel/framework": "^8.40",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
@@ -21,13 +23,16 @@
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
- "phpunit/phpunit": "^9.3.3",
- "knuckleswtf/scribe": "@dev"
+ "phpunit/phpunit": "^9.3.3"
},
"repositories": [
{
"type": "path",
- "url": "../scribe"
+ "url": "../ajcastro/scribe"
+ },
+ {
+ "type": "path",
+ "url": "../ajcastro/scribe-tdd"
}
],
"autoload": {
diff --git a/composer.lock b/composer.lock
index aa316ec..6d0ae71 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,43 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "5771447580ac134ad9b3040e138f22d0",
+ "content-hash": "416c16bfeddf141d2bde9aad903f22cd",
"packages": [
+ {
+ "name": "ajcastro/scribe-tdd",
+ "version": "dev-master",
+ "dist": {
+ "type": "path",
+ "url": "../ajcastro/scribe-tdd",
+ "reference": "c70c451ac265ef6672675d3e7fe6c50be753cd63"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "AjCastro\\ScribeTdd\\ScribeTddServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "AjCastro\\ScribeTdd\\": "src/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "ajcastro",
+ "email": "ajcastro29@gmail.com"
+ }
+ ],
+ "description": "Scribe's test-driven documentation approach.",
+ "transport-options": {
+ "relative": true
+ }
+ },
{
"name": "asm89/stack-cors",
"version": "v2.0.3",
@@ -423,39 +458,30 @@
"time": "2020-12-29T14:50:06+00:00"
},
{
- "name": "fideloper/proxy",
- "version": "4.4.1",
+ "name": "erusev/parsedown",
+ "version": "1.7.4",
"source": {
"type": "git",
- "url": "https://github.com/fideloper/TrustedProxy.git",
- "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0"
+ "url": "https://github.com/erusev/parsedown.git",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0",
- "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
"shasum": ""
},
"require": {
- "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
- "php": ">=5.4.0"
+ "ext-mbstring": "*",
+ "php": ">=5.3.0"
},
"require-dev": {
- "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0",
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^4.8.35"
},
"type": "library",
- "extra": {
- "laravel": {
- "providers": [
- "Fideloper\\Proxy\\TrustedProxyServiceProvider"
- ]
- }
- },
"autoload": {
- "psr-4": {
- "Fideloper\\Proxy\\": "src/"
+ "psr-0": {
+ "Parsedown": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -464,64 +490,49 @@
],
"authors": [
{
- "name": "Chris Fidao",
- "email": "fideloper@gmail.com"
+ "name": "Emanuil Rusev",
+ "email": "hello@erusev.com",
+ "homepage": "http://erusev.com"
}
],
- "description": "Set trusted proxies for Laravel",
+ "description": "Parser for Markdown.",
+ "homepage": "http://parsedown.org",
"keywords": [
- "load balancing",
- "proxy",
- "trusted proxy"
+ "markdown",
+ "parser"
],
"support": {
- "issues": "https://github.com/fideloper/TrustedProxy/issues",
- "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1"
+ "issues": "https://github.com/erusev/parsedown/issues",
+ "source": "https://github.com/erusev/parsedown/tree/1.7.x"
},
- "time": "2020-10-22T13:48:01+00:00"
+ "time": "2019-12-30T22:54:17+00:00"
},
{
- "name": "fruitcake/laravel-cors",
- "version": "v2.0.4",
+ "name": "facade/ignition-contracts",
+ "version": "1.0.2",
"source": {
"type": "git",
- "url": "https://github.com/fruitcake/laravel-cors.git",
- "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a"
+ "url": "https://github.com/facade/ignition-contracts.git",
+ "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/a8ccedc7ca95189ead0e407c43b530dc17791d6a",
- "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a",
+ "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
+ "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
"shasum": ""
},
"require": {
- "asm89/stack-cors": "^2.0.1",
- "illuminate/contracts": "^6|^7|^8|^9",
- "illuminate/support": "^6|^7|^8|^9",
- "php": ">=7.2",
- "symfony/http-foundation": "^4|^5",
- "symfony/http-kernel": "^4.3.4|^5"
+ "php": "^7.3|^8.0"
},
"require-dev": {
- "laravel/framework": "^6|^7|^8",
- "orchestra/testbench-dusk": "^4|^5|^6|^7",
- "phpunit/phpunit": "^6|^7|^8|^9",
- "squizlabs/php_codesniffer": "^3.5"
+ "friendsofphp/php-cs-fixer": "^v2.15.8",
+ "phpunit/phpunit": "^9.3.11",
+ "vimeo/psalm": "^3.17.1"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- },
- "laravel": {
- "providers": [
- "Fruitcake\\Cors\\CorsServiceProvider"
- ]
- }
- },
"autoload": {
"psr-4": {
- "Fruitcake\\Cors\\": "src/"
+ "Facade\\IgnitionContracts\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -530,63 +541,67 @@
],
"authors": [
{
- "name": "Fruitcake",
- "homepage": "https://fruitcake.nl"
- },
- {
- "name": "Barry vd. Heuvel",
- "email": "barryvdh@gmail.com"
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://flareapp.io",
+ "role": "Developer"
}
],
- "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application",
+ "description": "Solution contracts for Ignition",
+ "homepage": "https://github.com/facade/ignition-contracts",
"keywords": [
- "api",
- "cors",
- "crossdomain",
- "laravel"
+ "contracts",
+ "flare",
+ "ignition"
],
"support": {
- "issues": "https://github.com/fruitcake/laravel-cors/issues",
- "source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.4"
+ "issues": "https://github.com/facade/ignition-contracts/issues",
+ "source": "https://github.com/facade/ignition-contracts/tree/1.0.2"
},
- "funding": [
- {
- "url": "https://github.com/barryvdh",
- "type": "github"
- }
- ],
- "time": "2021-04-26T11:24:25+00:00"
+ "time": "2020-10-16T08:27:54+00:00"
},
{
- "name": "graham-campbell/result-type",
- "version": "v1.0.1",
+ "name": "fakerphp/faker",
+ "version": "v1.14.1",
"source": {
"type": "git",
- "url": "https://github.com/GrahamCampbell/Result-Type.git",
- "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb"
+ "url": "https://github.com/FakerPHP/Faker.git",
+ "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb",
- "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb",
+ "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
+ "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
"shasum": ""
},
"require": {
- "php": "^7.0|^8.0",
- "phpoption/phpoption": "^1.7.3"
+ "php": "^7.1 || ^8.0",
+ "psr/container": "^1.0",
+ "symfony/deprecation-contracts": "^2.2"
+ },
+ "conflict": {
+ "fzaninotto/faker": "*"
},
"require-dev": {
- "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0"
+ "bamarni/composer-bin-plugin": "^1.4.1",
+ "ext-intl": "*",
+ "symfony/phpunit-bridge": "^4.4 || ^5.2"
+ },
+ "suggest": {
+ "ext-curl": "Required by Faker\\Provider\\Image to download images.",
+ "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.",
+ "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.",
+ "ext-mbstring": "Required for multibyte Unicode string functionality."
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "v1.15-dev"
}
},
"autoload": {
"psr-4": {
- "GrahamCampbell\\ResultType\\": "src/"
+ "Faker\\": "src/Faker/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -595,84 +610,343 @@
],
"authors": [
{
- "name": "Graham Campbell",
- "email": "graham@alt-three.com"
+ "name": "François Zaninotto"
}
],
- "description": "An Implementation Of The Result Type",
+ "description": "Faker is a PHP library that generates fake data for you.",
"keywords": [
- "Graham Campbell",
- "GrahamCampbell",
- "Result Type",
- "Result-Type",
- "result"
+ "data",
+ "faker",
+ "fixtures"
],
"support": {
- "issues": "https://github.com/GrahamCampbell/Result-Type/issues",
- "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1"
+ "issues": "https://github.com/FakerPHP/Faker/issues",
+ "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1"
},
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type",
- "type": "tidelift"
- }
- ],
- "time": "2020-04-13T13:17:36+00:00"
+ "time": "2021-03-30T06:27:33+00:00"
},
{
- "name": "guzzlehttp/guzzle",
- "version": "7.3.0",
+ "name": "fideloper/proxy",
+ "version": "4.4.1",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/guzzle.git",
- "reference": "7008573787b430c1c1f650e3722d9bba59967628"
+ "url": "https://github.com/fideloper/TrustedProxy.git",
+ "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628",
- "reference": "7008573787b430c1c1f650e3722d9bba59967628",
+ "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0",
+ "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "guzzlehttp/promises": "^1.4",
- "guzzlehttp/psr7": "^1.7 || ^2.0",
- "php": "^7.2.5 || ^8.0",
- "psr/http-client": "^1.0"
- },
- "provide": {
- "psr/http-client-implementation": "1.0"
+ "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0",
+ "php": ">=5.4.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.4.1",
- "ext-curl": "*",
- "php-http/client-integration-tests": "^3.0",
- "phpunit/phpunit": "^8.5.5 || ^9.3.5",
- "psr/log": "^1.1"
- },
- "suggest": {
- "ext-curl": "Required for CURL handler support",
- "ext-intl": "Required for Internationalized Domain Name (IDN) support",
- "psr/log": "Required for using the Log middleware"
+ "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0",
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "7.3-dev"
+ "laravel": {
+ "providers": [
+ "Fideloper\\Proxy\\TrustedProxyServiceProvider"
+ ]
}
},
"autoload": {
"psr-4": {
- "GuzzleHttp\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
+ "Fideloper\\Proxy\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Chris Fidao",
+ "email": "fideloper@gmail.com"
+ }
+ ],
+ "description": "Set trusted proxies for Laravel",
+ "keywords": [
+ "load balancing",
+ "proxy",
+ "trusted proxy"
+ ],
+ "support": {
+ "issues": "https://github.com/fideloper/TrustedProxy/issues",
+ "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1"
+ },
+ "time": "2020-10-22T13:48:01+00:00"
+ },
+ {
+ "name": "filp/whoops",
+ "version": "2.12.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/filp/whoops.git",
+ "reference": "c13c0be93cff50f88bbd70827d993026821914dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd",
+ "reference": "c13c0be93cff50f88bbd70827d993026821914dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9 || ^7.0 || ^8.0",
+ "psr/log": "^1.0.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "^0.9 || ^1.0",
+ "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
+ "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
+ },
+ "suggest": {
+ "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
+ "whoops/soap": "Formats errors as SOAP responses"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Whoops\\": "src/Whoops/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Filipe Dobreira",
+ "homepage": "https://github.com/filp",
+ "role": "Developer"
+ }
+ ],
+ "description": "php error handling for cool kids",
+ "homepage": "https://filp.github.io/whoops/",
+ "keywords": [
+ "error",
+ "exception",
+ "handling",
+ "library",
+ "throwable",
+ "whoops"
+ ],
+ "support": {
+ "issues": "https://github.com/filp/whoops/issues",
+ "source": "https://github.com/filp/whoops/tree/2.12.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/denis-sokolov",
+ "type": "github"
+ }
+ ],
+ "time": "2021-04-25T12:00:00+00:00"
+ },
+ {
+ "name": "fruitcake/laravel-cors",
+ "version": "v2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fruitcake/laravel-cors.git",
+ "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/a8ccedc7ca95189ead0e407c43b530dc17791d6a",
+ "reference": "a8ccedc7ca95189ead0e407c43b530dc17791d6a",
+ "shasum": ""
+ },
+ "require": {
+ "asm89/stack-cors": "^2.0.1",
+ "illuminate/contracts": "^6|^7|^8|^9",
+ "illuminate/support": "^6|^7|^8|^9",
+ "php": ">=7.2",
+ "symfony/http-foundation": "^4|^5",
+ "symfony/http-kernel": "^4.3.4|^5"
+ },
+ "require-dev": {
+ "laravel/framework": "^6|^7|^8",
+ "orchestra/testbench-dusk": "^4|^5|^6|^7",
+ "phpunit/phpunit": "^6|^7|^8|^9",
+ "squizlabs/php_codesniffer": "^3.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Fruitcake\\Cors\\CorsServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Fruitcake\\Cors\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fruitcake",
+ "homepage": "https://fruitcake.nl"
+ },
+ {
+ "name": "Barry vd. Heuvel",
+ "email": "barryvdh@gmail.com"
+ }
+ ],
+ "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application",
+ "keywords": [
+ "api",
+ "cors",
+ "crossdomain",
+ "laravel"
+ ],
+ "support": {
+ "issues": "https://github.com/fruitcake/laravel-cors/issues",
+ "source": "https://github.com/fruitcake/laravel-cors/tree/v2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/barryvdh",
+ "type": "github"
+ }
+ ],
+ "time": "2021-04-26T11:24:25+00:00"
+ },
+ {
+ "name": "graham-campbell/result-type",
+ "version": "v1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/GrahamCampbell/Result-Type.git",
+ "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb",
+ "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0|^8.0",
+ "phpoption/phpoption": "^1.7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GrahamCampbell\\ResultType\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com"
+ }
+ ],
+ "description": "An Implementation Of The Result Type",
+ "keywords": [
+ "Graham Campbell",
+ "GrahamCampbell",
+ "Result Type",
+ "Result-Type",
+ "result"
+ ],
+ "support": {
+ "issues": "https://github.com/GrahamCampbell/Result-Type/issues",
+ "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-04-13T13:17:36+00:00"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "7008573787b430c1c1f650e3722d9bba59967628"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628",
+ "reference": "7008573787b430c1c1f650e3722d9bba59967628",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.4",
+ "guzzlehttp/psr7": "^1.7 || ^2.0",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.4.1",
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+ "psr/log": "^1.1"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
@@ -856,6 +1130,116 @@
},
"time": "2021-04-26T09:17:50+00:00"
},
+ {
+ "name": "knuckleswtf/scribe",
+ "version": "dev-master",
+ "dist": {
+ "type": "path",
+ "url": "../ajcastro/scribe",
+ "reference": "79a12d84650ab267dd42512c8b41c0cd154d36a0"
+ },
+ "require": {
+ "erusev/parsedown": "^1.7",
+ "ext-fileinfo": "*",
+ "ext-json": "*",
+ "ext-pdo": "*",
+ "fakerphp/faker": "^1.9.1",
+ "illuminate/console": "^6.0|^7.0|^8.0",
+ "illuminate/routing": "^6.0|^7.0|^8.0",
+ "illuminate/support": "^6.0|^7.0|^8.0",
+ "league/flysystem": "^1.0",
+ "mpociot/reflection-docblock": "^1.0.1",
+ "nikic/php-parser": "^4.10",
+ "nunomaduro/collision": "^3.0|^4.0|^5.0",
+ "php": ">=7.4",
+ "ramsey/uuid": "^3.8|^4.0",
+ "shalvah/clara": "^3.0.2",
+ "spatie/data-transfer-object": "^2.6",
+ "symfony/var-exporter": "^4.0|^5.0",
+ "symfony/yaml": "^4.0|^5.0"
+ },
+ "replace": {
+ "mpociot/laravel-apidoc-generator": "*"
+ },
+ "require-dev": {
+ "brianium/paratest": "^6.0",
+ "dms/phpunit-arraysubset-asserts": "^0.2.0",
+ "laravel/legacy-factories": "^1.0.4",
+ "laravel/lumen-framework": "^6.0|^7.0|^8.0",
+ "league/fractal": "^0.19.0",
+ "nikic/fast-route": "^1.3",
+ "orchestra/testbench": "^4.0|^5.0|^6.0",
+ "phpstan/phpstan": "^0.12.90",
+ "phpunit/phpunit": "^9.0",
+ "symfony/css-selector": "^5.3",
+ "symfony/dom-crawler": "^5.3"
+ },
+ "suggest": {
+ "league/fractal": "Required for transformers support"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Knuckles\\Scribe\\ScribeServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Knuckles\\Scribe\\": "src/",
+ "Knuckles\\Camel\\": "camel/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Knuckles\\Scribe\\Tests\\": "tests/"
+ }
+ },
+ "scripts": {
+ "lint": [
+ "phpstan analyse -c ./phpstan.neon src camel --memory-limit 1G"
+ ],
+ "test": [
+ "phpunit --no-coverage --stop-on-failure --exclude-group dingo"
+ ],
+ "test-ci": [
+ "phpunit --no-coverage --exclude-group dingo"
+ ],
+ "test-parallel": [
+ "paratest -p16 --stop-on-failure --no-coverage --exclude-group dingo"
+ ],
+ "test-parallel-ci": [
+ "paratest -p16 --no-coverage --exclude-group dingo"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Shalvah",
+ "email": "hello@shalvah.me"
+ }
+ ],
+ "description": "Generate API documentation for humans from your Laravel codebase.✍",
+ "homepage": "http://github.com/knuckleswtf/scribe",
+ "keywords": [
+ "API",
+ "dingo",
+ "documentation",
+ "laravel"
+ ],
+ "funding": [
+ {
+ "type": "patreon",
+ "url": "https://patreon.com/shalvah"
+ }
+ ],
+ "transport-options": {
+ "relative": true
+ }
+ },
{
"name": "laravel/framework",
"version": "v8.43.0",
@@ -1572,6 +1956,59 @@
],
"time": "2020-12-14T13:15:25+00:00"
},
+ {
+ "name": "mpociot/reflection-docblock",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/mpociot/reflection-docblock.git",
+ "reference": "c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/mpociot/reflection-docblock/zipball/c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587",
+ "reference": "c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "dflydev/markdown": "~1.0",
+ "erusev/parsedown": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Mpociot": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "support": {
+ "issues": "https://github.com/mpociot/reflection-docblock/issues",
+ "source": "https://github.com/mpociot/reflection-docblock/tree/master"
+ },
+ "time": "2016-06-20T20:53:12+00:00"
+ },
{
"name": "nesbot/carbon",
"version": "2.48.0",
@@ -1707,19 +2144,107 @@
],
"authors": [
{
- "name": "Nikita Popov"
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
+ },
+ "time": "2021-05-03T19:11:20+00:00"
+ },
+ {
+ "name": "nunomaduro/collision",
+ "version": "v5.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nunomaduro/collision.git",
+ "reference": "41b7e9999133d5082700d31a1d0977161df8322a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nunomaduro/collision/zipball/41b7e9999133d5082700d31a1d0977161df8322a",
+ "reference": "41b7e9999133d5082700d31a1d0977161df8322a",
+ "shasum": ""
+ },
+ "require": {
+ "facade/ignition-contracts": "^1.0",
+ "filp/whoops": "^2.7.2",
+ "php": "^7.3 || ^8.0",
+ "symfony/console": "^5.0"
+ },
+ "require-dev": {
+ "brianium/paratest": "^6.1",
+ "fideloper/proxy": "^4.4.1",
+ "friendsofphp/php-cs-fixer": "^2.17.3",
+ "fruitcake/laravel-cors": "^2.0.3",
+ "laravel/framework": "^9.0",
+ "nunomaduro/larastan": "^0.6.2",
+ "nunomaduro/mock-final-classes": "^1.0",
+ "orchestra/testbench": "^7.0",
+ "phpstan/phpstan": "^0.12.64",
+ "phpunit/phpunit": "^9.5.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "NunoMaduro\\Collision\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nuno Maduro",
+ "email": "enunomaduro@gmail.com"
+ }
+ ],
+ "description": "Cli error handling for console/command-line PHP applications.",
+ "keywords": [
+ "artisan",
+ "cli",
+ "command-line",
+ "console",
+ "error",
+ "handling",
+ "laravel",
+ "laravel-zero",
+ "php",
+ "symfony"
+ ],
+ "support": {
+ "issues": "https://github.com/nunomaduro/collision/issues",
+ "source": "https://github.com/nunomaduro/collision"
+ },
+ "funding": [
+ {
+ "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/nunomaduro",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/nunomaduro",
+ "type": "patreon"
}
],
- "description": "A PHP parser written in PHP",
- "keywords": [
- "parser",
- "php"
- ],
- "support": {
- "issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
- },
- "time": "2021-05-03T19:11:20+00:00"
+ "time": "2021-04-09T13:38:32+00:00"
},
{
"name": "opis/closure",
@@ -2447,6 +2972,53 @@
],
"time": "2020-08-18T17:17:46+00:00"
},
+ {
+ "name": "shalvah/clara",
+ "version": "3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/shalvah/clara.git",
+ "reference": "9b4e5b2681fb79e7214f66106d11917d9c3faa40"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/shalvah/clara/zipball/9b4e5b2681fb79e7214f66106d11917d9c3faa40",
+ "reference": "9b4e5b2681fb79e7214f66106d11917d9c3faa40",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4",
+ "symfony/console": "^4.0|^5.0"
+ },
+ "require-dev": {
+ "eloquent/phony-phpunit": "^7.0",
+ "phpunit/phpunit": "^9.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Shalvah\\Clara\\": "src/"
+ },
+ "files": [
+ "helpers.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "🔊 Simple, pretty, testable console output for CLI apps.",
+ "keywords": [
+ "cli",
+ "log",
+ "logging"
+ ],
+ "support": {
+ "issues": "https://github.com/shalvah/clara/issues",
+ "source": "https://github.com/shalvah/clara/tree/3.0.2"
+ },
+ "time": "2021-07-01T14:39:22+00:00"
+ },
{
"name": "spatie/backtrace",
"version": "1.2.0",
@@ -2509,6 +3081,65 @@
],
"time": "2021-05-19T12:49:10+00:00"
},
+ {
+ "name": "spatie/data-transfer-object",
+ "version": "2.8.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/data-transfer-object.git",
+ "reference": "2625a59566804ec63f01947d85947336237cbda6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/2625a59566804ec63f01947d85947336237cbda6",
+ "reference": "2625a59566804ec63f01947d85947336237cbda6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4|^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
+ },
+ "suggest": {
+ "phpstan/phpstan": "Take advantage of checkUninitializedProperties with \\Spatie\\DataTransferObject\\PHPstan\\PropertiesAreAlwaysInitializedExtension"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\DataTransferObject\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Brent Roose",
+ "email": "brent@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Data transfer objects with batteries included",
+ "homepage": "https://github.com/spatie/data-transfer-object",
+ "keywords": [
+ "data-transfer-object",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/data-transfer-object/issues",
+ "source": "https://github.com/spatie/data-transfer-object/tree/2.8.3"
+ },
+ "funding": [
+ {
+ "url": "https://www.patreon.com/spatie",
+ "type": "patreon"
+ }
+ ],
+ "time": "2021-02-12T08:46:52+00:00"
+ },
{
"name": "spatie/macroable",
"version": "1.0.1",
@@ -4896,7 +5527,159 @@
"Resources/functions/dump.php"
],
"psr-4": {
- "Symfony\\Component\\VarDumper\\": ""
+ "Symfony\\Component\\VarDumper\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides mechanisms for walking through any arbitrary PHP variable",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "debug",
+ "dump"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/var-dumper/tree/v5.2.8"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-05-07T13:42:21+00:00"
+ },
+ {
+ "name": "symfony/var-exporter",
+ "version": "v5.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/var-exporter.git",
+ "reference": "903c2c0babd6267de5bcb2995e8fc1efb5f01f1f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/903c2c0babd6267de5bcb2995e8fc1efb5f01f1f",
+ "reference": "903c2c0babd6267de5bcb2995e8fc1efb5f01f1f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.15"
+ },
+ "require-dev": {
+ "symfony/var-dumper": "^4.4.9|^5.0.9"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\VarExporter\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Allows exporting any serializable PHP data structure to plain PHP code",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "clone",
+ "construct",
+ "export",
+ "hydrate",
+ "instantiate",
+ "serialize"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/var-exporter/tree/v5.3.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-06-27T09:16:08+00:00"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v5.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "485c83a2fb5893e2ff21bf4bfc7fdf48b4967229"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/485c83a2fb5893e2ff21bf4bfc7fdf48b4967229",
+ "reference": "485c83a2fb5893e2ff21bf4bfc7fdf48b4967229",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/console": "<4.4"
+ },
+ "require-dev": {
+ "symfony/console": "^4.4|^5.0"
+ },
+ "suggest": {
+ "symfony/console": "For validating YAML files using the lint command"
+ },
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
@@ -4908,22 +5691,18 @@
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Provides mechanisms for walking through any arbitrary PHP variable",
+ "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
- "keywords": [
- "debug",
- "dump"
- ],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v5.2.8"
+ "source": "https://github.com/symfony/yaml/tree/v5.3.3"
},
"funding": [
{
@@ -4939,7 +5718,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-07T13:42:21+00:00"
+ "time": "2021-06-24T08:13:00+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@@ -5277,56 +6056,6 @@
],
"time": "2020-11-10T18:47:58+00:00"
},
- {
- "name": "erusev/parsedown",
- "version": "1.7.4",
- "source": {
- "type": "git",
- "url": "https://github.com/erusev/parsedown.git",
- "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
- "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
- "shasum": ""
- },
- "require": {
- "ext-mbstring": "*",
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Parsedown": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Emanuil Rusev",
- "email": "hello@erusev.com",
- "homepage": "http://erusev.com"
- }
- ],
- "description": "Parser for Markdown.",
- "homepage": "http://parsedown.org",
- "keywords": [
- "markdown",
- "parser"
- ],
- "support": {
- "issues": "https://github.com/erusev/parsedown/issues",
- "source": "https://github.com/erusev/parsedown/tree/1.7.x"
- },
- "time": "2019-12-30T22:54:17+00:00"
- },
{
"name": "facade/flare-client-php",
"version": "1.8.0",
@@ -5455,208 +6184,19 @@
],
"description": "A beautiful error page for Laravel applications.",
"homepage": "https://github.com/facade/ignition",
- "keywords": [
- "error",
- "flare",
- "laravel",
- "page"
- ],
- "support": {
- "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
- "forum": "https://twitter.com/flareappio",
- "issues": "https://github.com/facade/ignition/issues",
- "source": "https://github.com/facade/ignition"
- },
- "time": "2021-05-05T06:45:12+00:00"
- },
- {
- "name": "facade/ignition-contracts",
- "version": "1.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/facade/ignition-contracts.git",
- "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
- "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
- "shasum": ""
- },
- "require": {
- "php": "^7.3|^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^v2.15.8",
- "phpunit/phpunit": "^9.3.11",
- "vimeo/psalm": "^3.17.1"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Facade\\IgnitionContracts\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Freek Van der Herten",
- "email": "freek@spatie.be",
- "homepage": "https://flareapp.io",
- "role": "Developer"
- }
- ],
- "description": "Solution contracts for Ignition",
- "homepage": "https://github.com/facade/ignition-contracts",
- "keywords": [
- "contracts",
- "flare",
- "ignition"
- ],
- "support": {
- "issues": "https://github.com/facade/ignition-contracts/issues",
- "source": "https://github.com/facade/ignition-contracts/tree/1.0.2"
- },
- "time": "2020-10-16T08:27:54+00:00"
- },
- {
- "name": "fakerphp/faker",
- "version": "v1.14.1",
- "source": {
- "type": "git",
- "url": "https://github.com/FakerPHP/Faker.git",
- "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
- "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0",
- "psr/container": "^1.0",
- "symfony/deprecation-contracts": "^2.2"
- },
- "conflict": {
- "fzaninotto/faker": "*"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.4.1",
- "ext-intl": "*",
- "symfony/phpunit-bridge": "^4.4 || ^5.2"
- },
- "suggest": {
- "ext-curl": "Required by Faker\\Provider\\Image to download images.",
- "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.",
- "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.",
- "ext-mbstring": "Required for multibyte Unicode string functionality."
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "v1.15-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Faker\\": "src/Faker/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "François Zaninotto"
- }
- ],
- "description": "Faker is a PHP library that generates fake data for you.",
- "keywords": [
- "data",
- "faker",
- "fixtures"
- ],
- "support": {
- "issues": "https://github.com/FakerPHP/Faker/issues",
- "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1"
- },
- "time": "2021-03-30T06:27:33+00:00"
- },
- {
- "name": "filp/whoops",
- "version": "2.12.1",
- "source": {
- "type": "git",
- "url": "https://github.com/filp/whoops.git",
- "reference": "c13c0be93cff50f88bbd70827d993026821914dd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd",
- "reference": "c13c0be93cff50f88bbd70827d993026821914dd",
- "shasum": ""
- },
- "require": {
- "php": "^5.5.9 || ^7.0 || ^8.0",
- "psr/log": "^1.0.1"
- },
- "require-dev": {
- "mockery/mockery": "^0.9 || ^1.0",
- "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
- "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
- },
- "suggest": {
- "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
- "whoops/soap": "Formats errors as SOAP responses"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.7-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Whoops\\": "src/Whoops/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Filipe Dobreira",
- "homepage": "https://github.com/filp",
- "role": "Developer"
- }
- ],
- "description": "php error handling for cool kids",
- "homepage": "https://filp.github.io/whoops/",
- "keywords": [
- "error",
- "exception",
- "handling",
- "library",
- "throwable",
- "whoops"
+ "keywords": [
+ "error",
+ "flare",
+ "laravel",
+ "page"
],
"support": {
- "issues": "https://github.com/filp/whoops/issues",
- "source": "https://github.com/filp/whoops/tree/2.12.1"
+ "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
+ "forum": "https://twitter.com/flareappio",
+ "issues": "https://github.com/facade/ignition/issues",
+ "source": "https://github.com/facade/ignition"
},
- "funding": [
- {
- "url": "https://github.com/denis-sokolov",
- "type": "github"
- }
- ],
- "time": "2021-04-25T12:00:00+00:00"
+ "time": "2021-05-05T06:45:12+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -5709,114 +6249,6 @@
},
"time": "2020-07-09T08:09:16+00:00"
},
- {
- "name": "knuckleswtf/scribe",
- "version": "3.x-dev",
- "dist": {
- "type": "path",
- "url": "../scribe",
- "reference": "e9cf24151f40c755ec91adc6546508960ca4bed1"
- },
- "require": {
- "erusev/parsedown": "^1.7",
- "ext-fileinfo": "*",
- "ext-json": "*",
- "ext-pdo": "*",
- "fakerphp/faker": "^1.9.1",
- "illuminate/console": "^6.0|^7.0|^8.0",
- "illuminate/routing": "^6.0|^7.0|^8.0",
- "illuminate/support": "^6.0|^7.0|^8.0",
- "league/flysystem": "^1.0",
- "mpociot/reflection-docblock": "^1.0.1",
- "nikic/php-parser": "^4.10",
- "nunomaduro/collision": "^3.0|^4.0|^5.0",
- "php": ">=7.4",
- "ramsey/uuid": "^3.8|^4.0",
- "shalvah/clara": "^2.6",
- "spatie/data-transfer-object": "^2.6",
- "symfony/var-exporter": "^4.0|^5.0",
- "symfony/yaml": "^4.0|^5.0"
- },
- "replace": {
- "mpociot/laravel-apidoc-generator": "*"
- },
- "require-dev": {
- "brianium/paratest": "^6.0",
- "dms/phpunit-arraysubset-asserts": "^0.2.0",
- "laravel/legacy-factories": "^1.0.4",
- "laravel/lumen-framework": "^6.0|^7.0|^8.0",
- "league/fractal": "^0.19.0",
- "nikic/fast-route": "^1.3",
- "orchestra/testbench": "^4.0|^5.0|^6.0",
- "phpstan/phpstan": "^0.12.19",
- "phpunit/phpunit": "^9.0"
- },
- "suggest": {
- "league/fractal": "Required for transformers support"
- },
- "type": "library",
- "extra": {
- "laravel": {
- "providers": [
- "Knuckles\\Scribe\\ScribeServiceProvider"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "Knuckles\\Scribe\\": "src/",
- "Knuckles\\Camel\\": "camel/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Knuckles\\Scribe\\Tests\\": "tests/"
- }
- },
- "scripts": {
- "lint": [
- "phpstan analyse -c ./phpstan.neon src"
- ],
- "test": [
- "phpunit --no-coverage --stop-on-failure --exclude-group dingo"
- ],
- "test-ci": [
- "phpunit --no-coverage --exclude-group dingo"
- ],
- "test-parallel": [
- "paratest -p16 --stop-on-failure --no-coverage --exclude-group dingo"
- ],
- "test-parallel-ci": [
- "paratest -p16 --no-coverage --exclude-group dingo"
- ]
- },
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Shalvah",
- "email": "hello@shalvah.me"
- }
- ],
- "description": "Generate API documentation for humans from your Laravel codebase.✍",
- "homepage": "http://github.com/knuckleswtf/scribe",
- "keywords": [
- "API",
- "dingo",
- "documentation",
- "laravel"
- ],
- "funding": [
- {
- "type": "patreon",
- "url": "https://patreon.com/shalvah"
- }
- ],
- "transport-options": {
- "relative": true
- }
- },
{
"name": "laravel/sail",
"version": "v1.7.0",
@@ -5949,59 +6381,6 @@
},
"time": "2021-02-24T09:51:49+00:00"
},
- {
- "name": "mpociot/reflection-docblock",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/mpociot/reflection-docblock.git",
- "reference": "c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/mpociot/reflection-docblock/zipball/c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587",
- "reference": "c8b2e2b1f5cebbb06e2b5ccbf2958f2198867587",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Mpociot": [
- "src/"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "mike.vanriel@naenius.com"
- }
- ],
- "support": {
- "issues": "https://github.com/mpociot/reflection-docblock/issues",
- "source": "https://github.com/mpociot/reflection-docblock/tree/master"
- },
- "time": "2016-06-20T20:53:12+00:00"
- },
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
@@ -6049,104 +6428,16 @@
"object graph"
],
"support": {
- "issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
- },
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
- "type": "tidelift"
- }
- ],
- "time": "2020-11-13T09:40:50+00:00"
- },
- {
- "name": "nunomaduro/collision",
- "version": "v5.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/nunomaduro/collision.git",
- "reference": "41b7e9999133d5082700d31a1d0977161df8322a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nunomaduro/collision/zipball/41b7e9999133d5082700d31a1d0977161df8322a",
- "reference": "41b7e9999133d5082700d31a1d0977161df8322a",
- "shasum": ""
- },
- "require": {
- "facade/ignition-contracts": "^1.0",
- "filp/whoops": "^2.7.2",
- "php": "^7.3 || ^8.0",
- "symfony/console": "^5.0"
- },
- "require-dev": {
- "brianium/paratest": "^6.1",
- "fideloper/proxy": "^4.4.1",
- "friendsofphp/php-cs-fixer": "^2.17.3",
- "fruitcake/laravel-cors": "^2.0.3",
- "laravel/framework": "^9.0",
- "nunomaduro/larastan": "^0.6.2",
- "nunomaduro/mock-final-classes": "^1.0",
- "orchestra/testbench": "^7.0",
- "phpstan/phpstan": "^0.12.64",
- "phpunit/phpunit": "^9.5.0"
- },
- "type": "library",
- "extra": {
- "laravel": {
- "providers": [
- "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "NunoMaduro\\Collision\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nuno Maduro",
- "email": "enunomaduro@gmail.com"
- }
- ],
- "description": "Cli error handling for console/command-line PHP applications.",
- "keywords": [
- "artisan",
- "cli",
- "command-line",
- "console",
- "error",
- "handling",
- "laravel",
- "laravel-zero",
- "php",
- "symfony"
- ],
- "support": {
- "issues": "https://github.com/nunomaduro/collision/issues",
- "source": "https://github.com/nunomaduro/collision"
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
"funding": [
{
- "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
- "type": "custom"
- },
- {
- "url": "https://github.com/nunomaduro",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/nunomaduro",
- "type": "patreon"
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
}
],
- "time": "2021-04-09T13:38:32+00:00"
+ "time": "2020-11-13T09:40:50+00:00"
},
{
"name": "phar-io/manifest",
@@ -7869,260 +8160,6 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
- {
- "name": "shalvah/clara",
- "version": "2.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/shalvah/clara.git",
- "reference": "f1d8a36da149b605769ef86286110e435a68d9ac"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/shalvah/clara/zipball/f1d8a36da149b605769ef86286110e435a68d9ac",
- "reference": "f1d8a36da149b605769ef86286110e435a68d9ac",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/console": "^4.0|^5.0"
- },
- "require-dev": {
- "eloquent/phony-phpunit": "^7.0",
- "phpunit/phpunit": "^9.1"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Shalvah\\Clara\\": "src/"
- },
- "files": [
- "helpers.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "🔊 Simple, pretty, testable console output for CLI apps.",
- "keywords": [
- "cli",
- "log",
- "logging"
- ],
- "support": {
- "issues": "https://github.com/shalvah/clara/issues",
- "source": "https://github.com/shalvah/clara/tree/2.6.0"
- },
- "time": "2020-04-12T11:08:11+00:00"
- },
- {
- "name": "spatie/data-transfer-object",
- "version": "2.8.3",
- "source": {
- "type": "git",
- "url": "https://github.com/spatie/data-transfer-object.git",
- "reference": "2625a59566804ec63f01947d85947336237cbda6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/2625a59566804ec63f01947d85947336237cbda6",
- "reference": "2625a59566804ec63f01947d85947336237cbda6",
- "shasum": ""
- },
- "require": {
- "php": "^7.4|^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "suggest": {
- "phpstan/phpstan": "Take advantage of checkUninitializedProperties with \\Spatie\\DataTransferObject\\PHPstan\\PropertiesAreAlwaysInitializedExtension"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Spatie\\DataTransferObject\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Brent Roose",
- "email": "brent@spatie.be",
- "homepage": "https://spatie.be",
- "role": "Developer"
- }
- ],
- "description": "Data transfer objects with batteries included",
- "homepage": "https://github.com/spatie/data-transfer-object",
- "keywords": [
- "data-transfer-object",
- "spatie"
- ],
- "support": {
- "issues": "https://github.com/spatie/data-transfer-object/issues",
- "source": "https://github.com/spatie/data-transfer-object/tree/2.8.3"
- },
- "funding": [
- {
- "url": "https://www.patreon.com/spatie",
- "type": "patreon"
- }
- ],
- "time": "2021-02-12T08:46:52+00:00"
- },
- {
- "name": "symfony/var-exporter",
- "version": "v5.2.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/var-exporter.git",
- "reference": "d26db2d2b2d7eb2c1adb8545179f8803998b8237"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d26db2d2b2d7eb2c1adb8545179f8803998b8237",
- "reference": "d26db2d2b2d7eb2c1adb8545179f8803998b8237",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/polyfill-php80": "^1.15"
- },
- "require-dev": {
- "symfony/var-dumper": "^4.4.9|^5.0.9"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\VarExporter\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Allows exporting any serializable PHP data structure to plain PHP code",
- "homepage": "https://symfony.com",
- "keywords": [
- "clone",
- "construct",
- "export",
- "hydrate",
- "instantiate",
- "serialize"
- ],
- "support": {
- "source": "https://github.com/symfony/var-exporter/tree/v5.3.0-BETA3"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-05-07T13:42:21+00:00"
- },
- {
- "name": "symfony/yaml",
- "version": "v5.2.9",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "d23115e4a3d50520abddccdbec9514baab1084c8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/d23115e4a3d50520abddccdbec9514baab1084c8",
- "reference": "d23115e4a3d50520abddccdbec9514baab1084c8",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
- "symfony/polyfill-ctype": "~1.8"
- },
- "conflict": {
- "symfony/console": "<4.4"
- },
- "require-dev": {
- "symfony/console": "^4.4|^5.0"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
- },
- "bin": [
- "Resources/bin/yaml-lint"
- ],
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Yaml\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Loads and dumps YAML files",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/yaml/tree/v5.2.9"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-05-16T13:07:46+00:00"
- },
{
"name": "theseer/tokenizer",
"version": "1.2.0",
@@ -8177,6 +8214,7 @@
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
+ "ajcastro/scribe-tdd": 20,
"knuckleswtf/scribe": 20
},
"prefer-stable": true,
diff --git a/config/scribe.php b/config/scribe.php
index 712f14f..c00a5ff 100644
--- a/config/scribe.php
+++ b/config/scribe.php
@@ -297,37 +297,50 @@
*/
'strategies' => [
'metadata' => [
- Strategies\Metadata\GetFromDocBlocks::class,
+ // Strategies\Metadata\GetFromDocBlocks::class,
+ AjCastro\ScribeTdd\Strategies\Metadata\GetFromDocBlocksFromScribeTdd::class,
],
'urlParameters' => [
Strategies\UrlParameters\GetFromLaravelAPI::class,
Strategies\UrlParameters\GetFromLumenAPI::class,
Strategies\UrlParameters\GetFromUrlParamTag::class,
+ AjCastro\ScribeTdd\Strategies\UrlParameters\GetFromTestResult::class,
+ AjCastro\ScribeTdd\Strategies\UrlParameters\GetFromUrlParamTagFromScribeTdd::class,
],
'queryParameters' => [
- Strategies\QueryParameters\GetFromFormRequest::class,
- Strategies\QueryParameters\GetFromInlineValidator::class,
- Strategies\QueryParameters\GetFromQueryParamTag::class,
- AddPaginationParameters::class,
+ // Strategies\QueryParameters\GetFromFormRequest::class,
+ // Strategies\QueryParameters\GetFromInlineValidator::class,
+ // Strategies\QueryParameters\GetFromQueryParamTag::class,
+ // AddPaginationParameters::class,
+ AjCastro\ScribeTdd\Strategies\QueryParameters\GetFromTestResult::class,
+ AjCastro\ScribeTdd\Strategies\QueryParameters\AddPaginationParametersFromScribeTdd::class,
+ AjCastro\ScribeTdd\Strategies\QueryParameters\GetFromQueryParamTagFromScribeTdd::class,
],
'headers' => [
- Strategies\Headers\GetFromRouteRules::class,
- Strategies\Headers\GetFromHeaderTag::class,
+ // Strategies\Headers\GetFromRouteRules::class,
+ // Strategies\Headers\GetFromHeaderTag::class,
+ AjCastro\ScribeTdd\Strategies\Headers\GetFromHeaderTagFromScribeTdd::class,
],
'bodyParameters' => [
- Strategies\BodyParameters\GetFromFormRequest::class,
- Strategies\BodyParameters\GetFromInlineValidator::class,
- Strategies\BodyParameters\GetFromBodyParamTag::class,
+ // Strategies\BodyParameters\GetFromFormRequest::class,
+ // Strategies\BodyParameters\GetFromInlineValidator::class,
+ // Strategies\BodyParameters\GetFromBodyParamTag::class,
+ AjCastro\ScribeTdd\Strategies\BodyParameters\GetFromTestResult::class,
+ AjCastro\ScribeTdd\Strategies\BodyParameters\GetFromBodyParamTagFromScribeTdd::class,
],
'responses' => [
- Strategies\Responses\UseTransformerTags::class,
- Strategies\Responses\UseResponseTag::class,
- Strategies\Responses\UseResponseFileTag::class,
- Strategies\Responses\UseApiResourceTags::class,
- Strategies\Responses\ResponseCalls::class,
+ // Strategies\Responses\UseTransformerTags::class,
+ // Strategies\Responses\UseResponseTag::class,
+ // Strategies\Responses\UseResponseFileTag::class,
+ // Strategies\Responses\UseApiResourceTags::class,
+ // Strategies\Responses\ResponseCalls::class,
+ AjCastro\ScribeTdd\Strategies\Responses\GetFromTestResult::class,
+ AjCastro\ScribeTdd\Strategies\Responses\UseResponseTagFromScribeTdd::class,
+ AjCastro\ScribeTdd\Strategies\Responses\UseResponseFileTagFromScribeTdd::class,
],
'responseFields' => [
- Strategies\ResponseFields\GetFromResponseFieldTag::class,
+ // Strategies\ResponseFields\GetFromResponseFieldTag::class,
+ AjCastro\ScribeTdd\Strategies\ResponseFields\GetFromResponseFieldTagFromScribeTdd::class,
],
],
diff --git a/routes/api.php b/routes/api.php
index 6f69fc5..3447866 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -16,17 +16,6 @@
|
*/
-/**
- * Healthcheck
- *
- * Check that the service is up. If everything is okay, you'll get a 200 OK response.
- *
- * Otherwise, the request will fail with a 400 error, and a response listing the failed services.
- *
- * @response 400 scenario="Service is unhealthy" {"status": "down", "services": {"database": "up", "redis": "down"}}
- * @responseField status The status of this API (`up` or `down`).
- * @responseField services Map of each downstream service and their status (`up` or `down`).
- */
Route::get('/healthcheck', function () {
return [
'status' => 'up',
@@ -37,6 +26,15 @@
];
});
+/**
+ * @urlParam name string required This urlParam is not parsed because it is overwritten in the urlParam located in DynamicDataTest.
+ */
+Route::get('/dynamic_data/{name}', function ($name) {
+ return [
+ 'name' => $name,
+ ];
+});
+
/*
Route::middleware('auth:api')->get('/me', function (Request $request) {
return $request->user();
@@ -89,4 +87,4 @@
Route::post('/file-input', function () {
return [
];
-});
\ No newline at end of file
+});
diff --git a/tests/Feature/Http/Controllers/DynamicDataTest.php b/tests/Feature/Http/Controllers/DynamicDataTest.php
new file mode 100644
index 0000000..4c4c0d4
--- /dev/null
+++ b/tests/Feature/Http/Controllers/DynamicDataTest.php
@@ -0,0 +1,40 @@
+get("api/dynamic_data/{$name}");
+
+ $response
+ ->assertOk()
+ ->assertJson([
+ 'name' => $name,
+ ]);
+ }
+
+ public function myDataProvider()
+ {
+ return [
+ ['hello'],
+ ['world'],
+ ];
+ }
+}
diff --git a/tests/Feature/Http/Controllers/SideProjectControllerTest.php b/tests/Feature/Http/Controllers/SideProjectControllerTest.php
new file mode 100644
index 0000000..15b4d1e
--- /dev/null
+++ b/tests/Feature/Http/Controllers/SideProjectControllerTest.php
@@ -0,0 +1,112 @@
+actingAs(User::factory()->create());
+ }
+
+ /**
+ * View all side projects
+ *
+ * This endpoint's response was gotten via a "response call"—
+ * Scribe called our API in a test environment to get a sample response.
+ */
+ public function test_side_projects_index()
+ {
+ $response = $this->get(route('side_projects.index', [
+ 'sort' => 'name',
+ 'tags' => ['done','approved'],
+ ]));
+
+ $response->assertOk();
+ }
+
+ /**
+ * Start a new side project
+ *
+ * _Even though we both know you'll never finish it._
+ *
+ * This endpoint's body parameters were automatically generated by Scribe
+ * from the controller's code. Check out the source!
+ *
+ * @authenticated
+ */
+ public function test_side_projects_store()
+ {
+ $data = SideProject::factory()->make()->toArray();
+
+ $response = $this->post(route('side_projects.store'), $data);
+
+ $response->assertCreated();
+ }
+
+ /**
+ * View a side project
+ *
+ * This endpoint's response uses a Fractal transformer, so we tell Scribe that using an annotation,
+ * and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
+ *
+ *
+ *
+ * @transformer App\Http\Transformers\SideProjectTransformer
+ * @transformerModel App\Models\SideProject with=owner
+ */
+ public function test_side_projects_show()
+ {
+ $user = SideProject::factory()->create();
+
+ $response = $this->get(route('side_projects.show', $user));
+
+ $response->assertOk();
+ }
+
+ /**
+ * Update a side project
+ *
+ */
+ public function test_side_projects_update()
+ {
+ $user = SideProject::factory()->create();
+ $data = SideProject::factory()->make()->toArray();
+
+ $response = $this->put(route('side_projects.update', $user), $data);
+
+ $response->assertOk();
+ }
+
+ /**
+ * Delete a side project
+ *
+ */
+ public function test_side_projects_destroy()
+ {
+ $user = SideProject::factory()->create();
+
+ $response = $this->put(route('side_projects.destroy', $user));
+
+ $response->assertOk();
+ }
+
+ /**
+ * Finish a side project
+ *
+ * Hmmm.🤔
+ */
+ public function test_side_projects_finish()
+ {
+ $this->assertTrue(true);
+ }
+}
diff --git a/tests/Feature/Http/Controllers/UserControllerTest.php b/tests/Feature/Http/Controllers/UserControllerTest.php
new file mode 100644
index 0000000..a2f46e1
--- /dev/null
+++ b/tests/Feature/Http/Controllers/UserControllerTest.php
@@ -0,0 +1,114 @@
+get('api/users');
+
+ $response->assertOk();
+ }
+
+ /**
+ * Create a user
+ *
+ * This endpoint's body parameters are automatically generated from a FormRequest.
+ *
+ * @bodyParam name string required The name of the user.
+ * @bodyParam email string required The email of the user.
+ */
+ public function test_users_store()
+ {
+ $data = User::factory()->make()->toArray()+['password' => 'as123as35y'];
+
+ $response = $this->post('api/users', $data);
+
+ $response
+ ->assertCreated();
+ }
+
+ /**
+ * Authenticate
+ *
+ * Get a new API token.
+ *
+ *
+ *
+ * @response {"token": "2|KLDoUXc68Ko0JaFDZoX9qYkUqWglwdGxQsvTGBCg"}
+ * @responseField token The new API token. Valid forever.
+ */
+ public function test_users_authenticate()
+ {
+ $user = User::factory()->create();
+
+ $response = $this->post("api/users/{$user->id}/auth");
+
+ $response
+ ->assertOk()
+ ->assertJsonStructure([
+ 'token',
+ ]);
+ }
+
+ /**
+ * Fetch a user
+ *
+ * This endpoint's response uses an Eloquent API resource, so we tell Scribe that using an annotation,
+ * and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
+ *
+ * @apiResource App\Http\Resources\UserResource
+ * @apiResourceModel App\Models\User with=sideProjects
+ * @responseFile 404 scenario="User not found" responses/not_found.json {"resource": "user"}
+ */
+ public function test_users_show()
+ {
+ $user = User::factory()->create();
+
+ $response = $this->get("api/users/{$user->id}");
+
+ $response
+ ->assertOk();
+ }
+
+ /**
+ * Update the specified resource in storage.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function test_users_update()
+ {
+ $this->assertTrue(true);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ *
+ * @param int $id
+ * @return \Illuminate\Http\Response
+ */
+ public function test_users_destroy()
+ {
+ $this->assertTrue(true);
+ }
+}
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 2932d4a..971a305 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -2,9 +2,17 @@
namespace Tests;
+use AjCastro\ScribeTdd\Tests\ScribeTddSetup;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
- use CreatesApplication;
+ use CreatesApplication, ScribeTddSetup;
+
+ public function setUp(): void
+ {
+ parent::setUp();
+
+ $this->setUpScribeTdd();
+ }
}