The Clone has got me thinking ... perhaps it's hiding a larger smell in this class - namely the use of shared ModelSpec instances to describe "independent" value-types in models.

If the ModelSpec isn't pulled from either StaticMappings or CustomMappings, then the above Clone is actually redundant because it's being applied to a newly created instance anyway.

Rather than cloning, I think the pre-defined mappings should return a Func<ModelSpec> instead of an instance. This would be a very trivial change for the internal StaticMappings, however it would be a breaking change for any apps that use CustomMappings because the config API currently maps a Type to a ModelSpec instance.

That said, I intend on releasing a new major version of Swashbuckle very shortly, which removes the MVC dependency, cleans up some namespaces and introduces a few, small breaking changes to the config API. This could be a good time to introduce this one too.

How does this sound to you? We'd have to co-ordinate to make sure you commit the "model filter" feature - which is awesome by the way :)