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)

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

  • 相关阅读:
    【转】 Linux Core Dump 介绍
    【转】 设定linux 系统可用资源
    Python for 循环 失效
    transition 平移属性实现 横向整屏 滚动
    vue 插槽的使用
    vue pc商城仿网易严选商品的分类效果
    干货-vue 中使用 rxjs 进行非父子组件中传值
    vue 2.0 脚手架项目中使用 cross-env 分环境打包
    什么是闭包,有哪些优缺点呢?
    滚动视差
  • 原文地址:https://www.cnblogs.com/w2011/p/9469772.html
Copyright © 2011-2022 走看看