PHPackages                             rfpdl/whats-up-doc - 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. rfpdl/whats-up-doc

ActiveLibrary[API Development](/categories/api)

rfpdl/whats-up-doc
==================

Generate beautiful API documentation from Laravel Data DTOs

v0.0.1(2mo ago)01MITPHPPHP ^8.2

Since Apr 27Pushed 2mo agoCompare

[ Source](https://github.com/rfpdl/whats-up-doc)[ Packagist](https://packagist.org/packages/rfpdl/whats-up-doc)[ RSS](/packages/rfpdl-whats-up-doc/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

What's Up Doc
=============

[](#whats-up-doc)

Generate API documentation from your Laravel Data DTOs automatically.

Features
--------

[](#features)

- **Nested Schema Traversal** - Automatically discovers and documents nested Data classes, even deeply nested (e.g. `FileData -> PageData[] -> DetectionData`)
- **OpenAPI 3.1.0** - Full spec generation with proper nullable types, servers, and security schemes
- **Interactive UI** - Browse docs at `/docs/api` with Stoplight Elements (search, try-it-out, dark mode)
- **Multiple Formats** - HTML, JSON, and OpenAPI output
- **Glob Scan Paths** - DDD-friendly with patterns like `app/Domains/*/DataObjects`
- **Custom Endpoint Docs** - Document non-Data endpoints with `#[DocEndpoint]`, `#[DocParam]`, `#[DocBody]`, `#[DocResponse]` attributes
- **Route Detection** - Auto-detects API endpoints using Laravel Data classes
- **Validation Mapping** - Spatie validation attributes become OpenAPI constraints

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

[](#installation)

```
composer require rfpdl/whats-up-doc
```

Quick Start
-----------

[](#quick-start)

```
# Generate HTML documentation
php artisan data-doc:generate

# Generate OpenAPI specification
php artisan data-doc:generate --format=openapi

# Generate JSON schema
php artisan data-doc:generate --format=json

# Custom output directory
php artisan data-doc:generate --output=/path/to/docs
```

Or visit `/docs/api` in your browser for the interactive UI (enabled by default).

Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --provider="Rfpdl\WhatsUpDoc\WhatsUpDocServiceProvider" --tag="config"
```

```
return [
    'title' => 'My API Documentation',
    'description' => 'Generated from Laravel Data DTOs',
    'output_path' => storage_path('app/docs'),

    // Supports glob patterns for DDD layouts
    'scan_paths' => [
        app_path('Domains/*/DataObjects'),
    ],

    'route_prefixes' => ['api'],

    'scan' => [
        'follow_nested' => true,
        'max_nesting_depth' => 10,
    ],

    'openapi' => [
        'version' => '3.1.0',
        'servers' => [],
        'security_schemes' => [],
    ],

    'ui' => [
        'enabled' => true,
        'path' => 'docs/api',
        'middleware' => ['web'],
    ],
];
```

Usage
-----

[](#usage)

### Data Classes

[](#data-classes)

```
use Spatie\LaravelData\Data;

/**
 * User data transfer object
 */
class UserData extends Data
{
    public function __construct(
        public int $id,
        public string $name,
        public string $email,
        public ?AddressData $address = null,
        /** @var RoleData[] */
        public array $roles = [],
    ) {}
}
```

Nested classes like `AddressData` and `RoleData` are automatically discovered and included in the OpenAPI spec with proper `$ref` links.

### Route Detection

[](#route-detection)

```
class UserController extends Controller
{
    public function show(int $id): UserData { /* ... */ }
    public function store(CreateUserData $data): UserData { /* ... */ }
}
```

Routes using Data classes are automatically documented with request/response schemas.

### Custom Endpoint Documentation

[](#custom-endpoint-documentation)

For endpoints that don't use Laravel Data:

```
use Rfpdl\WhatsUpDoc\Attributes\{DocEndpoint, DocParam, DocBody, DocResponse};

class WebhookController extends Controller
{
    #[DocEndpoint(summary: 'Receive Stripe webhook', group: 'Webhooks')]
    #[DocParam(name: 'signature', in: 'header', type: 'string', required: true)]
    #[DocBody(schema: ['type' => 'object', 'properties' => ['event' => ['type' => 'string']]])]
    #[DocResponse(status: 200, description: 'Webhook processed')]
    #[DocResponse(status: 400, description: 'Invalid payload')]
    public function handleStripe(Request $request): JsonResponse
    {
        // ...
    }
}
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- Spatie Laravel Data 3 or 4

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance87

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

67d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46474383?v=4)[Roy Francis Ponce de Leon](/maintainers/rfpdl)[@rfpdl](https://github.com/rfpdl)

---

Top Contributors

[![rfpdl](https://avatars.githubusercontent.com/u/46474383?v=4)](https://github.com/rfpdl "rfpdl (4 commits)")[![royomx](https://avatars.githubusercontent.com/u/244951400?v=4)](https://github.com/royomx "royomx (3 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/rfpdl-whats-up-doc/health.svg)

```
[![Health](https://phpackages.com/badges/rfpdl-whats-up-doc/health.svg)](https://phpackages.com/packages/rfpdl-whats-up-doc)
```

###  Alternatives

[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)[rapidez/core

Rapidez Core

1823.5k72](/packages/rapidez-core)

PHPackages © 2026

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