Api Platform conference
Register now
v2.6 NelmioApiDocBundle Integration
API Platform Conference
September 19-20, 2024 | Lille & online

The international conference on the API Platform Framework

API Platform Conference 2024: meet the best PHP, JavaScript and API experts

Learn more about the event, register for the conference, and get ready for two days of inspiration, ideas, and knowledge-sharing with our incredible lineup of renowned specialists and advocates.

Register now

# NelmioApiDocBundle Integration

NelmioApiDoc provides an alternative to the native Swagger/Open API support provided by API Platform.

As NelmioApiDocBundle 3+ has built-in support for API Platform, this documentation is only relevant for people using NelmioApiDocBundle between version 2.9 and 3.0.

For new projects, prefer using the built-in Swagger support and/or NelmioApiDoc 3.

Screenshot of API Platform integrated with NelmioApiDocBundle

NelmioApiDocBundle is supported by API Platform since version 2.9.

To enable the NelmioApiDoc integration, copy the following configuration:

# api/config/packages/api_platform.yaml
    # ...

    enable_nelmio_api_doc: true

        accept_type: 'application/json'
            formats: ['json']
            default_format: 'json'
                json: 'application/json'

Please note that NelmioApiDocBundle has a sandbox limitation where you cannot pass a JSON array as parameter, so you cannot use it to deserialize nested objects.

You can also help us improve the documentation of this page.

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop