PHPackages                             linku/api-documentation-bundle - 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. linku/api-documentation-bundle

ActiveSymfony-bundle[API Development](/categories/api)

linku/api-documentation-bundle
==============================

Extension to API-Platform to modify the documentation with more ease

2.3.0(1mo ago)04MITPHPPHP ^8.4

Since Aug 4Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/LinkuNijmegen/api-documentation-bundle)[ Packagist](https://packagist.org/packages/linku/api-documentation-bundle)[ RSS](/packages/linku-api-documentation-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (19)Versions (15)Used By (0)

Linku API Documentation Bundle
==============================

[](#linku-api-documentation-bundle)

This bundle can be used to modify OpenAPI documentation generated by API-Platform.

Support Matrix
--------------

[](#support-matrix)

This bundle supports:

- PHP 8.4 or newer
- Symfony 7.4 and 8.x
- API Platform 4.3 or newer

Symfony 6 is no longer supported.

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

[](#installation)

You can add this bundle to your project using `composer require linku/api-documentation-bundle`. Make sure your project already meets the support matrix above before installing.

Symfony Flex should automatically add the bundle to the list of used bundles in your project. If not, add `Linku\ApiDocumentationBundle\LinkuApiDocumentationBundle::class => ['all' => true],` to the `config/bundles.php` file.

For now, you need to manually add a `config/packages/linku_api_documentation.yaml`file and put the configuration for your project there. An example configuration can be found at [the end of this file](#configuration-example).

You also need to add the following route:

```
linku_api_documentation:
    resource: "@LinkuApiDocumentationBundle/Resources/routing/sections.xml"
```

Optionally, you can add a `prefix:` to prefix all paths generated. This should be the same prefix as used by API-Platform in their routes.

Development And Verification
----------------------------

[](#development-and-verification)

Run the project checks in your project container with:

```
docker exec  sh -lc 'cd /app && composer test'
docker exec  sh -lc 'cd /app && composer analyse'
```

Sections
--------

[](#sections)

Within the `sections` configuration, you can define a list of available sections. The identifier used in the list can also be used to define sections on individual API-Platform resources or endpoints.

Each section has a `prefix` (URI path prefix) and a `title`.

Using the original `/docs` route will show the section defined as default in `default_section`. You can view documentation for other sections using `/{section_prefix}/docs`.

### Default usage

[](#default-usage)

By default, all endpoints with a custom defined path that start with the `prefix`of a section, will be added to that section. For example, a section with `prefix: 'customer_portal'` will automatically contain all endpoints with custom paths starting with `/customer_portal/`.

### Resource based

[](#resource-based)

Within the API-Platform configuration, you can add a `sections` array to the resource `attributes`. All endpoints within this resource will then be added to the sections with those identifiers.

YAML Example:

```
resources:
    App\Task\Task:
        extraProperties:
            sections: ['customerPortal']
```

### Endpoint based

[](#endpoint-based)

Within the API-Platform configuration, you can add a `sections` array to an endpoint definition. That endpoint will then be added to the sections with those identifiers.

YAML Example:

```
resources:
    App\Task\Task:
        operations:
            ApiPlatform\Metadata\Get:
                extraProperties:
                    sections: ['customerPortal']
```

Removal
-------

[](#removal)

Out-of-the-box, API-Platform does not allow you to remove query parameters or responses without having to manually define all the remaining ones. As you can only add or overwrite items, but not remove them entirely. This bundle supplies some help to remove responses and parameters from generated documentation.

### Parameters

[](#parameters)

To remove a parameter, the endpoint `path` and `method` are required. As well as the `name` of the parameter. These can be added to the `linku_api_documentation.removal.parameters`list.

### Request bodies

[](#request-bodies)

To remove a request body, the endpoint `path` and `method` are required. These can be added to the `linku_api_documentation.removal.request_bodies` list.

### Responses

[](#responses)

To remove a response, the endpoint `path` and `method` are required. As well as the `statusCode` of the response. These can be added to the `linku_api_documentation.removal.responses`list.

Configuration Example
---------------------

[](#configuration-example)

```
linku_api_documentation:
    sections:
        default:
            prefix: ''
            title: ''
        customerPortal:
            prefix: 'customer_portal'
            title: 'Customer Portal'
    default_section: 'default'

    removal:
        parameters:
            - path: '/users/me'
              method: 'get'
              name: 'uuid'

        request_bodies:
            - path: '/tasks/{id}/complete'
              method: 'put'

        responses:
            - path: '/users/update_credentials'
              method: 'post'
              statusCode: 201
            - path: '/users/update_credentials'
              method: 'post'
              statusCode: 422
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

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

Every ~110 days

Recently: every ~268 days

Total

13

Last Release

54d ago

Major Versions

1.3.0 → 2.0.02023-02-17

PHP version history (3 changes)1.0.0PHP ^7.2|^8.0

2.0.0PHP ^8.1

2.3.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b9db989da572a8c21921c360e0a360a247d773c02784414102cfb98ba2e233a?d=identicon)[TimoBakx](/maintainers/TimoBakx)

---

Top Contributors

[![TimoBakx](https://avatars.githubusercontent.com/u/839801?v=4)](https://github.com/TimoBakx "TimoBakx (18 commits)")[![frankvanhest](https://avatars.githubusercontent.com/u/2206481?v=4)](https://github.com/frankvanhest "frankvanhest (1 commits)")

---

Tags

symfonybundleopenapiapi-platformapi-documentation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/linku-api-documentation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/linku-api-documentation-bundle/health.svg)](https://phpackages.com/packages/linku-api-documentation-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

42867.3k](/packages/harmbandstra-swagger-ui-bundle)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[onmoon/openapi-server-bundle

Symfony bundle to create a fully-featured API server from an OpenAPI v3 specification

1117.7k](/packages/onmoon-openapi-server-bundle)

PHPackages © 2026

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