make sure extension is not included in variable

routes like:

    foos/:id(.:format)

are generating swagger routes like:

    foos/{id.json}

but should be:

    foos/{id}.json