nelmio/NelmioApiDocBundle — pull request #467 by bezhermoso (2014-08-07 19:20:04+00:00)
Title: Swagger: Alternate model naming strategy.

Currently, the models are being identified by their fully-qualified class names but replacing namespace-separators with dots, i.e. `FooBundle\Entity\Group => FooBundle.Entity.Group`. This was done to ensure that unique entities get unique names.

However this could expose vendor names that you would wish to hide. Example: `SoftDevCompanyName.Bundle.UserBundle.Group` would expose your company's name, and this might be something that clients would not want.

This PR provides an alternative naming strategy, which would simply use the class names as the model ID minus the namespaces, i.e. `CompanyName\Bundle\UserBundle\Group => Group`.

At the moment, there is no mechanism to plug in custom naming strategies, though that would be nice to have. (Another naming strategy would be a class-name -> model ID map, which the developer can provide) We could add that later.