Support the ongoing development of Laravel.io →
posted 10 years ago
Packages
Last updated 2 years ago.
0

I am very interested in the same.

Did you find the solution or help somewhere else?

Last updated 2 years ago.
0

Looking to do the same. Any success?

Last updated 2 years ago.
0

Have a look at API Blueprint.

Last updated 2 years ago.
0

What did for my project was to comment all methods regarding the API for example:

created a small php file that what does is to parse the comments of the method here is a sample of a comment:

/**
    * Select all elements
    *
    * @param int $num_rows
    * @param int $user_id
    * @param string $search_term
    * @return int
    */

So, it is really easy to generate documentation based on the comments of each method in the controller or model it depends how your architecture is.

I code methods, comment the methods and then I just run the script I did and that's all, it outputs an HTML file with all API methods documented.

Regards.

Last updated 2 years ago.
0

Hi Laravelers,

I'm currently making a RESTful API starter with Laravel 4.2. If that can help: https://github.com/merlosy/laravel-restful-api-starter Feedback is great!

For your issue, I would simply add a phpdocumentor.phar at the root of your project. http://www.phpdoc.org/ You have guidelines on the website to help you..

Cheers

Last updated 2 years ago.
0

If you're interested in Swagger for Laravel, I wrote Swaggervel (https://github.com/slampenny/Swaggervel) which can be downloaded from Github. It should take care of most of the heavy lifting for you.

Last updated 2 years ago.
0

@slampenny,

I've installed swaggervel successfully, but don't really understand how to get it to generate the docs. Not sure what the big difference is between swaggervel and just downloading and using swagger.phar.

The app is in debug mode. Any tips/tricks on using your package?

Last updated 2 years ago.
0

Once you install Swaggervel, you just add some swagger annotations to your classes and it will just show up at /api-docs

Really easy, don't need to worry about configuration, routing, or anything really, it just works. One note I found confusing though, if you haven't added any annotations at all yet, then going to the swaggervel endpoint will give an error since swagger.phar that it uses throws an error.

0

Swaggervel kills dingo api :(

0

Yup, it really does. Ran into the same issue today.

0

There is http://apidocjs.com/ which generates docs from annotation

0

BostjanOb said:

There is http://apidocjs.com/ which generates docs from annotation

Thanks. You saved my day. apiDoc works perfect with Laravel 5.1.

Last updated 8 years ago.
0

i think PHPDoc is a better solution. You can configure it and run a task to regenerate the documentation after each deployment.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Hadibut hadibut Joined 19 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.