GithubHelp home page GithubHelp logo

johnylemon / laravel-apidocs Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 3.0 314 KB

Laravel API documentation generating tool

License: MIT License

PHP 65.07% Vue 23.39% JavaScript 3.22% Sass 7.20% Blade 1.12%

laravel-apidocs's People

Contributors

johnylemon89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-apidocs's Issues

Allow to input own parameters in api.

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.

Can't use artisan command to create new class

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()

Use within Route::Resource or Route::ApiResource

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?

Nothing is generated

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');
    }
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.