johnylemon / laravel-apidocs Goto Github PK
View Code? Open in Web Editor NEWLaravel API documentation generating tool
License: MIT License
Laravel API documentation generating tool
License: MIT License
It's awesome package which allows one to use standartised way to show api endpoint docs, but the issues here is that the try function wont work in majority of cases as api key or other form of auth is usually required for api.
When running php artisan command php artisan apidocs:endpoint SampleEndpoint
I get the following error:
Call to undefined function Johnylemon\Apidocs\Console\Commands\stub()
at vendor/johnylemon/laravel-apidocs/src/Console/Commands/Make.php:46
42▕ // target path
43▕ //
44▕ $path = app_path("$dir/$class.php");
45▕
➜ 46▕ stub($this->stub(), $path, [
47▕ 'NAMESPACE' => $this->namespace($dir),
48▕ 'NAME' => $class,
49▕ ]);
50▕ }
+13 vendor frames
14 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Thank you for this great package! Really nice way of handling api documentation!
As I mostly use Route::resource and Route::ApiResource instead of Route::get etc. it would be really nice to be able to add it apidoc as in: Route::resource('/rooms', "Rooms\RoomsController")->apidocs(\App\Apidocs\Endpoints\Rooms::class);
Is there a chance this can be easily added?
Thank you for great effort you made.
I followed along with steps but when I am running php artisan apidocs:generate
no docs was generated. No even any errors are shown.
Here's my files
routes/api.php
Route::post('v1/register', [AuthController::class, 'register'])->apidocs(RegisterEndpoint::class);
app/Apidocs/Endpoints/RegisterEndpoint.php
...
public function describe(): void
{
$this->title('Register')
->description('Register a new account');
}
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.