diff --git a/OpenAPI.json b/OpenAPI.json deleted file mode 100644 index 348f686..0000000 --- a/OpenAPI.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "Short Url", - "version": "1.0.0" - }, - "servers": [ - { - "url": "http:\/\/short-url.test" - } - ], - "paths": { - "\/api\/register": { - "post": { - "summary": "Register a new user", - "description": "This API call register a new user for Short-Url" - } - }, - "\/api\/login": { - "post": { - "summary": "Login", - "description": "User login function. It returns the Bearer Token" - } - }, - "\/api\/url": { - "get": { - "summary": "Get all Urls", - "description": "Get all Urls associated to logged user, with usage count and last 100 calls" - }, - "post": { - "summary": "Create an Url", - "description": "Create a new Url with short-url associated to logge-in user" - } - }, - "\/api\/url\/{url}": { - "get": { - "summary": "Get a single Url", - "description": "Get a single Urls associated to logged user, with usage count and last 100 calls", - "parameters": [ - { - "name": "url", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "put": { - "summary": "Update an Url", - "description": "Update a single Url associated to the user", - "parameters": [ - { - "name": "url", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "delete": { - "summary": "Delete an Url", - "description": "Delete a single Url associated to the user", - "parameters": [ - { - "name": "url", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - } - } -} diff --git a/app/Http/Controllers/Api/UrlApiController.php b/app/Http/Controllers/Api/UrlApiController.php index a9d82b7..5b6a2d2 100644 --- a/app/Http/Controllers/Api/UrlApiController.php +++ b/app/Http/Controllers/Api/UrlApiController.php @@ -14,7 +14,6 @@ use Throwable; use Vyuldashev\LaravelOpenApi\Attributes as OpenApi; -#[OpenApi\PathItem] class UrlApiController extends Controller { use BaseApiResponse; @@ -24,7 +23,6 @@ class UrlApiController extends Controller * * Get all Urls associated to logged user, with usage count and last 100 calls */ - #[OpenApi\Operation] public function index(Request $request) { return UrlResource::collection( @@ -37,7 +35,6 @@ public function index(Request $request) * * Create a new Url with short-url associated to logge-in user */ - #[OpenApi\Operation] public function store(UrlRequest $request) { $url = Url::create([ @@ -54,7 +51,6 @@ public function store(UrlRequest $request) * * Update a single Url associated to the user */ - #[OpenApi\Operation] public function update(UrlRequest $request, Url $url) { if (!$this->checkCorrectUser($url)) { @@ -72,7 +68,6 @@ public function update(UrlRequest $request, Url $url) * * Delete a single Url associated to the user */ - #[OpenApi\Operation] public function destroy(Url $url) { if (!$this->checkCorrectUser($url)) { @@ -97,7 +92,6 @@ public function destroy(Url $url) * @param Url $url * @return UrlResource|JsonResponse */ - #[OpenApi\Operation] public function show(Url $url) { if (!$this->checkCorrectUser($url)) { diff --git a/composer.json b/composer.json index ba59171..a8fb7a3 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", - "filament/upgrade": "^3.1", "laravel/pint": "^1.0", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4",