Can't use schemaId "$" for type "$". swagger code example
Example: the same schemaid is already used for type swagger
services.ConfigureSwaggerGen(options =>
{
//your custom configuration goes here
// UseFullTypeNameInSchemaIds replacement for .NET Core
options.CustomSchemaIds(x => x.FullName);
});