Every class in the swagger JSON must have a unique schemaId.
Swashbuckler tries to just use the class name as a simple schemaId, however if you have two classes in different namespaces with the same name (as you do) this will not work.
As the error suggests, you can use the config setting "UseFullTypeNameInSchemaIds*" for a potential workaround (Update: not available in recent versions)
In newer versions you can achieve the same behavior via options.CustomSchemaIds(x => x.FullName).
Here is an example:
services.ConfigureSwaggerGen(options =>
{
//your custom configuration goes here
...
// UseFullTypeNameInSchemaIds replacement for .NET Core
options.CustomSchemaIds(x => x.FullName);
});
for more information http://wegotcode.com/microsoft/swagger-fix-for-dotnetcore/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…