PHPackages                             krak/api-platform-extra - 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. krak/api-platform-extra

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

krak/api-platform-extra
=======================

API Platform Extra Goodies.

v0.2.0(5y ago)7434MITPHPCI failing

Since Oct 10Pushed 5y ago2 watchersCompare

[ Source](https://github.com/krakphp/api-platform-extra)[ Packagist](https://packagist.org/packages/krak/api-platform-extra)[ Docs](https://github.com/krakphp/api-platform-extra)[ RSS](/packages/krak-api-platform-extra/feed)WikiDiscussions 0.x Synced yesterday

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

API Platform Extra
==================

[](#api-platform-extra)

API Platform Extra includes additional features or bug fixes into API Platform that haven't been released or won't be released.

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

[](#installation)

Install with composer at `krak/api-platform-extra`.

Usage
-----

[](#usage)

By default all functionality provided by this library is *opt-in*, so you'll need to explicitly enable each feature in the config to make use of the features.

### MessageBusDataPersister

[](#messagebusdatapersister)

The message bus data persister is enabled by default and controlled via the following config:

```
api_platform_extra:
    enable_message_bus_data_persister: true
```

The `MessageBusDataPersister` will push any messages that aren't handled by the standard data persisters into the message bus.

So the only thing you need to do is simply just register message handlers for the ApiPlatform resources you want to handle via the message bus.

### Additional Swagger Documentation

[](#additional-swagger-documentation)

This allows you to merge and override in any additional swagger documentation to the generated swagger documentation from API Platform. This is useful if you need to provide any custom endpoints outside of your defined API Platform resources.

The configuration for defining the swagger file is here:

```
api_platform_extra:
    additional_swagger_path: "%kernel.project_dir%/config/api_platform/swagger.yaml"
```

If that file exists, the additional swagger documentation will be merged. Else, nothing will happen.

### Plural Data Path Segment Name Generator

[](#plural-data-path-segment-name-generator)

By default, API Platform's inflector will transport any resource ending with `Data` as `Datas`. This fixes this specific use case, and could possibly extended to adjust multiple inflection fixes.

### Constructor Denormalizer

[](#constructor-denormalizer)

This issue has actually been fixed but is pending release [api-platform/core#2178](https://github.com/api-platform/core/pull/2178). This library will include that patch until api platform 2.4.0 is released.

This basically allows you to use constructor arguments with nested entities like so:

```
