zoukankan      html  css  js  c++  java
  • .net Core Abp See config settings

    Swagger  See config settings - "CustomSchemaIds" for a workaround

     1 System.InvalidOperationException: Conflicting schemaIds: Identical schemaIds detected for types BDtos.ImportExcelSaveDataDto and ADtos.ImportExcelSaveDataDto. See config settings - "CustomSchemaIds" for a workaround
     2    at Swashbuckle.AspNetCore.SwaggerGen.SchemaIdManager.IdFor(Type type)
     3    at Swashbuckle.AspNetCore.SwaggerGen.SchemaRegistry.CreateReferenceSchema(Type type, Queue`1 referencedTypes)
     4    at Swashbuckle.AspNetCore.SwaggerGen.SchemaRegistry.GetOrRegister(Type type)
     5    at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreateParameter(ApiDescription apiDescription, ApiParameterDescription apiParameterDescription, ISchemaRegistry schemaRegistry)
     6    at System.Linq.Enumerable.WhereSelectListIterator`2.ToList()
     7    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
     8    at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreateOperation(ApiDescription apiDescription, ISchemaRegistry schemaRegistry)
     9    at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreatePathItem(IEnumerable`1 apiDescriptions, ISchemaRegistry schemaRegistry)
    10    at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
    11    at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreatePathItems(IEnumerable`1 apiDescriptions, ISchemaRegistry schemaRegistry)
    12    at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath, String[] schemes)
    13    at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
    14    at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
    15    at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
    16    at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
    17    at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
    18    at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
    19 --- End of stack trace from previous location where exception was thrown ---
    20    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
    21    at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
    22    at Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.Invoke(HttpContext httpContext) in D:GithubaspnetboilerplatesrcAbp.AspNetCoreAspNetCoreSecurityAbpSecurityHeadersMiddleware.cs:line 26
    23    at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
    24    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

       主要原因是因为两个类有相同的名称但出现在了不同的全名空间!所以会报错,解决办法如下:

  • 相关阅读:
    Intellij使用心得(四) -- 导入Eclipse的代码格式化文件
    idea安装插件plugin(主要针对网络连接不上的情况)
    IDEA破解方法以及快捷键大全
    eclipse+maven搭建自己web系统的骨架,解决自带骨架加载无限慢的问题
    用Eclipse创建Maven多模块项目
    Maven实战--- dependencies与dependencyManagement的区别
    redis之有序集合类型(Zset)——排行榜的实现
    做一个完整的Java Web项目需要掌握的技能
    经典面试题:用户反映你开发的网站访问很慢可能会是什么原因
    linux 免密码 使用sudo 直接使用root权限执行命令
  • 原文地址:https://www.cnblogs.com/w2011/p/9469772.html
Copyright © 2011-2022 走看看