PHPackages                             johannesschobel/dingodocs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. johannesschobel/dingodocs

ActiveLibrary[API Development](/categories/api)

johannesschobel/dingodocs
=========================

Automatically generate an API documentation for your Dingo/API application

14622PHPCI failing

Since Aug 21Pushed 6y ago2 watchersCompare

[ Source](https://github.com/johannesschobel/dingodocs)[ Packagist](https://packagist.org/packages/johannesschobel/dingodocs)[ RSS](/packages/johannesschobel-dingodocs/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

dingodocs
=========

[](#dingodocs)

Automatically generate an API documentation for your Laravel Dingo/API application.

Installation
------------

[](#installation)

Install the package via Composer:

```
$ composer require johannesschobel/dingodocs
```

Then publish the `config` file using the following command:

```
php artisan vendor:publish --provider="JohannesSchobel\DingoDocs\DingoDocsServiceProvider" --tag="config"
```

If you want to customize the output of your API Doc file, you may want to publish the `resource` files as well:

```
php artisan vendor:publish --provider="JohannesSchobel\DingoDocs\DingoDocsServiceProvider" --tag="resources"
```

Getting Started
---------------

[](#getting-started)

The package tries to enable developers to automatically generate an API doc file without burdening the developers to much. For example, the package tries to read required information from annotations or even from parameters of the method to be called.

### Available Annotations

[](#available-annotations)

Currently, the package provides features for the following Annotations:

#### Name

[](#name)

A name for the given Endpoint of your API.

#### Description

[](#description)

A description (long text) for the Endpoint of your API.

#### HTTP METHOD

[](#http-method)

Respective HTTP Method (`GET`, `POST`, ...) to call the Endpoint.

#### Authentication

[](#authentication)

If you need to be authenticated in order to call the Endpoint.

#### Group

[](#group)

A name to group Endpoints together (e.g., used within the navigation bar to the left of the generated file).

#### Role

[](#role)

The Role a requestor needs to have in order to call the Endpoint.

#### Exceptions

[](#exceptions)

The Exceptions an Endpoint may throw including HTTP Status and further descriptions.

#### Request

[](#request)

A sample request to call the Endpoint.

#### Response

[](#response)

A sample Response to be returned from the Endpoint.

#### Transformer

[](#transformer)

The Transformer (as well as its includes) which are provided by this Endpoint.

#### Transient

[](#transient)

Indicates, whether this Endpoint is listed in the resulting API Doc.

Commands
--------

[](#commands)

Simply call

```
php artisan dingodocs:generate
```

to generate the API doc. The generated file is then stored within the `public` folder of your application.

Example
-------

[](#example)

Consider the following example, which illustrates how to use this package:

```
// namespace and lots of use statements here

/**
 * Class FaqController
 * @package App\Http\Controllers
 *
 * @Group("Faqs")
 * @Authentication
 * @Role("Group")
 */
class FaqController extends ApiBaseController
{
    /**
     * Get all Faqs
     *
     * Returns all Faqs.
     *
     * @param Request $request
     * @return Response the result
     *
     * @Authentication("false")
     * @Transformer("\App\Transformers\FaqTransformer")
     */
    public function index(Request $request) {
        $faqs = Faq::all();

        return $this->response->collection($faqs, new FaqTransformer());
    }

    /**
     * Get one Faq
     *
     * Returns one Faq entry.
     *
     * @param Faq $faq to be displayed
     * @return Response the result
     *
     * @Transformer("\App\Transformers\FaqTransformer")
     * @Exceptions({
     *    @Exception("403", description="If the user is not logged in."),
     *    @Exception("400", description="If some other things happen."),
     * })
     */
    public function show(Faq $faq) {
        $user = authenticate(); // imagine, that this method will return a USER object or null!
        if(is_null($user)) {
            // do a fancy exception handling here!
        }

        // do another exception handling here..

        return $this->response->item($faq, new FaqTransformer());
    }

    /**
     * Store a new Faq
     *
     * Add a new Faq entry to the database.
     *
     * @param Request $request the request to be stored to the database
     * @return Response the result
     */
    public function store(FaqRequest $request) {
        $faq = new Faq();
        $faq->name = $request->input('name');
        $faq->save();

        return $this->response->created();
    }
}
```

As one can see, some annotations may be placed at `Class`-level, while others may be placed at `Method`-level. However, method-annotations overwrite class-annotations (cf. the `@Authentication` annotation in the example).

Note that the package will try to resolve the `FaqRequest` parameter from the `store` method. Furthermore, all validation rules (e.g., `name => required|string|max:255`) are parsed and automatically appended to the docs.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/554f30f3c24b34c1961da6f12c0e2cfec6436e1c6dd6b8092669a7138086d770?d=identicon)[johannesschobel@googlemail.com](/maintainers/johannesschobel@googlemail.com)

---

Top Contributors

[![johannesschobel](https://avatars.githubusercontent.com/u/9431350?v=4)](https://github.com/johannesschobel "johannesschobel (1 commits)")

### Embed Badge

![Health badge](/badges/johannesschobel-dingodocs/health.svg)

```
[![Health](https://phpackages.com/badges/johannesschobel-dingodocs/health.svg)](https://phpackages.com/packages/johannesschobel-dingodocs)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
