Utilisation d'une API Web et utilisation de swashbuckle pour générer une documentation swagger, J'ai défini deux classes différentes avec le même nom dans deux espaces de noms différents. Lorsque j'ouvre la page swagger dans mon navigateur, le message suivant apparaît
Conflicting schemaIds : Duplicate schemaIds detected for types A and B. See the config setting - "UseFullTypeNameInSchemaIds" for a potential workaround
message complet :
500 : {"Message" : "Une erreur s'est produite.", "ExceptionMessage" : "Conflicting schemaIds : Duplicate schemaIds detected for types A and B. See the config setting - \"UseFullTypeNameInSchemaIds\" for a potential workaround", "ExceptionType" : "System.InvalidOperationException", "StackTrace" :" at Swashbuckle.Swagger.SchemaRegistry.CreateRefSchema(Type type) \r\n at Swashbuckle.Swagger.SchemaRegistry.CreateInlineSchema(Type type) \r\n at Swashbuckle.Swagger.SchemaRegistry.b__1f(JsonProperty prop) \r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparateur) \r\n at Swashbuckle.Swagger.SchemaRegistry.CreateObjectSchema(JsonObjectContract jsonContract) \r\n at Swashbuckle.Swagger.SchemaRegistry.CreateDefinitionSchema(Type type) \r\n at Swashbuckle.Swagger.SchemaRegistry.GetOrRegister(Type type) \r\n at Swashbuckle.Swagger.SwaggerGenerator.CreateOperation(ApiDescription apiDesc, SchemaRegistry schemaRegistry) \r\n at Swashbuckle.Swagger.SwaggerGenerator.CreatePathItem(IEnumerable1 apiDescriptions, SchemaRegistry schemaRegistry)\r\n at Swashbuckle.Swagger.SwaggerGenerator.<>c__DisplayClass7.<GetSwagger>b__4(IGrouping
2 groupes) \r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparateur) \r\n at Swashbuckle.Swagger.SwaggerGenerator.GetSwagger(String rootUrl, String apiVersion) \r\n at Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) \r\n at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) \r\n at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) \r\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) \r\n at System.Web.Http.HttpServer.d__0.MoveNext()"} http://localhost:24215/swagger/docs/v1
Je ne veux pas changer le nom de mes classes. Comment puis-je y remédier ?