Symfony How to remove _format URL suffix from documentation generated by NelmioApiDocBundle?

Symfony How to remove _format URL suffix from documentation generated by NelmioApiDocBundle?,symfony,nelmioapidocbundle,Symfony,Nelmioapidocbundle,I've installed the NelmioApiDocBundle for my new API-oriented project in Symfony and I can't get rid of the .{_format} suffix that this bundle adds to all my endpoint URLs. This is how it looks: My API does not support the _format as suffix. It does support it as a query parameter or by request headers. Because of that, if I try to do a request to this endpoint from the NelmioApiDocBundle sandbox, it gets a 404 error response. This is my current config.yml section regarding nelmio: yml nel

I've installed the

NelmioApiDocBundle
for my new API-oriented project in Symfony and I can't get rid of the
.{_format}
suffix that this bundle adds to all my endpoint URLs.

This is how it looks:

Screenshot from NelmioApiDocBundle with format suffix

My API does not support the

_format
as suffix. It does support it as a query parameter or by request headers. Because of that, if I try to do a request to this endpoint from the NelmioApiDocBundle sandbox, it gets a 404 error response.

This is my current config.yml section regarding nelmio:

yml
nelmio_api_doc:
    name:                   My API doc
    sandbox:
        enabled:            true
        endpoint:           null
        accept_type:        application/json
        body_format:
            formats:        null
            default_format: json
        request_format:
            formats:
                json:       application/json
                xml:        null
            method:         accept_header
            default_format: json
        authentication:
            name:           bearer
            delivery:       query
    cache:
        enabled:            false
        file:               '%kernel.cache_dir%/api-doc.cache'


#1

I've figured it out elsewhere on stackoverflow. It seems that my problem was not related to NelmioApiDocBundle, but to FOSRestBundle. I've had to change only one FOSRest setting in config.yml:

fos_rest:
    routing_loader:
        include_format: false

I've found the solution here